mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Throw errors to create fixer
This commit is contained in:
@@ -63,7 +63,6 @@ import {
|
||||
DiagnosticWithLocation,
|
||||
directorySeparator,
|
||||
DirectoryStructureHost,
|
||||
emitDetachedComments,
|
||||
emitFileNamesIsEqual,
|
||||
emitFiles,
|
||||
EmitHost,
|
||||
@@ -316,6 +315,7 @@ import {
|
||||
trace,
|
||||
tracing,
|
||||
tryCast,
|
||||
tsFixRootDirSignal,
|
||||
TypeChecker,
|
||||
typeDirectiveIsEqualTo,
|
||||
TypeReferenceDirectiveResolutionCache,
|
||||
@@ -2177,6 +2177,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
|
||||
sourceFile.fileName,
|
||||
"!!! Sheetal CommonDir computed: " + commonSourceDirectory + " commonDir in 6.0 : " + commonDir60,
|
||||
);
|
||||
tsFixRootDirSignal("allFilesDontBelong", commonSourceDirectory, commonDir60);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -4464,6 +4465,7 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
|
||||
"\n outputPaths:: " + JSON.stringify(outputPaths) +
|
||||
"\n Output paths in 6.0: " + JSON.stringify(outputPaths60),
|
||||
));
|
||||
tsFixRootDirSignal("outputPathsChange", getCommonSourceDirectory(), commonDir60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6628,6 +6628,12 @@ export function sourceFileMayBeEmitted(sourceFile: SourceFile, host: SourceFileM
|
||||
return true;
|
||||
}
|
||||
|
||||
/**@internal */
|
||||
export function tsFixRootDirSignal(kind: string, rootDir: string, rootDir60: string): void {
|
||||
throw new Error(`TS_FIX_ROOTDIR_SIGNAL:: ${kind}:: 5.9:: ${rootDir} 6.0:: ${rootDir60} <End>`);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function sourceFileMayBeEmitted60(sourceFile: SourceFile, host: SourceFileMayBeEmittedHost, forceDtsEmit?: boolean): boolean {
|
||||
const options = host.getCompilerOptions();
|
||||
// Js files are emitted only if option is enabled
|
||||
|
||||
Reference in New Issue
Block a user