Skip to content

Commit

Permalink
Fixing Typo
Browse files Browse the repository at this point in the history
Summary:
We recently landed a change with a typo in the interface declaration. We just fixed the typo

## CHANGELOG
[General][Fixed] - Fixed a typo in the interface declaration

Differential Revision: D45978419

fbshipit-source-id: 689eb09d758a0eaca749c2b50047445e18b51cf7
  • Loading branch information
Riccardo Cipolleschi authored and facebook-github-bot committed May 22, 2023
1 parent 6d24ee1 commit 0412279
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ describe('FlowParser', () => {
});
});

describe('interfaceDelcaration', () => {
it('returns interfaceDelcaration Property', () => {
expect(parser.interfaceDelcaration).toEqual('InterfaceDeclaration');
describe('interfaceDeclaration', () => {
it('returns interfaceDeclaration Property', () => {
expect(parser.interfaceDeclaration).toEqual('InterfaceDeclaration');
});
});
});
Expand Down Expand Up @@ -613,9 +613,9 @@ describe('TypeScriptParser', () => {
});
});

describe('interfaceDelcaration', () => {
it('returns interfaceDelcaration Property', () => {
expect(parser.interfaceDelcaration).toEqual('TSInterfaceDeclaration');
describe('interfaceDeclaration', () => {
it('returns interfaceDeclaration Property', () => {
expect(parser.interfaceDeclaration).toEqual('TSInterfaceDeclaration');
});
});
});
2 changes: 1 addition & 1 deletion packages/react-native-codegen/src/parsers/flow/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FlowParser implements Parser {
typeParameterInstantiation: string = 'TypeParameterInstantiation';
typeAlias: string = 'TypeAlias';
enumDeclaration: string = 'EnumDeclaration';
interfaceDelcaration: string = 'InterfaceDeclaration';
interfaceDeclaration: string = 'InterfaceDeclaration';

nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation';

Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-codegen/src/parsers/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export interface Parser {
enumDeclaration: string;

/**
* InterfaceDelcaration property of the Parser
* InterfaceDeclaration property of the Parser
*/
interfaceDelcaration: string;
interfaceDeclaration: string;

/**
* This is the NullLiteralTypeAnnotation value
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen/src/parsers/parserMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class MockedParser implements Parser {
typeParameterInstantiation: string = 'TypeParameterInstantiation';
typeAlias: string = 'TypeAlias';
enumDeclaration: string = 'EnumDeclaration';
interfaceDelcaration: string = 'InterfaceDelcaration';
interfaceDeclaration: string = 'InterfaceDeclaration';

nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TypeScriptParser implements Parser {
typeParameterInstantiation: string = 'TSTypeParameterInstantiation';
typeAlias: string = 'TSTypeAliasDeclaration';
enumDeclaration: string = 'TSEnumDeclaration';
interfaceDelcaration: string = 'TSInterfaceDeclaration';
interfaceDeclaration: string = 'TSInterfaceDeclaration';

nullLiteralTypeAnnotation: string = 'TSNullKeyword';

Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-codegen/src/parsers/typescript/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function resolveTypeAnnotation(
node = resolvedTypeAnnotation.typeAnnotation;
break;
}
case parser.interfaceDelcaration: {
case parser.interfaceDeclaration: {
typeResolutionStatus = {
successful: true,
type: 'alias',
Expand All @@ -87,7 +87,7 @@ function resolveTypeAnnotation(
}
default: {
throw new TypeError(
`A non GenericTypeAnnotation must be a type declaration ('${parser.typeAlias}'), an interface ('${parser.interfaceDelcaration}'), or enum ('${parser.enumDeclaration}'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`,
`A non GenericTypeAnnotation must be a type declaration ('${parser.typeAlias}'), an interface ('${parser.interfaceDeclaration}'), or enum ('${parser.enumDeclaration}'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`,
);
}
}
Expand Down

0 comments on commit 0412279

Please sign in to comment.