Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ describe('typeEnumResolution', () => {
{successful: true, type: 'enum', name: 'Foo'},
true /* nullable */,
'SomeModule' /* name */,
'Flow',
enumMap,
parser,
);
Expand Down Expand Up @@ -402,7 +401,6 @@ describe('typeEnumResolution', () => {
{successful: true, type: 'enum', name: 'Foo'},
true /* nullable */,
'SomeModule' /* name */,
'Flow',
enumMap,
parser,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ const {
throwIfPartialWithMoreParameter,
} = require('../../error-utils');

const language = 'Flow';

function translateTypeAnnotation(
hasteModuleName: string,
/**
Expand Down Expand Up @@ -295,7 +293,6 @@ function translateTypeAnnotation(
typeResolutionStatus,
nullable,
hasteModuleName,
language,
enumMap,
parser,
);
Expand All @@ -304,7 +301,7 @@ function translateTypeAnnotation(
throw new UnsupportedTypeAnnotationParserError(
hasteModuleName,
typeAnnotation,
language,
parser.language(),
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import type {
NativeModuleObjectTypeAnnotation,
NativeModuleEnumDeclaration,
} from '../CodegenSchema';
import type {ParserType} from './errors';
import type {Parser} from './parser';
import type {
ParserErrorCapturer,
Expand Down Expand Up @@ -204,15 +203,14 @@ function typeEnumResolution(
typeResolution: TypeResolutionStatus,
nullable: boolean,
hasteModuleName: string,
language: ParserType,
enumMap: {...NativeModuleEnumMap},
parser: Parser,
): Nullable<NativeModuleEnumDeclaration> {
if (!typeResolution.successful || typeResolution.type !== 'enum') {
throw new UnsupportedTypeAnnotationParserError(
hasteModuleName,
typeAnnotation,
language,
parser.language(),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ const {
throwIfPartialWithMoreParameter,
} = require('../../error-utils');

const language = 'TypeScript';

function translateObjectTypeAnnotation(
hasteModuleName: string,
/**
Expand Down Expand Up @@ -362,7 +360,6 @@ function translateTypeAnnotation(
typeResolutionStatus,
nullable,
hasteModuleName,
language,
enumMap,
parser,
);
Expand Down Expand Up @@ -406,7 +403,7 @@ function translateTypeAnnotation(
throw new UnsupportedTypeAnnotationParserError(
hasteModuleName,
typeAnnotation,
language,
parser.language(),
);
}
}
Expand Down