From 1ebf446de5292befe2c817d6852cf3a7b4fe9352 Mon Sep 17 00:00:00 2001 From: David Pett Date: Wed, 10 Apr 2019 08:05:57 -0500 Subject: [PATCH] adding fontVariant to TextStyleIOS according to https://facebook.github.io/react-native/docs/text.html#style >fontVariant: array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') (iOS) I added support by first creating a union type for FontVariant with the enum values, then adding fontVariant as an optional property that accepts an array of type FontVariant --- types/react-native/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 99998e9241..df8c1e7695 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -757,7 +757,9 @@ export interface LayoutChangeEvent { }; } +export type FontVariant = 'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'proportional-nums'; export interface TextStyleIOS extends ViewStyle { + fontVariant?: FontVariant[]; letterSpacing?: number; textDecorationColor?: string; textDecorationStyle?: "solid" | "double" | "dotted" | "dashed";