From 628db1fcd35c47c7ffdc3633e55f098578473eda Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Wed, 28 Sep 2022 11:47:44 -0700 Subject: [PATCH] PixelRatio Summary: Changelog: [Internal] Flow typing PixelRatio Reviewed By: yungsters Differential Revision: D39588444 fbshipit-source-id: c1c358799e8012398b0b66f46bb58964a5d6c77f --- Libraries/Utilities/PixelRatio.js.flow | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Libraries/Utilities/PixelRatio.js.flow diff --git a/Libraries/Utilities/PixelRatio.js.flow b/Libraries/Utilities/PixelRatio.js.flow new file mode 100644 index 00000000000..b39952514b4 --- /dev/null +++ b/Libraries/Utilities/PixelRatio.js.flow @@ -0,0 +1,21 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict-local + */ + +'use strict'; + +declare class PixelRatio { + static get(): number; + static getFontScale(): number; + static getPixelSizeForLayoutSize(layoutSize: number): number; + static roundToNearestPixel(layoutSize: number): number; + static startDetecting(): void; +} + +module.exports = PixelRatio;