mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Parse the jsxFactory again in the checker instead of using cached value in the program
This commit is contained in:
@@ -329,9 +329,6 @@ namespace ts {
|
||||
// Map storing if there is emit blocking diagnostics for given input
|
||||
const hasEmitBlockingDiagnostics = createFileMap<boolean>(getCanonicalFileName);
|
||||
|
||||
// ReactNamespace and jsxFactory information
|
||||
let jsxFactoryEntity: EntityName;
|
||||
|
||||
let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string) => ResolvedModuleFull[];
|
||||
if (host.resolveModuleNames) {
|
||||
resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => {
|
||||
@@ -424,8 +421,7 @@ namespace ts {
|
||||
getFileProcessingDiagnostics: () => fileProcessingDiagnostics,
|
||||
getResolvedTypeReferenceDirectives: () => resolvedTypeReferenceDirectives,
|
||||
isSourceFileFromExternalLibrary,
|
||||
dropDiagnosticsProducingTypeChecker,
|
||||
getJsxFactoryEntity: () => jsxFactoryEntity
|
||||
dropDiagnosticsProducingTypeChecker
|
||||
};
|
||||
|
||||
verifyCompilerOptions();
|
||||
@@ -731,7 +727,6 @@ namespace ts {
|
||||
writeFile: writeFileCallback || (
|
||||
(fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)),
|
||||
isEmitBlocked,
|
||||
getJsxFactoryEntity: program.getJsxFactoryEntity,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1679,8 +1674,7 @@ namespace ts {
|
||||
if (options.reactNamespace) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory"));
|
||||
}
|
||||
jsxFactoryEntity = parseIsolatedEntityName(options.jsxFactory, languageVersion);
|
||||
if (!jsxFactoryEntity) {
|
||||
if (!parseIsolatedEntityName(options.jsxFactory, languageVersion)) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFactory));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user