From fb5f79ceb5ececc0ae7f22fa933eca0ac64f3e70 Mon Sep 17 00:00:00 2001 From: ankit-tailor Date: Tue, 30 Jan 2024 04:21:30 -0800 Subject: [PATCH] fix: fontWeight typings (#42707) Summary: This PR fixes the typings for `fontWeight` style prop. Flow file has below typings but they were missing in typescript file. ``` fontWeight?: | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 'ultralight' | 'thin' | 'light' | 'medium' | 'regular' | 'semibold' | 'condensedBold' | 'condensed' | 'heavy' | 'black' | undefined; ``` ## Changelog: [GENERAL] [ADDED] - Added missing typings for fontWeight style prop. Pull Request resolved: https://github.com/facebook/react-native/pull/42707 Test Plan: Tested manually. Reviewed By: cortinico Differential Revision: D53191119 Pulled By: NickGerleman fbshipit-source-id: 47c00ea81be5aa217d57be0609cfc7bd4e8e6843 --- .../Libraries/StyleSheet/StyleSheetTypes.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts index 2a3719fe6c98e2..17c8becd176105 100644 --- a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts +++ b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts @@ -326,6 +326,25 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { | '700' | '800' | '900' + | 100 + | 200 + | 300 + | 400 + | 500 + | 600 + | 700 + | 800 + | 900 + | 'ultralight' + | 'thin' + | 'light' + | 'medium' + | 'regular' + | 'semibold' + | 'condensedBold' + | 'condensed' + | 'heavy' + | 'black' | undefined; letterSpacing?: number | undefined; lineHeight?: number | undefined;