diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 5cf77268837b6..de72333bc5738 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -76,7 +76,7 @@ import { SemanticDiagnosticsBuilderProgram, SignatureInfo, skipAlias, - skipTypeChecking, + skipTypeCheckingIgnoringNoCheck, some, SourceFile, sourceFileMayBeEmitted, @@ -158,6 +158,8 @@ export interface ReusableBuilderProgramState extends BuilderState { * emitKind pending for a program with --out */ programEmitPending?: BuilderFileEmit; + /** If semantic diagnsotic check is pending */ + checkPending?: true; /* * true if semantic diagnostics are ReusableDiagnostic instead of Diagnostic */ @@ -329,6 +331,7 @@ function createBuilderProgramState( } state.changedFilesSet = new Set(); state.latestChangedDtsFile = compilerOptions.composite ? oldState?.latestChangedDtsFile : undefined; + state.checkPending = state.compilerOptions.noCheck ? true : undefined; const useOldState = BuilderState.canReuseOldState(state.referencedMap, oldState); const oldCompilerOptions = useOldState ? oldState!.compilerOptions : undefined; @@ -473,6 +476,11 @@ function createBuilderProgramState( state.buildInfoEmitPending = true; } } + if ( + useOldState && + state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && + oldState!.checkPending !== state.checkPending + ) state.buildInfoEmitPending = true; return state; function addFileToChangeSet(path: Path) { @@ -741,7 +749,7 @@ function removeDiagnosticsOfLibraryFiles(state: BuilderProgramStateWithDefinedPr const options = state.program.getCompilerOptions(); forEach(state.program.getSourceFiles(), f => state.program.isSourceFileDefaultLibrary(f) && - !skipTypeChecking(f, options, state.program) && + !skipTypeCheckingIgnoringNoCheck(f, options, state.program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); } } @@ -986,6 +994,7 @@ function getSemanticDiagnosticsOfFile( cancellationToken: CancellationToken | undefined, semanticDiagnosticsPerFile?: BuilderProgramState["semanticDiagnosticsPerFile"], ): readonly Diagnostic[] { + if (state.compilerOptions.noCheck) return emptyArray; return concatenate( getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile), state.program.getProgramDiagnostics(sourceFile), @@ -1084,6 +1093,7 @@ export interface IncrementalBuildInfoBase extends BuildInfo { // Because this is only output file in the program, we dont need fileId to deduplicate name latestChangedDtsFile?: string | undefined; errors: true | undefined; + checkPending: true | undefined; } /** @internal */ @@ -1131,6 +1141,7 @@ export function isIncrementalBuildInfo(info: BuildInfo): info is IncrementalBuil export interface NonIncrementalBuildInfo extends BuildInfo { root: readonly string[]; errors: true | undefined; + checkPending: true | undefined; } /** @internal */ @@ -1190,6 +1201,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { const buildInfo: NonIncrementalBuildInfo = { root: arrayFrom(rootFileNames, r => relativeToBuildInfo(r)), errors: state.hasErrors ? true : undefined, + checkPending: state.checkPending, version, }; return buildInfo; @@ -1223,6 +1235,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { false : // Pending emit is same as deteremined by compilerOptions state.programEmitPending, // Actual value errors: state.hasErrors ? true : undefined, + checkPending: state.checkPending, version, }; return buildInfo; @@ -1313,6 +1326,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { emitSignatures, latestChangedDtsFile, errors: state.hasErrors ? true : undefined, + checkPending: state.checkPending, version, }; return buildInfo; @@ -1952,7 +1966,13 @@ export function createBuilderProgram( while (true) { const affected = getNextAffectedFile(state, cancellationToken, host); let result; - if (!affected) return undefined; // Done + if (!affected) { + if (state.checkPending && !state.compilerOptions.noCheck) { + state.checkPending = undefined; + state.buildInfoEmitPending = true; + } + return undefined; // Done + } else if (affected !== state.program) { // Get diagnostics for the affected file if its not ignored const affectedSourceFile = affected as SourceFile; @@ -1984,6 +2004,7 @@ export function createBuilderProgram( result = diagnostics || emptyArray; state.changedFilesSet.clear(); state.programEmitPending = getBuilderFileEmit(state.compilerOptions); + if (!state.compilerOptions.noCheck) state.checkPending = undefined; state.buildInfoEmitPending = true; } return { result, affected }; @@ -2021,6 +2042,10 @@ export function createBuilderProgram( for (const sourceFile of state.program.getSourceFiles()) { diagnostics = addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken)); } + if (state.checkPending && !state.compilerOptions.noCheck) { + state.checkPending = undefined; + state.buildInfoEmitPending = true; + } return diagnostics || emptyArray; } } @@ -2089,6 +2114,7 @@ export function createBuilderProgramUsingIncrementalBuildInfo( outSignature: buildInfo.outSignature, programEmitPending: buildInfo.pendingEmit === undefined ? undefined : toProgramEmitPending(buildInfo.pendingEmit, buildInfo.options), hasErrors: buildInfo.errors, + checkPending: buildInfo.checkPending, }; } else { @@ -2125,6 +2151,7 @@ export function createBuilderProgramUsingIncrementalBuildInfo( latestChangedDtsFile, emitSignatures: emitSignatures?.size ? emitSignatures : undefined, hasErrors: buildInfo.errors, + checkPending: buildInfo.checkPending, }; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4a9918c9671e9..ca34672ce0318 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -502,6 +502,25 @@ export const commonOptionsWithBuild: CommandLineOption[] = [ description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript, defaultValueDescription: false, }, + { + name: "noCheck", + type: "boolean", + showInSimplifiedHelpView: false, + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, + transpileOptionValue: true, + defaultValueDescription: false, + // Not setting affectsSemanticDiagnostics or affectsBuildInfo because we dont want all diagnostics to go away, its handled in builder + }, + { + name: "noEmit", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_emitting_files_from_a_compilation, + transpileOptionValue: undefined, + defaultValueDescription: false, + }, { name: "assumeChangesOnlyAffectDirectDependencies", type: "boolean", @@ -772,29 +791,6 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ defaultValueDescription: false, description: Diagnostics.Disable_emitting_comments, }, - { - name: "noCheck", - type: "boolean", - showInSimplifiedHelpView: false, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, - transpileOptionValue: true, - defaultValueDescription: false, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - extraValidation() { - return [Diagnostics.Unknown_compiler_option_0, "noCheck"]; - }, - }, - { - name: "noEmit", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_files_from_a_compilation, - transpileOptionValue: undefined, - defaultValueDescription: false, - }, { name: "importHelpers", type: "boolean", diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index 6213b9f63d0d2..041676f25412e 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -1535,7 +1535,11 @@ function getUpToDateStatusWorker(state: SolutionBuilde }; } - if ((buildInfo as IncrementalBuildInfo | NonIncrementalBuildInfo).errors) { + if ( + !project.options.noCheck && + ((buildInfo as IncrementalBuildInfo | NonIncrementalBuildInfo).errors || // TODO: syntax errors???? + (buildInfo as IncrementalBuildInfo | NonIncrementalBuildInfo).checkPending) + ) { return { type: UpToDateStatusType.OutOfDateBuildInfoWithErrors, buildInfoFile: buildInfoPath, @@ -1545,8 +1549,9 @@ function getUpToDateStatusWorker(state: SolutionBuilde if (incrementalBuildInfo) { // If there are errors, we need to build project again to report it if ( - incrementalBuildInfo.semanticDiagnosticsPerFile?.length || - (!project.options.noEmit && getEmitDeclarations(project.options) && incrementalBuildInfo.emitDiagnosticsPerFile?.length) + !project.options.noCheck && + (incrementalBuildInfo.semanticDiagnosticsPerFile?.length || + (!project.options.noEmit && getEmitDeclarations(project.options) && incrementalBuildInfo.emitDiagnosticsPerFile?.length)) ) { return { type: UpToDateStatusType.OutOfDateBuildInfoWithErrors, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b61399a687f6c..a09d84164d19d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -10108,13 +10108,35 @@ export interface HostWithIsSourceOfProjectReferenceRedirect { isSourceOfProjectReferenceRedirect(fileName: string): boolean; } /** @internal */ -export function skipTypeChecking(sourceFile: SourceFile, options: CompilerOptions, host: HostWithIsSourceOfProjectReferenceRedirect) { +export function skipTypeChecking( + sourceFile: SourceFile, + options: CompilerOptions, + host: HostWithIsSourceOfProjectReferenceRedirect, +) { + return skipTypeCheckingWorker(sourceFile, options, host, /*ignoreNoCheck*/ false); +} + +/** @internal */ +export function skipTypeCheckingIgnoringNoCheck( + sourceFile: SourceFile, + options: CompilerOptions, + host: HostWithIsSourceOfProjectReferenceRedirect, +) { + return skipTypeCheckingWorker(sourceFile, options, host, /*ignoreNoCheck*/ true); +} + +function skipTypeCheckingWorker( + sourceFile: SourceFile, + options: CompilerOptions, + host: HostWithIsSourceOfProjectReferenceRedirect, + ignoreNoCheck: boolean, +) { // If skipLibCheck is enabled, skip reporting errors if file is a declaration file. // If skipDefaultLibCheck is enabled, skip reporting errors if file contains a // '/// ' directive. return (options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib) || - options.noCheck || + (!ignoreNoCheck && options.noCheck) || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options); } diff --git a/src/testRunner/tests.ts b/src/testRunner/tests.ts index af34d74a1ac66..329649891df3f 100644 --- a/src/testRunner/tests.ts +++ b/src/testRunner/tests.ts @@ -122,6 +122,7 @@ export * from "./unittests/tsc/incremental.js"; export * from "./unittests/tsc/libraryResolution.js"; export * from "./unittests/tsc/listFilesOnly.js"; export * from "./unittests/tsc/moduleResolution.js"; +export * from "./unittests/tsc/noCheck.js"; export * from "./unittests/tsc/noEmit.js"; export * from "./unittests/tsc/noEmitOnError.js"; export * from "./unittests/tsc/projectReferences.js"; diff --git a/src/testRunner/unittests/helpers/noCheck.ts b/src/testRunner/unittests/helpers/noCheck.ts new file mode 100644 index 0000000000000..edf9580c57b97 --- /dev/null +++ b/src/testRunner/unittests/helpers/noCheck.ts @@ -0,0 +1,92 @@ +import { jsonToReadableText } from "../helpers.js"; +import { + noChangeRun, + TestTscEdit, + verifyTsc, +} from "./tsc.js"; +import { loadProjectFromFiles } from "./vfs.js"; + +export function forEachTscScenarioWithNoCheck(buildType: "-b" | "-p") { + const commandLineArgs = buildType === "-b" ? + ["-b", "/src/tsconfig.json", "-v"] : + ["-p", "/src/tsconfig.json"]; + + function forEachNoCheckScenarioWorker( + subScenario: string, + aText: string, + ) { + const checkNoChangeRun: TestTscEdit = { + ...noChangeRun, + caption: "No Change run with checking", + commandLineArgs, + }; + const noCheckFixError: TestTscEdit = { + caption: "Fix `a` error with noCheck", + edit: fs => fs.writeFileSync("/src/a.ts", `export const a = "hello";`), + }; + const noCheckError: TestTscEdit = { + caption: "Introduce error with noCheck", + edit: fs => fs.writeFileSync("/src/a.ts", aText), + }; + const noChangeRunWithCheckPendingDiscrepancy: TestTscEdit = { + ...noChangeRun, + discrepancyExplanation: () => [ + "Clean build will have check pending since it didnt type check", + "Incremental build has typechecked before this so wont have checkPending", + ], + }; + + [undefined, true].forEach(incremental => { + [{}, { module: "amd", outFile: "../outFile.js" }].forEach(options => { + verifyTsc({ + scenario: "noCheck", + subScenario: `${options.outFile ? "outFile" : "multiFile"}/${subScenario}${incremental ? " with incremental" : ""}`, + fs: () => + loadProjectFromFiles({ + "/src/a.ts": aText, + "/src/b.ts": `export const b = 10;`, + "/src/tsconfig.json": jsonToReadableText({ + compilerOptions: { + declaration: true, + incremental, + ...options, + }, + }), + }), + commandLineArgs: [...commandLineArgs, "--noCheck"], + edits: [ + noChangeRun, // Should be no op + noCheckFixError, // Fix error with noCheck + noChangeRun, // Should be no op + checkNoChangeRun, // Check errors - should not report any errors - update buildInfo + checkNoChangeRun, // Should be no op + incremental || buildType === "-b" ? + noChangeRunWithCheckPendingDiscrepancy : // Should be no op + noChangeRun, // Should be no op + noCheckError, + noChangeRun, // Should be no op + checkNoChangeRun, // Should check errors and update buildInfo + noCheckFixError, // Fix error with noCheck + checkNoChangeRun, // Should check errors and update buildInfo + { + caption: "Add file with error", + edit: fs => fs.writeFileSync("/src/c.ts", `export const c: number = "hello";`), + commandLineArgs, + }, + noCheckError, + noCheckFixError, + checkNoChangeRun, + incremental || buildType === "-b" ? + noChangeRunWithCheckPendingDiscrepancy : // Should be no op + noChangeRun, // Should be no op + checkNoChangeRun, // Should be no op + ], + baselinePrograms: true, + }); + }); + }); + } + forEachNoCheckScenarioWorker("syntax errors", `export const a = "hello`); + forEachNoCheckScenarioWorker("semantic errors", `export const a: number = "hello";`); + forEachNoCheckScenarioWorker("dts errors", `export const a = class { private p = 10; };`); +} diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index ffd54c7ac2f94..92ae893bb50db 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -352,31 +352,69 @@ function verifyTscEditDiscrepancies({ } } } - if ((incrementalReadableBuildInfo as ReadableIncrementalBuildInfo)?.emitDiagnosticsPerFile) { - (incrementalReadableBuildInfo as ReadableIncrementalBuildInfo).emitDiagnosticsPerFile!.forEach(([actualFileOrArray]) => { - const actualFile = ts.isString(actualFileOrArray) ? actualFileOrArray : actualFileOrArray[0]; - if ( - // Does not have emit diagnostics in clean buildInfo - !ts.find( - (cleanReadableBuildInfo as ReadableIncrementalBuildInfo).emitDiagnosticsPerFile, - ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), - ) && - // Is not marked as affectedFilesPendingEmit in clean buildInfo - (!ts.find( - (cleanReadableBuildInfo as ReadableIncrementalMultiFileEmitBuildInfo).affectedFilesPendingEmit, - ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), - )) && - // Program emit is not pending in clean buildInfo - !(cleanReadableBuildInfo as ReadableIncrementalBundleEmitBuildInfo).pendingEmit - ) { - addBaseline( - `Incremental build contains ${actualFile} file has errors, clean build does not have errors or does not mark is as pending emit: ${outputFile}::`, - `Incremental buildInfoText:: ${incrementalBuildText}`, - `Clean buildInfoText:: ${cleanBuildText}`, - ); - } - }); - } + const readableIncrementalBuildInfo = incrementalReadableBuildInfo as ReadableIncrementalBuildInfo | undefined; + const readableCleanBuildInfo = cleanReadableBuildInfo as ReadableIncrementalBuildInfo | undefined; + readableIncrementalBuildInfo?.semanticDiagnosticsPerFile?.forEach(( + [actualFile, notCachedORDiagnostics], + ) => { + const cleanFileDiagnostics = ts.find( + readableCleanBuildInfo?.semanticDiagnosticsPerFile, + ([expectedFile]) => actualFile === expectedFile, + ); + // Incremental build should have same diagnostics as clean build + if (cleanFileDiagnostics && JSON.stringify(notCachedORDiagnostics) === JSON.stringify(cleanFileDiagnostics[1])) return; + // Otherwise marked as "not Cached" in clean build with errors in incremental build is ok + if ( + ts.isString(cleanFileDiagnostics?.[1]) && + !ts.isString(notCachedORDiagnostics) + ) return; + addBaseline( + `Incremental build contains ${actualFile} file ${!ts.isString(notCachedORDiagnostics) ? "has" : "does not have"} semantic errors, it does not match with clean build: ${outputFile}::`, + `Incremental buildInfoText:: ${incrementalBuildText}`, + `Clean buildInfoText:: ${cleanBuildText}`, + ); + }); + readableCleanBuildInfo?.semanticDiagnosticsPerFile?.forEach(( + [expectedFile, cleanFileDiagnostics], + ) => { + if ( + // if there are errors in the file + !ts.isString(cleanFileDiagnostics?.[1]) && + // and its not already verified, its issue with the error caching + !ts.find( + readableIncrementalBuildInfo?.semanticDiagnosticsPerFile, + ([actualFile]) => actualFile === expectedFile, + ) + ) { + addBaseline( + `Incremental build does not contain ${expectedFile} file for semantic errors, clean build has semantic errors: ${outputFile}::`, + `Incremental buildInfoText:: ${incrementalBuildText}`, + `Clean buildInfoText:: ${cleanBuildText}`, + ); + } + }); + readableIncrementalBuildInfo?.emitDiagnosticsPerFile?.forEach(([actualFile]) => { + if ( + // Does not have emit diagnostics in clean buildInfo + !ts.find( + readableCleanBuildInfo!.emitDiagnosticsPerFile, + ([expectedFile]) => actualFile === expectedFile, + ) && + // Is not marked as affectedFilesPendingEmit in clean buildInfo + (!ts.find( + (readableCleanBuildInfo as ReadableIncrementalMultiFileEmitBuildInfo).affectedFilesPendingEmit, + ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), + )) && + // Program emit is not pending in clean buildInfo + !(readableCleanBuildInfo as ReadableIncrementalBundleEmitBuildInfo).pendingEmit + ) { + addBaseline( + `Incremental build contains ${actualFile} file has emit errors, clean build does not have errors or does not mark is as pending emit: ${outputFile}::`, + `Incremental buildInfoText:: ${incrementalBuildText}`, + `Clean buildInfoText:: ${cleanBuildText}`, + ); + } + }); } } if (!headerAdded && discrepancyExplanation) addBaseline("*** Supplied discrepancy explanation but didnt find any difference"); @@ -462,11 +500,15 @@ function getBuildInfoForIncrementalCorrectnessCheck(text: string | undefined): { fileIdsList: undefined, fileInfos: sanitizedFileInfos, // Ignore noEmit since that shouldnt be reason to emit the tsbuild info and presence of it in the buildinfo file does not matter - options: readableBuildInfo.options ? { ...readableBuildInfo.options, noEmit: undefined } : undefined, + options: readableBuildInfo.options && { + ...readableBuildInfo.options, + noEmit: undefined, + }, affectedFilesPendingEmit: undefined, pendingEmit: undefined, emitDiagnosticsPerFile: undefined, latestChangedDtsFile: readableBuildInfo.latestChangedDtsFile ? "FakeFileName" : undefined, + semanticDiagnosticsPerFile: undefined, } : undefined), size: undefined, // Size doesnt need to be equal }), diff --git a/src/testRunner/unittests/tsbuild/noCheck.ts b/src/testRunner/unittests/tsbuild/noCheck.ts index 9cfef3a03ae23..50aa4da9202c9 100644 --- a/src/testRunner/unittests/tsbuild/noCheck.ts +++ b/src/testRunner/unittests/tsbuild/noCheck.ts @@ -1,86 +1,5 @@ -import { - CommandLineOption, - optionDeclarations, -} from "../../_namespaces/ts.js"; -import { jsonToReadableText } from "../helpers.js"; -import { - noChangeRun, - verifyTsc, -} from "../helpers/tsc.js"; -import { loadProjectFromFiles } from "../helpers/vfs.js"; +import { forEachTscScenarioWithNoCheck } from "../helpers/noCheck.js"; -function verifyNoCheckFlag(variant: string) { - function verifyNoCheckWorker(subScenario: string, declAText: string, commandLineArgs: readonly string[]) { - verifyTsc({ - scenario: variant, - subScenario, - fs: () => - loadProjectFromFiles({ - "/src/a.ts": getATsContent(declAText), - "/src/tsconfig.json": jsonToReadableText({ - compilerOptions: { noCheck: true, emitDeclarationOnly: true, declaration: true }, - }), - }), - commandLineArgs, - edits: [ - noChangeRun, - { - caption: "Fix `a` error", - edit: fs => fs.writeFileSync("/src/a.ts", getATsContent(`const a = "hello"`)), - }, - noChangeRun, - { - caption: "Disable noCheck", - edit: fs => - fs.writeFileSync( - "/src/tsconfig.json", - jsonToReadableText({ - compilerOptions: { emitDeclarationOnly: true, declaration: true }, - }), - ), - }, - noChangeRun, - ], - baselinePrograms: true, - }); - - function getATsContent(declAText: string) { - return `const err: number = "error"; -${declAText}`; - } - } - - function verifyNoCheck(subScenario: string, aTsContent: string) { - verifyNoCheckWorker(subScenario, aTsContent, ["--b", "/src/tsconfig.json", "-v"]); - verifyNoCheckWorker(`${subScenario} with incremental`, aTsContent, ["--b", "/src/tsconfig.json", "-v", "--incremental"]); - } - - verifyNoCheck("syntax errors", `const a = "hello`); - verifyNoCheck("semantic errors", `const a: number = "hello"`); -} - -describe("unittests:: tsbuild:: noCheck", () => { - // Enable the `noCheck` option on the CLI for testing purposes, to ensure it works with incremental/build - let validate: CommandLineOption["extraValidation"]; - before(() => { - for (const opt of optionDeclarations) { - if (opt.name === "noCheck") { - validate = opt.extraValidation; - opt.extraValidation = () => undefined; - } - } - }); - after(() => { - for (const opt of optionDeclarations) { - if (opt.name === "noCheck") { - opt.extraValidation = validate; - } - } - }); - - verifyNoCheckFlag("noCheck"); -}); - -describe("unittests:: tsbuild:: noCheck:: errors", () => { - verifyNoCheckFlag("noCheck-errors"); +describe("unittests:: tsbuild:: noCheck::", () => { + forEachTscScenarioWithNoCheck("-b"); }); diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts index d1d8a270e7e9c..34c16d3197c25 100644 --- a/src/testRunner/unittests/tsc/incremental.ts +++ b/src/testRunner/unittests/tsc/incremental.ts @@ -261,10 +261,6 @@ declare global { { caption: "Delete output for class3", edit: fs => fs.unlinkSync("/src/projects/project1/class3.d.ts"), - discrepancyExplanation: () => [ - "Ts buildinfo will be updated but will retain lib file errors from previous build and not others because they are emitted because of change which results in clearing their semantic diagnostics cache", - "But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo", - ], }, { caption: "Create output for class3", diff --git a/src/testRunner/unittests/tsc/noCheck.ts b/src/testRunner/unittests/tsc/noCheck.ts new file mode 100644 index 0000000000000..d69925817b905 --- /dev/null +++ b/src/testRunner/unittests/tsc/noCheck.ts @@ -0,0 +1,5 @@ +import { forEachTscScenarioWithNoCheck } from "../helpers/noCheck.js"; + +describe("unittests:: tsc:: noCheck::", () => { + forEachTscScenarioWithNoCheck("-p"); +}); diff --git a/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json index 8bb6097f80145..4c3a3cb096410 100644 --- a/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json index 8bb6097f80145..4c3a3cb096410 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json index 8bb6097f80145..4c3a3cb096410 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json index b3d05912583d9..edb7ea2b9b349 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 558f4243438d2..e01c1d7bb35dc 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 5679f8b921cdf..e0614bfc14e17 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json index 535e6a2d97860..ef17a1a4dcfb2 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index da587b6bded7f..015e6dc8a3c76 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 8bb6097f80145..4c3a3cb096410 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index a6e74d92a6a8f..b153779e49c2b 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json index 41c2964e0e7fa..9120ea674fb57 100644 --- a/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -54,10 +54,10 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noCheck/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noCheck/tsconfig.json index cd727e8ccdc88..e115e386cb6e9 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noCheck/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noCheck/tsconfig.json @@ -1,3 +1,5 @@ { - "compilerOptions": {} + "compilerOptions": { + "noCheck": true + } } diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js index 6b88d6ee7c768..7b9419fb86308 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -148,32 +148,6 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -225,31 +199,5 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js index 457fa28d607a0..172f5b38b4fbd 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -147,32 +147,6 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -223,32 +197,6 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } 6:: local change @@ -304,32 +252,6 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -380,31 +302,5 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "./e.ts", - "not cached" - ], - [ - "../../project1/src/a.d.ts", - "not cached" - ], - [ - "./f.ts", - "not cached" - ], - [ - "../../project1/src/b.d.ts", - "not cached" - ], - [ - "./g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js index 68585019a6970..991c15d3b09f0 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -93,28 +93,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -145,27 +123,5 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js index 96de70c500116..b9e6f8072ae58 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -92,28 +92,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -143,28 +121,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } 6:: local change @@ -199,28 +155,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -250,27 +184,5 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/outfile.d.ts", - "not cached" - ], - [ - "./src/e.ts", - "not cached" - ], - [ - "./src/f.ts", - "not cached" - ], - [ - "./src/g.ts", - "not cached" - ] - ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js deleted file mode 100644 index 36ab139a99eba..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js +++ /dev/null @@ -1,472 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a: number = "hello" - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -2 const a: number = "hello" -   ~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 3 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a: number; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"9312413704-const err: number = \"error\";\nconst a: number = \"hello\"","signature":"-22763377875-declare const err: number;\ndeclare const a: number;\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."},{"start":35,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", - "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", - "affectsGlobalScope": true - }, - "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", - "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - }, - { - "start": 35, - "length": 1, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion", - "size": 1089 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -2 const a: number = "hello" -   ~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 3 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/src/a.ts (computed .d.ts) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion", - "size": 970 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js deleted file mode 100644 index f8dc65820ea76..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js +++ /dev/null @@ -1,387 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a: number = "hello" - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -2 const a: number = "hello" -   ~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 3 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a: number; - - -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "errors": true, - "version": "FakeTSVersion", - "size": 59 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -2 const a: number = "hello" -   ~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 3 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js deleted file mode 100644 index e03962a88aac7..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js +++ /dev/null @@ -1,445 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a = "hello - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[1,2],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "../lib/lib.d.ts", - "not cached" - ], - [ - "./a.ts", - "not cached" - ] - ], - "version": "FakeTSVersion", - "size": 852 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -No shapes updated in the builder:: - - - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/src/a.ts (computed .d.ts) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion", - "size": 970 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js deleted file mode 100644 index d2d88eb69b0ed..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js +++ /dev/null @@ -1,369 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a = "hello - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "errors": true, - "version": "FakeTSVersion", - "size": 59 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - - -Found 2 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-discrepancies.js new file mode 100644 index 0000000000000..68bcc68eb7eda --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js new file mode 100644 index 0000000000000..2f6f44ae81f6f --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js @@ -0,0 +1,1566 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-9502176711-export const a = class { private p = 10; };" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1007 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1207 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1154 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1460 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js new file mode 100644 index 0000000000000..950a2216c968b --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js @@ -0,0 +1,1043 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 88 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file changed its modified time +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 88 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file changed its modified time +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 68 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file changed its modified time +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 97 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 83 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-discrepancies.js new file mode 100644 index 0000000000000..68bcc68eb7eda --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..000ede0aa7fb8 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors-with-incremental.js @@ -0,0 +1,1477 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 899 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[2,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 994 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1148 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors.js new file mode 100644 index 0000000000000..cd34d3f2fb69d --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/semantic-errors.js @@ -0,0 +1,915 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 68 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 83 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-discrepancies.js new file mode 100644 index 0000000000000..68bcc68eb7eda --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..85f585dcf114a --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors-with-incremental.js @@ -0,0 +1,1508 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 892 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 888 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "version": "FakeTSVersion", + "size": 868 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1141 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors.js new file mode 100644 index 0000000000000..ffe291abc8afe --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/syntax-errors.js @@ -0,0 +1,979 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 88 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 88 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 68 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 74 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts" + ], + "version": "FakeTSVersion", + "size": 54 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 97 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 83 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts","./b.ts","./c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts", + "./b.ts", + "./c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 77 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) +/src/c.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-discrepancies.js new file mode 100644 index 0000000000000..07790cfdd8563 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js new file mode 100644 index 0000000000000..182e55c469099 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js @@ -0,0 +1,1437 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 943 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 943 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 886 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1010 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js new file mode 100644 index 0000000000000..0943e3419535b --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js @@ -0,0 +1,1069 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 96 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.d.ts' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file changed its modified time +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 96 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file changed its modified time +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 76 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file changed its modified time +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 109 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 95 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-discrepancies.js new file mode 100644 index 0000000000000..07790cfdd8563 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..d9bdf4d0876b1 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors-with-incremental.js @@ -0,0 +1,1323 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 763 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 763 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[2,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 858 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 830 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors.js new file mode 100644 index 0000000000000..0e39f17b242fa --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/semantic-errors.js @@ -0,0 +1,923 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 76 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 95 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-discrepancies.js new file mode 100644 index 0000000000000..07790cfdd8563 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-discrepancies.js @@ -0,0 +1,45 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..4e166f4382a2e --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors-with-incremental.js @@ -0,0 +1,1380 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 752 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 752 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "version": "FakeTSVersion", + "size": 732 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 819 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors.js new file mode 100644 index 0000000000000..c7f3dc7925e1e --- /dev/null +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/syntax-errors.js @@ -0,0 +1,1008 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 96 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/b.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 96 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 76 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 82 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/c.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "checkPending": true, + "version": "FakeTSVersion", + "size": 109 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "noCheck": true, + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 95 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts","./src/b.ts","./src/c.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 89 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v --noCheck +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'outFile.js' + +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -b /src/tsconfig.json -v +[HH:MM:SS AM] Projects in this build: + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/src/tsconfig.json'... + +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "tscBuild": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] file written with same contents +//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js deleted file mode 100644 index 1c0fc9d140535..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js +++ /dev/null @@ -1,398 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a: number = "hello" - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a: number; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"9312413704-const err: number = \"error\";\nconst a: number = \"hello\"","signature":"-22763377875-declare const err: number;\ndeclare const a: number;\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", - "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", - "affectsGlobalScope": true - }, - "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", - "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion", - "size": 838 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' - -exitCode:: ExitStatus.Success - - - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/src/a.ts - -Shape signatures in builder refreshed for:: -/src/a.ts (computed .d.ts) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion", - "size": 834 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' - -exitCode:: ExitStatus.Success - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/tsconfig.json' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -No shapes updated in the builder:: - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion", - "size": 970 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - diff --git a/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js deleted file mode 100644 index e1ae89b9e9f35..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js +++ /dev/null @@ -1,285 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a: number = "hello" - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a: number; - - -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "version": "FakeTSVersion", - "size": 45 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.d.ts' - -exitCode:: ExitStatus.Success - - - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.d.ts' - -exitCode:: ExitStatus.Success - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/a.d.ts' is older than input 'src/tsconfig.json' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "errors": true, - "version": "FakeTSVersion", - "size": 59 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js deleted file mode 100644 index 8c53c97a6152e..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js +++ /dev/null @@ -1,440 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a = "hello - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"semanticDiagnosticsPerFile":[1,2],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "semanticDiagnosticsPerFile": [ - [ - "../lib/lib.d.ts", - "not cached" - ], - [ - "./a.ts", - "not cached" - ] - ], - "version": "FakeTSVersion", - "size": 867 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -No shapes updated in the builder:: - - - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/src/a.ts (computed .d.ts) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion", - "size": 834 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' - -exitCode:: ExitStatus.Success - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/tsconfig.json' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -No shapes updated in the builder:: - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion", - "size": 970 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v --incremental -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "incremental": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: - - diff --git a/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js deleted file mode 100644 index 9c9d99d929691..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js +++ /dev/null @@ -1,331 +0,0 @@ -currentDirectory:: / useCaseSensitiveFileNames: false -Input:: -//// [/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } -interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - -//// [/src/a.ts] -const err: number = "error"; -const a = "hello - -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "errors": true, - "version": "FakeTSVersion", - "size": 59 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:2:17 - error TS1002: Unterminated string literal. - -2 const a = "hello -    - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -No cached semantic diagnostics in the builder:: - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents - - -Change:: Fix `a` error -Input:: -//// [/src/a.ts] -const err: number = "error"; -const a = "hello" - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success -Program root files: [ - "/src/a.ts" -] -Program options: { - "noCheck": true, - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "version": "FakeTSVersion", - "size": 45 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/a.d.ts' - -exitCode:: ExitStatus.Success - - - - -Change:: Disable noCheck -Input:: -//// [/src/tsconfig.json] -{ - "compilerOptions": { - "emitDeclarationOnly": true, - "declaration": true - } -} - - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/a.d.ts' is older than input 'src/tsconfig.json' - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] -{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "root": [ - "./a.ts" - ], - "errors": true, - "version": "FakeTSVersion", - "size": 59 -} - - - -Change:: no-change-run -Input:: - - -Output:: -/lib/tsc --b /src/tsconfig.json -v -[HH:MM:SS AM] Projects in this build: - * src/tsconfig.json - -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project '/src/tsconfig.json'... - -src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. - -1 const err: number = "error"; -   ~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -Program root files: [ - "/src/a.ts" -] -Program options: { - "emitDeclarationOnly": true, - "declaration": true, - "tscBuild": true, - "configFilePath": "/src/tsconfig.json" -} -Program structureReused: Not -Program files:: -/lib/lib.d.ts -/src/a.ts - -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts - -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts during emit) - - -//// [/src/a.d.ts] file written with same contents -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js index 81bf4cf9e0eee..fb6b1b945396a 100644 --- a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js +++ b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js @@ -28,20 +28,6 @@ CleanBuild: "composite": true, "module": 0 }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/class1.d.ts", - "not cached" - ], - [ - "./class2.ts", - "not cached" - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -74,90 +60,4 @@ IncrementalBuild: "latestChangedDtsFile": "FakeFileName", "errors": true, "version": "FakeTSVersion" -} -3:: Delete output for class3 -Ts buildinfo will be updated but will retain lib file errors from previous build and not others because they are emitted because of change which results in clearing their semantic diagnostics cache -But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo -TsBuild info text without affectedFilesPendingEmit:: /src/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "fileInfos": { - "../../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../project1/class1.d.ts": { - "version": "-3469237238-declare class class1 {}", - "affectsGlobalScope": true - }, - "./class2.ts": { - "version": "777969115-class class2 {}", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 3, - "./class2.ts" - ] - ], - "options": { - "composite": true, - "module": 0 - }, - "semanticDiagnosticsPerFile": [ - [ - "../../../lib/lib.d.ts", - "not cached" - ], - [ - "../project1/class1.d.ts", - "not cached" - ], - [ - "./class2.ts", - "not cached" - ] - ], - "latestChangedDtsFile": "FakeFileName", - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "fileInfos": { - "../../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../project1/class1.d.ts": { - "version": "-3469237238-declare class class1 {}", - "affectsGlobalScope": true - }, - "./class2.ts": { - "version": "777969115-class class2 {}", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 3, - "./class2.ts" - ] - ], - "options": { - "composite": true, - "module": 0 - }, - "semanticDiagnosticsPerFile": [ - [ - "../project1/class1.d.ts", - "not cached" - ], - [ - "./class2.ts", - "not cached" - ] - ], - "latestChangedDtsFile": "FakeFileName", - "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js new file mode 100644 index 0000000000000..64b3ac7202b89 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js @@ -0,0 +1,1590 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-9502176711-export const a = class { private p = 10; };" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1007 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1207 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1154 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "version": "-9502176711-export const a = class { private p = 10; };", + "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1460 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js new file mode 100644 index 0000000000000..dedde28258462 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js @@ -0,0 +1,739 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; +}()); + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..cd489f67e805b --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors-with-incremental.js @@ -0,0 +1,1485 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 899 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[2,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 994 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11705693502-export const a: number = \"hello\";","signature":"-3045186137-export declare const a: number;\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "version": "-11705693502-export const a: number = \"hello\";", + "signature": "-3045186137-export declare const a: number;\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1148 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors.js b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors.js new file mode 100644 index 0000000000000..5ec62cd78dbe4 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/semantic-errors.js @@ -0,0 +1,675 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] +export declare const a: number; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..d0b98e51e30c9 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental-discrepancies.js @@ -0,0 +1,138 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16641552193-export const a = \"hello\";" + }, + "./b.ts": { + "version": "-13368947479-export const b = 10;" + }, + "./c.ts": { + "version": "-9150421116-export const c: number = \"hello\";" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..6ba0dc278841c --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors-with-incremental.js @@ -0,0 +1,1532 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +/src/b.ts (computed .d.ts during emit) + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 892 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ], + [ + "./b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 895 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 888 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "version": "FakeTSVersion", + "size": 868 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 891 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "version": "FakeTSVersion", + "size": 838 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/c.ts + +Shape signatures in builder refreshed for:: +/src/c.ts (computed .d.ts) + + +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14000546910-export const a = \"hello","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-14000546910-export const a = \"hello", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1141 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + "not cached" + ], + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1144 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/src/a.ts + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-16641552193-export const a = \"hello\";","signature":"-2692717255-export declare const a = \"hello\";\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "version": "-16641552193-export const a = \"hello\";", + "signature": "-2692717255-export declare const a = \"hello\";\n" + }, + "./b.ts": { + "original": { + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-13368947479-export const b = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + }, + "version": "-9150421116-export const c: number = \"hello\";", + "signature": "1429704745-export declare const c: number;\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 1122 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors.js b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors.js new file mode 100644 index 0000000000000..dfd65dfb33fad --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/multiFile/syntax-errors.js @@ -0,0 +1,730 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] +export declare const a = "hello"; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] +export declare const b = 10; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] +export declare const c: number; + + +//// [/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = "hello"; + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + + +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/src/a.d.ts] file written with same contents +//// [/src/a.js] file written with same contents +//// [/src/b.d.ts] file written with same contents +//// [/src/b.js] file written with same contents +//// [/src/c.d.ts] file written with same contents +//// [/src/c.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js new file mode 100644 index 0000000000000..847da3c02eef1 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js @@ -0,0 +1,1472 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 943 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 943 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 886 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-9502176711-export const a = class { private p = 10; };", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "emitDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 1010 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js new file mode 100644 index 0000000000000..cb3011eb46f5b --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js @@ -0,0 +1,807 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = class { private p = 10; }; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = class { private p = 10; }; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = /** @class */ (function () { + function class_1() { + this.p = 10; + } + return class_1; + }()); +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..6b6b8e7c6b040 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors-with-incremental.js @@ -0,0 +1,1342 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 763 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 763 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[2,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/a.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 858 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-11705693502-export const a: number = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-11705693502-export const a: number = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 830 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors.js b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors.js new file mode 100644 index 0000000000000..1fc5b8719b46d --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/semantic-errors.js @@ -0,0 +1,722 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a: number = "hello"; + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello"; +   ~ + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a: number; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..444750d82fc39 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental-discrepancies.js @@ -0,0 +1,114 @@ +5:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} +15:: no-change-run +Clean build will have check pending since it didnt type check +Incremental build has typechecked before this so wont have checkPending +TsBuild info text without affectedFilesPendingEmit:: /outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "checkPending": true, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..28fe71ecec3bc --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors-with-incremental.js @@ -0,0 +1,1415 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 752 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 752 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "version": "FakeTSVersion", + "size": 732 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 755 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;" + }, + "root": [ + [ + 2, + "./src/a.ts" + ], + [ + 3, + "./src/b.ts" + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "version": "FakeTSVersion", + "size": 698 +} + + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-14000546910-export const a = \"hello","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-14000546910-export const a = \"hello", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 819 +} + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"checkPending":true,"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./lib/lib.d.ts", + "not cached" + ], + [ + "./src/a.ts", + "not cached" + ], + [ + "./src/b.ts", + "not cached" + ], + [ + "./src/c.ts", + "not cached" + ] + ], + "checkPending": true, + "version": "FakeTSVersion", + "size": 822 +} + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +No shapes updated in the builder:: + + +//// [/outFile.tsbuildinfo] +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-16641552193-export const a = \"hello\";","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "./lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/a.ts": "-16641552193-export const a = \"hello\";", + "./src/b.ts": "-13368947479-export const b = 10;", + "./src/c.ts": "-9150421116-export const c: number = \"hello\";" + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "semanticDiagnosticsPerFile": [ + [ + "./src/c.ts", + [ + { + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 915 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "incremental": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors.js b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors.js new file mode 100644 index 0000000000000..98244aae76ad5 --- /dev/null +++ b/tests/baselines/reference/tsc/noCheck/outFile/syntax-errors.js @@ -0,0 +1,798 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export const a = "hello + +//// [/src/b.ts] +export const b = 10; + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "declaration": true, + "module": "amd", + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: Add file with error +Input:: +//// [/src/c.ts] +export const c: number = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] +declare module "a" { + export const a = "hello"; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c: number; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: Introduce error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +src/a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +    + + +Found 1 error in src/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: Fix `a` error with noCheck +Input:: +//// [/src/a.ts] +export const a = "hello"; + + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = "hello"; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; +}); +define("c", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = "hello"; +}); + + + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json --noCheck +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "noCheck": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents + + +Change:: No Change run with checking +Input:: + + +Output:: +/lib/tsc -p /src/tsconfig.json +src/c.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const c: number = "hello"; +   ~ + + +Found 1 error in src/c.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/a.ts", + "/src/b.ts", + "/src/c.ts" +] +Program options: { + "declaration": true, + "module": 2, + "outFile": "/outFile.js", + "project": "/src/tsconfig.json", + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts +/src/b.ts +/src/c.ts + + +//// [/outFile.d.ts] file written with same contents +//// [/outFile.js] file written with same contents diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/changes-composite-discrepancies.js b/tests/baselines/reference/tsc/noEmit/multiFile/changes-composite-discrepancies.js index 087c9b33baf37..426adc8e2ccf9 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/changes-composite-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/changes-composite-discrepancies.js @@ -59,21 +59,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -141,21 +126,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -220,21 +190,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -302,21 +257,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -381,65 +321,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -507,65 +388,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ [ "./src/class.ts", @@ -644,21 +466,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -726,21 +533,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -805,21 +597,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -887,21 +664,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -966,65 +728,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -1092,65 +795,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -1215,65 +859,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -1341,65 +926,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -1464,21 +990,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -1546,21 +1057,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ [ "./src/class.ts", @@ -1639,21 +1135,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -1721,21 +1202,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } @@ -1800,21 +1266,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -1882,21 +1333,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/changes-with-initial-noEmit-composite-discrepancies.js b/tests/baselines/reference/tsc/noEmit/multiFile/changes-with-initial-noEmit-composite-discrepancies.js index 39494b851d50b..b7a1a680cd675 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/changes-with-initial-noEmit-composite-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/changes-with-initial-noEmit-composite-discrepancies.js @@ -59,21 +59,6 @@ CleanBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ "./src/class.ts", "./src/indirectclass.ts", @@ -141,21 +126,6 @@ IncrementalBuild: "./src/indirectclass.ts" ] }, - "semanticDiagnosticsPerFile": [ - [ - "./src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "emitSignatures": [ [ "./src/class.ts", diff --git a/tests/baselines/reference/tsc/noEmit/outFile/changes-composite-discrepancies.js b/tests/baselines/reference/tsc/noEmit/outFile/changes-composite-discrepancies.js index 32b7049b83f00..c9ab001058334 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/changes-composite-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/changes-composite-discrepancies.js @@ -34,21 +34,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -83,21 +68,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -138,21 +108,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -187,21 +142,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -242,65 +182,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -335,65 +216,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -434,21 +256,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -483,21 +290,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -538,21 +330,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -587,21 +364,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -642,65 +404,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -735,65 +438,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "-1966987419-declare module \"src/class\" {\n export class classC {\n prop1: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -834,65 +478,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -927,65 +512,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/directuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/indirectuse.ts", - [ - { - "start": 76, - "length": 4, - "code": 2551, - "category": 1, - "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", - "relatedInformation": [ - { - "file": "./project/src/class.ts", - "start": 26, - "length": 5, - "messageText": "'prop1' is declared here.", - "category": 3, - "code": 2728 - } - ] - } - ] - ], - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "-1966987419-declare module \"src/class\" {\n export class classC {\n prop1: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -1026,21 +552,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -1075,21 +586,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "-1966987419-declare module \"src/class\" {\n export class classC {\n prop1: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -1130,21 +626,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -1179,21 +660,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" @@ -1234,21 +700,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -1283,21 +734,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "8998999540-declare module \"src/class\" {\n export class classC {\n prop: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" diff --git a/tests/baselines/reference/tsc/noEmit/outFile/changes-with-initial-noEmit-composite-discrepancies.js b/tests/baselines/reference/tsc/noEmit/outFile/changes-with-initial-noEmit-composite-discrepancies.js index 0910dba6e257e..f85d03c164736 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/changes-with-initial-noEmit-composite-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/changes-with-initial-noEmit-composite-discrepancies.js @@ -34,21 +34,6 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -83,21 +68,6 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/src/nochangefilewithemitspecificerror.ts", - [ - { - "start": 18, - "length": 18, - "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", - "category": 1, - "code": 2396, - "skippedOn": "noEmit" - } - ] - ] - ], "outSignature": "-1966987419-declare module \"src/class\" {\n export class classC {\n prop1: number;\n }\n}\ndeclare module \"src/indirectClass\" {\n import { classC } from \"src/class\";\n export class indirectClass {\n classC: classC;\n }\n}\ndeclare module \"src/directUse\" { }\ndeclare module \"src/indirectUse\" { }\ndeclare module \"src/noChangeFile\" {\n export function writeLog(s: string): void;\n}\ndeclare function someFunc(arguments: boolean, ...rest: any[]): void;\n", "latestChangedDtsFile": "FakeFileName", "version": "FakeTSVersion" diff --git a/tests/baselines/reference/tsc/noEmitOnError/multiFile/when-declarationMap-changes-discrepancies.js b/tests/baselines/reference/tsc/noEmitOnError/multiFile/when-declarationMap-changes-discrepancies.js index 80615be1ab89d..1bae2c118b130 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/multiFile/when-declarationMap-changes-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmitOnError/multiFile/when-declarationMap-changes-discrepancies.js @@ -35,20 +35,6 @@ CleanBuild: "declarationMap": true, "noEmitOnError": true }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 1, - "code": 2322, - "category": 1, - "messageText": "Type '10' is not assignable to type '20'." - } - ] - ] - ], "emitSignatures": [ "./a.ts", "./b.ts" @@ -87,20 +73,6 @@ IncrementalBuild: "declarationMap": true, "noEmitOnError": true }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 1, - "code": 2322, - "category": 1, - "messageText": "Type '10' is not assignable to type '20'." - } - ] - ] - ], "emitSignatures": [ [ "./a.ts", diff --git a/tests/baselines/reference/tsc/noEmitOnError/outFile/when-declarationMap-changes-discrepancies.js b/tests/baselines/reference/tsc/noEmitOnError/outFile/when-declarationMap-changes-discrepancies.js index a77ba033886e6..2a1bff0f270bb 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/outFile/when-declarationMap-changes-discrepancies.js +++ b/tests/baselines/reference/tsc/noEmitOnError/outFile/when-declarationMap-changes-discrepancies.js @@ -26,20 +26,6 @@ CleanBuild: "noEmitOnError": true, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/a.ts", - [ - { - "start": 6, - "length": 1, - "code": 2322, - "category": 1, - "messageText": "Type '10' is not assignable to type '20'." - } - ] - ] - ], "version": "FakeTSVersion" } IncrementalBuild: @@ -66,20 +52,6 @@ IncrementalBuild: "noEmitOnError": true, "outFile": "./outFile.js" }, - "semanticDiagnosticsPerFile": [ - [ - "./project/a.ts", - [ - { - "start": 6, - "length": 1, - "code": 2322, - "category": 1, - "messageText": "Type '10' is not assignable to type '20'." - } - ] - ] - ], "outSignature": [ "-2781996726-declare const x = 10;\ndeclare const y = 10;\n" ], diff --git a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js index d28cc6ec21030..bafc6105409ac 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js @@ -99,6 +99,11 @@ Create source map files for emitted JavaScript files. type: boolean default: false +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext @@ -140,11 +145,6 @@ Disable emitting comments. type: boolean default: false ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - --strict Enable all strict type-checking options. type: boolean diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js index d52e6ac3d9037..5d298153e39e7 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js @@ -99,6 +99,11 @@ Create source map files for emitted JavaScript files. type: boolean default: false +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext @@ -140,11 +145,6 @@ Disable emitting comments. type: boolean default: false ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - --strict Enable all strict type-checking options. type: boolean diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index d52e6ac3d9037..5d298153e39e7 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -99,6 +99,11 @@ Create source map files for emitted JavaScript files. type: boolean default: false +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext @@ -140,11 +145,6 @@ Disable emitting comments. type: boolean default: false ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - --strict Enable all strict type-checking options. type: boolean