File tree Expand file tree Collapse file tree
packages/react-native-codegen/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,14 +265,15 @@ export type ReservedTypeAnnotation = Readonly<{
265265/**
266266 * NativeModule Types
267267 */
268- export type Nullable < + T : NativeModuleTypeAnnotation > =
268+ export type Nullable < + T extends NativeModuleTypeAnnotation > =
269269 | NullableTypeAnnotation < T >
270270 | T ;
271271
272- export type NullableTypeAnnotation < + T : NativeModuleTypeAnnotation > = Readonly < {
273- type : 'NullableTypeAnnotation' ,
274- typeAnnotation : T ,
275- } > ;
272+ export type NullableTypeAnnotation < + T extends NativeModuleTypeAnnotation > =
273+ Readonly < {
274+ type : 'NullableTypeAnnotation' ,
275+ typeAnnotation : T ,
276+ } > ;
276277
277278export type NativeModuleSchema = Readonly < {
278279 type : 'NativeModule' ,
@@ -316,7 +317,7 @@ export type NativeModuleObjectTypeAnnotation = ObjectTypeAnnotation<
316317> ;
317318
318319export type NativeModuleArrayTypeAnnotation <
319- + T : Nullable < NativeModuleBaseTypeAnnotation > ,
320+ + T extends Nullable < NativeModuleBaseTypeAnnotation > ,
320321> = ArrayTypeAnnotation <
321322 | T
322323 /**
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ function wrapModuleSchema(
107107}
108108
109109// $FlowFixMe[unsupported-variance-annotation]
110- function unwrapNullable < + T : NativeModuleTypeAnnotation > (
110+ function unwrapNullable < + T extends NativeModuleTypeAnnotation > (
111111 x : Nullable < T > ,
112112) : [ T , boolean ] {
113113 if ( x . type === 'NullableTypeAnnotation' ) {
@@ -118,7 +118,7 @@ function unwrapNullable<+T: NativeModuleTypeAnnotation>(
118118}
119119
120120// $FlowFixMe[unsupported-variance-annotation]
121- function wrapNullable < + T : NativeModuleTypeAnnotation > (
121+ function wrapNullable < + T extends NativeModuleTypeAnnotation > (
122122 nullable : boolean ,
123123 typeAnnotation : T ,
124124) : Nullable < T > {
You can’t perform that action at this time.
0 commit comments