Skip to content

Commit 1d9d3ae

Browse files
Rename NativeModuleNumberLiteralTypeAnnotation & NativeModuleStringLiteralTypeAnnotation in TS (#54588)
Summary: Pull Request resolved: #54588 `NativeModuleNumberLiteralTypeAnnotation` -> `NumberLiteralTypeAnnotation` & `NativeModuleStringLiteralTypeAnnotation` -> `StringLiteralType` in TypeScript just as they already exist in Flow here: https://www.internalfb.com/code/fbsource/[9b248afa0cd5548b81dd44f1042b230e6069432b]/xplat/js/react-native-github/packages/react-native-codegen/src/CodegenSchema.js?lines=41-53 Changelog: [Internal] Reviewed By: elicwhite Differential Revision: D87375511 fbshipit-source-id: c35afff132c2efa20ce1c45dc23ef2c64c91613c
1 parent b99c69a commit 1d9d3ae

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/react-native-codegen/src/CodegenSchema.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export interface UnsafeAnyTypeAnnotation {
299299
readonly type: 'AnyTypeAnnotation',
300300
}
301301

302-
export interface NativeModuleNumberLiteralTypeAnnotation {
302+
export interface NumberLiteralTypeAnnotation {
303303
readonly type: 'NumberLiteralTypeAnnotation';
304304
readonly value: number;
305305
}
@@ -308,14 +308,14 @@ export interface NativeModuleStringTypeAnnotation {
308308
readonly type: 'StringTypeAnnotation';
309309
}
310310

311-
export interface NativeModuleStringLiteralTypeAnnotation {
311+
export interface StringLiteralTypeAnnotation {
312312
readonly type: 'StringLiteralTypeAnnotation';
313313
readonly value: string;
314314
}
315315

316316
export interface StringLiteralUnionTypeAnnotation {
317317
readonly type: 'StringLiteralUnionTypeAnnotation';
318-
readonly types: NativeModuleStringLiteralTypeAnnotation[];
318+
readonly types: StringLiteralTypeAnnotation[];
319319
}
320320

321321
export interface NativeModuleNumberTypeAnnotation {
@@ -340,7 +340,7 @@ export interface NativeModuleBooleanTypeAnnotation {
340340

341341
export type NativeModuleEnumMember = {
342342
readonly name: string;
343-
readonly value: NativeModuleStringLiteralTypeAnnotation | NativeModuleNumberLiteralTypeAnnotation,
343+
readonly value: StringLiteralTypeAnnotation | NumberLiteralTypeAnnotation,
344344
};
345345

346346
export type NativeModuleEnumMemberType =
@@ -398,9 +398,9 @@ export type NativeModuleEventEmitterBaseTypeAnnotation =
398398
| NativeModuleFloatTypeAnnotation
399399
| NativeModuleInt32TypeAnnotation
400400
| NativeModuleNumberTypeAnnotation
401-
| NativeModuleNumberLiteralTypeAnnotation
401+
| NumberLiteralTypeAnnotation
402402
| NativeModuleStringTypeAnnotation
403-
| NativeModuleStringLiteralTypeAnnotation
403+
| StringLiteralTypeAnnotation
404404
| StringLiteralUnionTypeAnnotation
405405
| NativeModuleTypeAliasTypeAnnotation
406406
| NativeModuleGenericObjectTypeAnnotation
@@ -412,10 +412,10 @@ export type NativeModuleEventEmitterTypeAnnotation =
412412

413413
export type NativeModuleBaseTypeAnnotation =
414414
NativeModuleStringTypeAnnotation
415-
| NativeModuleStringLiteralTypeAnnotation
415+
| StringLiteralTypeAnnotation
416416
| StringLiteralUnionTypeAnnotation
417417
| NativeModuleNumberTypeAnnotation
418-
| NativeModuleNumberLiteralTypeAnnotation
418+
| NumberLiteralTypeAnnotation
419419
| NativeModuleInt32TypeAnnotation
420420
| NativeModuleDoubleTypeAnnotation
421421
| NativeModuleFloatTypeAnnotation

0 commit comments

Comments
 (0)