diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index d50b37b100c..a5750544d3a 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -882,36 +882,36 @@ namespace ts { oldProgram = undefined; oldState = undefined; - const result = createRedirectedBuilderProgram(state, configFileParsingDiagnostics); - result.getState = () => state; - result.backupState = () => { + const builderProgram = createRedirectedBuilderProgram(state, configFileParsingDiagnostics); + builderProgram.getState = () => state; + builderProgram.backupState = () => { Debug.assert(backupState === undefined); backupState = cloneBuilderProgramState(state); }; - result.restoreState = () => { + builderProgram.restoreState = () => { state = Debug.assertDefined(backupState); backupState = undefined; }; - result.getAllDependencies = sourceFile => BuilderState.getAllDependencies(state, Debug.assertDefined(state.program), sourceFile); - result.getSemanticDiagnostics = getSemanticDiagnostics; - result.emit = emit; - result.releaseProgram = () => { + builderProgram.getAllDependencies = sourceFile => BuilderState.getAllDependencies(state, Debug.assertDefined(state.program), sourceFile); + builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; + builderProgram.emit = emit; + builderProgram.releaseProgram = () => { releaseCache(state); backupState = undefined; }; if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) { - (result as SemanticDiagnosticsBuilderProgram).getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; + (builderProgram as SemanticDiagnosticsBuilderProgram).getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; } else if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { - (result as EmitAndSemanticDiagnosticsBuilderProgram).getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; - (result as EmitAndSemanticDiagnosticsBuilderProgram).emitNextAffectedFile = emitNextAffectedFile; + (builderProgram as EmitAndSemanticDiagnosticsBuilderProgram).getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; + (builderProgram as EmitAndSemanticDiagnosticsBuilderProgram).emitNextAffectedFile = emitNextAffectedFile; } else { notImplemented(); } - return result; + return builderProgram; /** * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete @@ -987,6 +987,8 @@ namespace ts { function emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult { if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile); + const result = handleNoEmitOptions(builderProgram, targetSourceFile, cancellationToken); + if (result) return result; if (!targetSourceFile) { // Emit and report any errors we ran into. let sourceMaps: SourceMapEmitResult[] = []; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 20cdec30cb0..22b0ee708e0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2881,7 +2881,11 @@ namespace ts { } const type = getTypeOfSymbol(exportEquals); - return type.flags & TypeFlags.Primitive ? undefined : getPropertyOfType(type, memberName); + return type.flags & TypeFlags.Primitive || + getObjectFlags(type) & ObjectFlags.Class || + isArrayOrTupleLikeType(type) + ? undefined + : getPropertyOfType(type, memberName); } function getExportsOfSymbol(symbol: Symbol): SymbolTable { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 7f252e86cfe..847a85ec9f3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1570,37 +1570,9 @@ namespace ts { } function emitWorker(program: Program, sourceFile: SourceFile | undefined, writeFileCallback: WriteFileCallback | undefined, cancellationToken: CancellationToken | undefined, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers, forceDtsEmit?: boolean): EmitResult { - let declarationDiagnostics: readonly Diagnostic[] = []; - if (!forceDtsEmit) { - if (options.noEmit) { - return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true }; - } - - // If the noEmitOnError flag is set, then check if we have any errors so far. If so, - // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we - // get any preEmit diagnostics, not just the ones - if (options.noEmitOnError) { - const diagnostics = [ - ...program.getOptionsDiagnostics(cancellationToken), - ...program.getSyntacticDiagnostics(sourceFile, cancellationToken), - ...program.getGlobalDiagnostics(cancellationToken), - ...program.getSemanticDiagnostics(sourceFile, cancellationToken) - ]; - - if (diagnostics.length === 0 && getEmitDeclarations(program.getCompilerOptions())) { - declarationDiagnostics = program.getDeclarationDiagnostics(/*sourceFile*/ undefined, cancellationToken); - } - - if (diagnostics.length > 0 || declarationDiagnostics.length > 0) { - return { - diagnostics: concatenate(diagnostics, declarationDiagnostics), - sourceMaps: undefined, - emittedFiles: undefined, - emitSkipped: true - }; - } - } + const result = handleNoEmitOptions(program, sourceFile, cancellationToken); + if (result) return result; } // Create the emit resolver outside of the "emitTime" tracking code below. That way @@ -3442,6 +3414,33 @@ namespace ts { } } + /*@internal*/ + export function handleNoEmitOptions(program: ProgramToEmitFilesAndReportErrors, sourceFile: SourceFile | undefined, cancellationToken: CancellationToken | undefined): EmitResult | undefined { + const options = program.getCompilerOptions(); + if (options.noEmit) { + return { diagnostics: emptyArray, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true }; + } + + // If the noEmitOnError flag is set, then check if we have any errors so far. If so, + // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we + // get any preEmit diagnostics, not just the ones + if (!options.noEmitOnError) return undefined; + let diagnostics: readonly Diagnostic[] = [ + ...program.getOptionsDiagnostics(cancellationToken), + ...program.getSyntacticDiagnostics(sourceFile, cancellationToken), + ...program.getGlobalDiagnostics(cancellationToken), + ...program.getSemanticDiagnostics(sourceFile, cancellationToken) + ]; + + if (diagnostics.length === 0 && getEmitDeclarations(program.getCompilerOptions())) { + diagnostics = program.getDeclarationDiagnostics(/*sourceFile*/ undefined, cancellationToken); + } + + return diagnostics.length > 0 ? + { diagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true } : + undefined; + } + /*@internal*/ interface CompilerHostLike { useCaseSensitiveFileNames(): boolean; diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 24d9463f968..40669728984 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -124,6 +124,7 @@ namespace ts { getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; + getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; getConfigFileParsingDiagnostics(): readonly Diagnostic[]; emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; } @@ -152,20 +153,20 @@ namespace ts { const isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; // First get and report any syntactic errors. - const diagnostics = program.getConfigFileParsingDiagnostics().slice(); - const configFileParsingDiagnosticsLength = diagnostics.length; - addRange(diagnostics, program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + const allDiagnostics = program.getConfigFileParsingDiagnostics().slice(); + const configFileParsingDiagnosticsLength = allDiagnostics.length; + addRange(allDiagnostics, program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); // If we didn't have any syntactic errors, then also try getting the global and // semantic errors. - if (diagnostics.length === configFileParsingDiagnosticsLength) { - addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); + if (allDiagnostics.length === configFileParsingDiagnosticsLength) { + addRange(allDiagnostics, program.getOptionsDiagnostics(cancellationToken)); if (!isListFilesOnly) { - addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); + addRange(allDiagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (diagnostics.length === configFileParsingDiagnosticsLength) { - addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); + if (allDiagnostics.length === configFileParsingDiagnosticsLength) { + addRange(allDiagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); } } } @@ -175,9 +176,10 @@ namespace ts { ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); const { emittedFiles, diagnostics: emitDiagnostics } = emitResult; - addRange(diagnostics, emitDiagnostics); + addRange(allDiagnostics, emitDiagnostics); - sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); + const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics); + diagnostics.forEach(reportDiagnostic); if (writeFileName) { const currentDir = program.getCurrentDirectory(); forEach(emittedFiles, file => { diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index f413341dcc7..c0894d42804 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -2553,7 +2553,7 @@ namespace FourSlash { * Rerieves a codefix satisfying the parameters, or undefined if no such codefix is found. * @param fileName Path to file where error should be retrieved from. */ - private getCodeFixes(fileName: string, errorCode?: number, preferences: ts.UserPreferences = ts.emptyOptions): readonly ts.CodeFixAction[] { + private getCodeFixes(fileName: string, errorCode?: number, preferences: ts.UserPreferences = ts.emptyOptions, position?: number): readonly ts.CodeFixAction[] { const diagnosticsForCodeFix = this.getDiagnostics(fileName, /*includeSuggestions*/ true).map(diagnostic => ({ start: diagnostic.start, length: diagnostic.length, @@ -2564,7 +2564,12 @@ namespace FourSlash { if (errorCode !== undefined && errorCode !== diagnostic.code) { return; } - + if (position !== undefined && diagnostic.start !== undefined && diagnostic.length !== undefined) { + const span = ts.createTextRangeFromSpan({ start: diagnostic.start, length: diagnostic.length }); + if (!ts.textRangeContainsPositionInclusive(span, position)) { + return; + } + } return this.languageService.getCodeFixesAtPosition(fileName, diagnostic.start!, diagnostic.start! + diagnostic.length!, [diagnostic.code], this.formatCodeSettings, preferences); }); } @@ -2614,6 +2619,23 @@ namespace FourSlash { }); } + public verifyImportFixModuleSpecifiers(markerName: string, moduleSpecifiers: string[]) { + const marker = this.getMarkerByName(markerName); + const codeFixes = this.getCodeFixes(marker.fileName, ts.Diagnostics.Cannot_find_name_0.code, { + includeCompletionsForModuleExports: true, + includeCompletionsWithInsertText: true + }, marker.position).filter(f => f.fixId === ts.codefix.importFixId); + + const actualModuleSpecifiers = ts.mapDefined(codeFixes, fix => { + return ts.forEach(ts.flatMap(fix.changes, c => c.textChanges), c => { + const match = /(?:from |require\()(['"])((?:(?!\1).)*)\1/.exec(c.newText); + return match?.[2]; + }); + }); + + assert.deepEqual(actualModuleSpecifiers, moduleSpecifiers); + } + public verifyDocCommentTemplate(expected: ts.TextInsertion | undefined) { const name = "verifyDocCommentTemplate"; const actual = this.languageService.getDocCommentTemplateAtPosition(this.activeFile.fileName, this.currentCaretPosition)!; diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 5e7ba4cd844..3ff3bef3006 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -434,6 +434,10 @@ namespace FourSlashInterface { this.state.verifyImportFixAtPosition(expectedTextArray, errorCode, preferences); } + public importFixModuleSpecifiers(marker: string, moduleSpecifiers: string[]) { + this.state.verifyImportFixModuleSpecifiers(marker, moduleSpecifiers); + } + public navigationBar(json: any, options?: { checkSpans?: boolean }) { this.state.verifyNavigationBar(json, options); } diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 72e9f9aa3f3..2cadfc7ccc5 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -118,6 +118,7 @@ "unittests/tsbuild/lateBoundSymbol.ts", "unittests/tsbuild/missingExtendedFile.ts", "unittests/tsbuild/moduleSpecifiers.ts", + "unittests/tsbuild/noEmitOnError.ts", "unittests/tsbuild/outFile.ts", "unittests/tsbuild/referencesWithRootDirInParent.ts", "unittests/tsbuild/resolveJsonModule.ts", diff --git a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts index 09821d76e5e..487671dfae1 100644 --- a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts +++ b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts @@ -4,7 +4,7 @@ namespace ts { verifyTsc({ scenario: "exitCodeOnBogusFile", subScenario: `test exit code`, - fs: () => loadProjectFromFiles({}, symbolLibContent), + fs: () => loadProjectFromFiles({}), commandLineArgs: ["-b", "bogus.json"] }); }); diff --git a/src/testRunner/unittests/tsbuild/noEmitOnError.ts b/src/testRunner/unittests/tsbuild/noEmitOnError.ts new file mode 100644 index 00000000000..54241d936b8 --- /dev/null +++ b/src/testRunner/unittests/tsbuild/noEmitOnError.ts @@ -0,0 +1,17 @@ +namespace ts { + describe("unittests:: tsbuild - with noEmitOnError", () => { + let projFs: vfs.FileSystem; + before(() => { + projFs = loadProjectFromDisk("tests/projects/noEmitOnError"); + }); + after(() => { + projFs = undefined!; + }); + verifyTsc({ + scenario: "noEmitOnError", + subScenario: "has empty files diagnostic when files is empty and no references are provided", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json"], + }); + }); +} diff --git a/src/testRunner/unittests/tsbuild/watchMode.ts b/src/testRunner/unittests/tsbuild/watchMode.ts index 9e3a0eb9388..0fa907cf11d 100644 --- a/src/testRunner/unittests/tsbuild/watchMode.ts +++ b/src/testRunner/unittests/tsbuild/watchMode.ts @@ -1389,4 +1389,45 @@ ${coreFiles[1].content}`); ); } }); + + describe("unittests:: tsbuild:: watchMode:: with noEmitOnError", () => { + it("does not emit any files on error", () => { + const projectLocation = `${projectsLocation}/noEmitOnError`; + const host = createTsBuildWatchSystem([ + ...["tsconfig.json", "shared/types/db.ts", "src/main.ts", "src/other.ts"] + .map(f => getFileFromProject("noEmitOnError", f)), + { path: libFile.path, content: libContent } + ], { currentDirectory: projectLocation }); + createSolutionBuilderWithWatch(host, ["tsconfig.json"], { verbose: true, watch: true }); + checkOutputErrorsInitial(host, [ + `src/main.ts(4,1): error TS1005: ',' expected.\n`, + ], /*disableConsoleClears*/ undefined, [ + `Projects in this build: \r\n * tsconfig.json\n\n`, + `Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist\n\n`, + `Building project '/user/username/projects/noEmitOnError/tsconfig.json'...\n\n`, + ]); + assert.equal(host.writtenFiles.size, 0, `Expected not to write any files: ${arrayFrom(host.writtenFiles.keys())}`); + + // Make changes + host.writeFile(`${projectLocation}/src/main.ts`, `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`); + host.writtenFiles.clear(); + host.checkTimeoutQueueLengthAndRun(1); // build project + host.checkTimeoutQueueLength(0); + checkOutputErrorsIncremental(host, emptyArray, /*disableConsoleClears*/ undefined, /*logsBeforeWatchDiagnostics*/ undefined, [ + `Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist\n\n`, + `Building project '/user/username/projects/noEmitOnError/tsconfig.json'...\n\n`, + ]); + assert.equal(host.writtenFiles.size, 3, `Expected to write 3 files: Actual:: ${arrayFrom(host.writtenFiles.keys())}`); + for (const f of [ + `${projectLocation}/dev-build/shared/types/db.js`, + `${projectLocation}/dev-build/src/main.js`, + `${projectLocation}/dev-build/src/other.js`, + ]) { + assert.isTrue(host.writtenFiles.has(f.toLowerCase()), `Expected to write file: ${f}:: Actual:: ${arrayFrom(host.writtenFiles.keys())}`); + } + }); + }); } diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts index 9075bfb777f..862e5cdf6b4 100644 --- a/src/testRunner/unittests/tsc/incremental.ts +++ b/src/testRunner/unittests/tsc/incremental.ts @@ -72,5 +72,21 @@ namespace ts { commandLineArgs: ["--p", "src/project"], incrementalScenarios: [noChangeRun] }); + + verifyTscIncrementalEdits({ + scenario: "incremental", + subScenario: "with noEmitOnError", + fs: () => loadProjectFromDisk("tests/projects/noEmitOnError"), + commandLineArgs: ["--incremental", "-p", "src"], + incrementalScenarios: [ + { + buildKind: BuildKind.IncrementalDtsUnchanged, + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`, "utf-8") + } + ] + }); }); } diff --git a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts index 0de8e8e1948..e30c654075f 100644 --- a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts +++ b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts @@ -392,5 +392,47 @@ export class Data2 { verifyTransitiveExports(lib2Data, lib2Data2); }); }); + + it("with noEmitOnError", () => { + const projectLocation = `${TestFSWithWatch.tsbuildProjectsLocation}/noEmitOnError`; + const allFiles = ["tsconfig.json", "shared/types/db.ts", "src/main.ts", "src/other.ts"] + .map(f => TestFSWithWatch.getTsBuildProjectFile("noEmitOnError", f)); + const host = TestFSWithWatch.changeToHostTrackingWrittenFiles( + createWatchedSystem( + [...allFiles, { path: libFile.path, content: libContent }], + { currentDirectory: projectLocation } + ) + ); + const watch = createWatchOfConfigFile("tsconfig.json", host); + const mainFile = allFiles.find(f => f.path === `${projectLocation}/src/main.ts`)!; + checkOutputErrorsInitial(host, [ + getDiagnosticOfFileFromProgram( + watch(), + mainFile.path, + mainFile.content.lastIndexOf(";"), + 1, + Diagnostics._0_expected, + "," + ) + ]); + assert.equal(host.writtenFiles.size, 0, `Expected not to write any files: ${arrayFrom(host.writtenFiles.keys())}`); + + // Make changes + host.writeFile(mainFile.path, `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`); + host.writtenFiles.clear(); + host.checkTimeoutQueueLengthAndRun(1); // build project + checkOutputErrorsIncremental(host, emptyArray); + assert.equal(host.writtenFiles.size, 3, `Expected to write 3 files: Actual:: ${arrayFrom(host.writtenFiles.keys())}`); + for (const f of [ + `${projectLocation}/dev-build/shared/types/db.js`, + `${projectLocation}/dev-build/src/main.js`, + `${projectLocation}/dev-build/src/other.js`, + ]) { + assert.isTrue(host.writtenFiles.has(f.toLowerCase()), `Expected to write file: ${f}:: Actual:: ${arrayFrom(host.writtenFiles.keys())}`); + } + }); }); } diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index 0b02e66fed4..2bd9e512759 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - +Standard output: + Rush Multi-Project Build Tool 5.X.X - https://rushjs.io Node.js version is 12.13.1 (LTS) Starting "rush rebuild" @@ -12,6 +12,7 @@ XX of XX: [@azure/logger] completed successfully in ? seconds XX of XX: [@azure/core-http] completed successfully in ? seconds XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds XX of XX: [@azure/identity] completed successfully in ? seconds +XX of XX: [@azure/core-amqp] completed successfully in ? seconds XX of XX: [@azure/core-lro] completed successfully in ? seconds XX of XX: [@azure/core-paging] completed successfully in ? seconds XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds @@ -20,7 +21,7 @@ XX of XX: [@azure/event-processor-host] completed successfully in ? seconds XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds XX of XX: [@azure/storage-blob] completed successfully in ? seconds -XX of XX: [@azure/core-amqp] completed successfully in ? seconds +XX of XX: [@azure/cognitiveservices-textanalytics] completed successfully in ? seconds XX of XX: [@azure/core-arm] completed successfully in ? seconds dist-esm/index.js → dist/index.js... (!) Unresolved dependencies @@ -53,7 +54,7 @@ XX of XX: [@azure/storage-file-share] completed successfully in ? seconds XX of XX: [@azure/storage-queue] completed successfully in ? seconds XX of XX: [@azure/template] completed successfully in ? seconds XX of XX: [testhub] completed successfully in ? seconds -SUCCESS (22) +SUCCESS (23) ================================ @azure/abort-controller (? seconds) @azure/core-tracing (? seconds) @@ -62,6 +63,7 @@ SUCCESS (22) @azure/core-http (? seconds) @azure/core-asynciterator-polyfill (? seconds) @azure/identity (? seconds) +@azure/core-amqp (? seconds) @azure/core-lro (? seconds) @azure/core-paging (? seconds) @azure/test-utils-recorder (? seconds) @@ -70,7 +72,7 @@ SUCCESS (22) @azure/keyvault-keys (? seconds) @azure/keyvault-secrets (? seconds) @azure/storage-blob (? seconds) -@azure/core-amqp (? seconds) +@azure/cognitiveservices-textanalytics (? seconds) @azure/core-arm (? seconds) @azure/service-bus (? seconds) @azure/storage-file-share (? seconds) @@ -102,7 +104,7 @@ samples/listRevisions.ts(43,32): error TS2322: Type 'PagedAsyncIterableIterator< Types of property 'next' are incompatible. Type '() => Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type '(value?: any) => Promise>'. Type 'Promise<{ done?: boolean | undefined; value: ConfigurationSetting; }>' is not assignable to type 'Promise>'. -test/testHelpers.ts(73,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. +test/testHelpers.ts(74,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. Types of property '[Symbol.asyncIterator]' are incompatible. Type '() => PagedAsyncIterableIterator' is not assignable to type '() => AsyncIterator'. Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterator'. @@ -113,7 +115,7 @@ test/testHelpers.ts(73,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. +test/testHelpers.ts(92,31): error TS2322: Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterable'. Types of property '[Symbol.asyncIterator]' are incompatible. Type '() => PagedAsyncIterableIterator' is not assignable to type '() => AsyncIterator'. Type 'PagedAsyncIterableIterator' is not assignable to type 'AsyncIterator'. @@ -160,8 +162,8 @@ rush rebuild - Errors! ( ? seconds) - Standard error: - +Standard error: + XX of XX: [@azure/app-configuration] failed to build! XX of XX: [@azure/cosmos] completed with warnings in ? seconds XX of XX: [@azure/eventhubs-checkpointstore-blob] failed to build! diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 96a7a538778..44329307829 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - @uifabric/build: yarn run vX.X.X +Standard output: +@uifabric/build: yarn run vX.X.X @uifabric/build: $ node ./just-scripts.js no-op @uifabric/build: Done in ?s. @uifabric/example-data: yarn run vX.X.X @@ -144,7 +144,6 @@ Exit Code: 1 @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts -@uifabric/merge-styles: PASS src/fontFace.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X @@ -190,10 +189,10 @@ Exit Code: 1 @uifabric/utilities: PASS src/selection/Selection.test.ts @uifabric/utilities: PASS src/initializeFocusRects.test.ts @uifabric/utilities: PASS src/memoize.test.ts +@uifabric/utilities: PASS src/rtl.test.ts @uifabric/utilities: PASS src/osDetector.test.ts @uifabric/utilities: PASS src/mobileDetector.test.ts @uifabric/utilities: PASS src/aria.test.ts -@uifabric/utilities: PASS src/rtl.test.ts @uifabric/utilities: PASS src/setFocusVisibility.test.ts @uifabric/utilities: PASS src/properties.test.ts @uifabric/utilities: PASS src/asAsync.test.tsx @@ -215,8 +214,8 @@ Exit Code: 1 - Standard error: - info cli using local version of lerna +Standard error: +info cli using local version of lerna lerna notice cli vX.X.X lerna info Executing command in 42 packages: "yarn run build" @uifabric/example-data: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index b2da3fcb86d..3d7f87e22e7 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - yarn run vX.X.X +Standard output: +yarn run vX.X.X $ gulp compile --max_old_space_size=4095 [XX:XX:XX] Node flags detected: --max_old_space_size=4095 [XX:XX:XX] Using gulpfile /vscode/gulpfile.js @@ -8,6 +8,20 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(230,3): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(536,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts(520,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(592,3): Type 'string | null' is not assignable to type 'string'. @@ -31,20 +45,6 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(280,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(536,4): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/splitview/paneview.ts(233,3): Type 'string | null' is not assignable to type 'string'. @@ -70,6 +70,20 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts(230,3): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(536,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts(520,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts(592,3): Type 'string | null' is not assignable to type 'string'. @@ -93,20 +107,6 @@ $ gulp compile --max_old_space_size=4095 Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts(280,5): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts(536,4): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts(646,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts(413,4): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts(191,5): Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(280,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/feedback/browser/feedback.ts(285,5): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts(70,3): Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -[XX:XX:XX] Error: /vscode/src/vs/workbench/contrib/debug/browser/debugHover.ts(110,5): Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts(414,4): Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. [XX:XX:XX] Error: /vscode/src/vs/base/browser/ui/splitview/paneview.ts(233,3): Type 'string | null' is not assignable to type 'string'. @@ -132,8 +132,8 @@ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm - Standard error: - [XX:XX:XX] 'compile' errored after +Standard error: +[XX:XX:XX] 'compile' errored after [XX:XX:XX] Error: Found 32 errors at Stream. (/vscode/build/lib/reporter.js:74:29) at _end (/vscode/node_modules/through/index.js:65:9) diff --git a/tests/baselines/reference/docker/xterm.js.log b/tests/baselines/reference/docker/xterm.js.log index dac009b05f2..7fa6b68dfe8 100644 --- a/tests/baselines/reference/docker/xterm.js.log +++ b/tests/baselines/reference/docker/xterm.js.log @@ -1,6 +1,6 @@ Exit Code: 2 - Standard output: - +Standard output: + > xterm@X.X.X build /xtermjs > tsc -b ./tsconfig.all.json node_modules/@types/ws/index.d.ts(44,39): error TS2694: Namespace '"url"' has no exported member 'URL'. @@ -18,8 +18,8 @@ node_modules/@types/ws/index.d.ts(45,39): error TS2694: Namespace '"url"' has no - Standard error: - npm ERR! code ELIFECYCLE +Standard error: +npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! xterm@X.X.X build: `tsc -b ./tsconfig.all.json` npm ERR! Exit status 2 diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js new file mode 100644 index 00000000000..4d20cea86d6 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js @@ -0,0 +1,6 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tsconfig.json +src/src/main.ts(4,1): error TS1005: ',' expected. +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + diff --git a/tests/baselines/reference/tsc/incremental/incremental-declaration-doesnt-change/with-noEmitOnError.js b/tests/baselines/reference/tsc/incremental/incremental-declaration-doesnt-change/with-noEmitOnError.js new file mode 100644 index 00000000000..95c27619b6a --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/incremental-declaration-doesnt-change/with-noEmitOnError.js @@ -0,0 +1,72 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --incremental -p src +exitCode:: ExitStatus.Success + + +//// [/src/dev-build/shared/types/db.js] +"use strict"; +exports.__esModule = true; + + +//// [/src/dev-build/src/main.js] +"use strict"; +exports.__esModule = true; +var a = { + lastName: 'sdsd' +}; + + +//// [/src/dev-build/src/other.js] +console.log("hi"); + + +//// [/src/dev-build/tsconfig.tsbuildinfo] +{ + "program": { + "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; };", + "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; };" + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-6245214333-export interface A {\r\n name: string;\r\n}\r\n" + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-4882119183-export {};\r\n" + }, + "../src/other.ts": { + "version": "7719445449-console.log(\"hi\");", + "signature": "5381-" + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "incremental": true, + "project": "..", + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/src/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + diff --git a/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError.js b/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError.js new file mode 100644 index 00000000000..508078898ab --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError.js @@ -0,0 +1,6 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --incremental -p src +src/src/main.ts(4,1): error TS1005: ',' expected. +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + diff --git a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log index e7490f93fd8..4350a591814 100644 --- a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log +++ b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log @@ -1,11 +1,10 @@ Exit Code: 1 - Standard output: - node_modules/@types/react-native/index.d.ts(3425,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. +Standard output: +node_modules/@types/react-native/index.d.ts(3425,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. node_modules/@types/react-native/index.d.ts(3438,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'. node_modules/@types/react/index.d.ts(387,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/TypeScript-Vue-Starter.log b/tests/baselines/reference/user/TypeScript-Vue-Starter.log index 0d05453d78c..99bf7df534e 100644 --- a/tests/baselines/reference/user/TypeScript-Vue-Starter.log +++ b/tests/baselines/reference/user/TypeScript-Vue-Starter.log @@ -1,10 +1,9 @@ Exit Code: 1 - Standard output: - src/components/Hello.spec.ts(4,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. +Standard output: +src/components/Hello.spec.ts(4,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. src/components/Hello.spec.ts(5,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. src/components/Hello.spec.ts(14,5): error TS2304: Cannot find name 'expect'. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log index 1cbaeabcbdc..825eae70a53 100644 --- a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log +++ b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - src/App.test.tsx(5,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. +Standard output: +src/App.test.tsx(5,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. src/components/Hello.test.tsx(5,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. src/components/Hello.test.tsx(7,3): error TS2304: Cannot find name 'expect'. src/components/Hello.test.tsx(10,1): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. @@ -14,5 +14,4 @@ src/components/Hello.test.tsx(27,3): error TS2304: Cannot find name 'expect'. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/acorn.log b/tests/baselines/reference/user/acorn.log index bd98e45a4c2..8fcab4831f5 100644 --- a/tests/baselines/reference/user/acorn.log +++ b/tests/baselines/reference/user/acorn.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/acorn/bin/_acorn.js(51,30): error TS2339: Property 'getToken' does not exist on type 'Parser'. +Standard output: +node_modules/acorn/bin/_acorn.js(51,30): error TS2339: Property 'getToken' does not exist on type 'Parser'. node_modules/acorn/bin/_acorn.js(59,30): error TS2769: No overload matches this call. Overload 1 of 2, '(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string', gave the following error. Argument of type 'null' is not assignable to parameter of type '((this: any, key: string, value: any) => any) | undefined'. @@ -173,5 +173,4 @@ node_modules/acorn/dist/walk.js(161,41): error TS2339: Property 'node' does not - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index 595b40e0790..443cfcb5ffd 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/adonis-framework/lib/util.js(24,13): error TS2304: Cannot find name 'Mixed'. +Standard output: +node_modules/adonis-framework/lib/util.js(24,13): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/providers/ConfigProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. node_modules/adonis-framework/providers/EncryptionProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. node_modules/adonis-framework/providers/EnvProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. @@ -230,5 +230,4 @@ node_modules/adonis-framework/src/View/services.js(34,22): error TS2339: Propert - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/assert.log b/tests/baselines/reference/user/assert.log index 7b93864a27b..ce8e6cc19d0 100644 --- a/tests/baselines/reference/user/assert.log +++ b/tests/baselines/reference/user/assert.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/assert/test.js(25,5): error TS2367: This condition will always return 'false' since the types 'string | undefined' and 'boolean' have no overlap. +Standard output: +node_modules/assert/test.js(25,5): error TS2367: This condition will always return 'false' since the types 'string | undefined' and 'boolean' have no overlap. node_modules/assert/test.js(39,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. node_modules/assert/test.js(55,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. node_modules/assert/test.js(74,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. @@ -32,5 +32,4 @@ node_modules/assert/test.js(346,5): error TS2552: Cannot find name 'test'. Did y - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/async.log b/tests/baselines/reference/user/async.log index 7ecc320be33..33f04aa115a 100644 --- a/tests/baselines/reference/user/async.log +++ b/tests/baselines/reference/user/async.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/async/all.js(32,12): error TS2304: Cannot find name 'AsyncFunction'. +Standard output: +node_modules/async/all.js(32,12): error TS2304: Cannot find name 'AsyncFunction'. node_modules/async/all.js(49,20): error TS2695: Left side of comma operator is unused and has no side effects. node_modules/async/all.js(49,46): error TS2695: Left side of comma operator is unused and has no side effects. node_modules/async/allLimit.js(33,12): error TS2304: Cannot find name 'AsyncFunction'. @@ -675,5 +675,4 @@ node_modules/async/wrapSync.js(103,10): error TS2695: Left side of comma operato - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/axios-src.log b/tests/baselines/reference/user/axios-src.log index 314074b80af..dd75a7d1b97 100644 --- a/tests/baselines/reference/user/axios-src.log +++ b/tests/baselines/reference/user/axios-src.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - lib/adapters/http.js(13,19): error TS2732: Cannot find module './../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension +Standard output: +lib/adapters/http.js(13,19): error TS2732: Cannot find module './../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension lib/adapters/http.js(84,22): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. lib/adapters/http.js(124,17): error TS2531: Object is possibly 'null'. @@ -50,5 +50,4 @@ lib/utils.js(282,20): error TS8029: JSDoc '@param' tag has name 'obj1', but ther - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/bcryptjs.log b/tests/baselines/reference/user/bcryptjs.log index ce8a59b8301..8de313b8b3f 100644 --- a/tests/baselines/reference/user/bcryptjs.log +++ b/tests/baselines/reference/user/bcryptjs.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript'. +Standard output: +node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript'. node_modules/bcryptjs/scripts/build.js(32,1): error TS2741: Property 'ISAAC' is missing in type '{ VERSION: any; }' but required in type '{ VERSION: any; ISAAC: boolean; }'. node_modules/bcryptjs/src/bcrypt.js(25,13): error TS2740: Type 'Buffer' is missing the following properties from type 'number[]': pop, push, concat, shift, and 5 more. node_modules/bcryptjs/src/bcrypt.js(94,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. @@ -33,5 +33,4 @@ node_modules/bcryptjs/tests/suite.js(3,23): error TS2307: Cannot find module 'bc - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/bluebird.log b/tests/baselines/reference/user/bluebird.log index d20f7dfb6fb..7d9348c9d40 100644 --- a/tests/baselines/reference/user/bluebird.log +++ b/tests/baselines/reference/user/bluebird.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/bluebird/js/release/assert.js(11,30): error TS2339: Property 'constructor$' does not exist on type 'Error'. +Standard output: +node_modules/bluebird/js/release/assert.js(11,30): error TS2339: Property 'constructor$' does not exist on type 'Error'. node_modules/bluebird/js/release/bluebird.js(5,15): error TS2367: This condition will always return 'false' since the types 'PromiseConstructor' and 'typeof Promise' have no overlap. node_modules/bluebird/js/release/bluebird.js(10,10): error TS2339: Property 'noConflict' does not exist on type 'typeof Promise'. node_modules/bluebird/js/release/debuggability.js(225,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'event' must be of type 'CustomEvent', but here has type 'Event'. @@ -161,5 +161,4 @@ node_modules/bluebird/js/release/util.js(405,54): error TS2532: Object is possib - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index d4ecec0c663..fa10910d039 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - ../../../../built/local/lib.es5.d.ts(1433,11): error TS2300: Duplicate identifier 'ArrayLike'. +Standard output: +../../../../built/local/lib.es5.d.ts(1433,11): error TS2300: Duplicate identifier 'ArrayLike'. ../../../../node_modules/@types/node/globals.d.ts(235,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{}', but here has type 'NodeModule'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(77,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -12884,5 +12884,4 @@ node_modules/chrome-devtools-frontend/front_end/workspace_diff/WorkspaceDiff.js( - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/clone.log b/tests/baselines/reference/user/clone.log index 31d907b9b25..1aa3a2c2fe5 100644 --- a/tests/baselines/reference/user/clone.log +++ b/tests/baselines/reference/user/clone.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/clone/clone.js(167,16): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'. +Standard output: +node_modules/clone/clone.js(167,16): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'. node_modules/clone/clone.js(167,23): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. node_modules/clone/clone.js(167,43): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. node_modules/clone/clone.js(176,14): error TS2532: Object is possibly 'undefined'. @@ -10,5 +10,4 @@ node_modules/clone/clone.js(186,52): error TS2356: An arithmetic operand must be - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/create-react-app.log b/tests/baselines/reference/user/create-react-app.log index 73ad5fae9f4..d2ccce82e6a 100644 --- a/tests/baselines/reference/user/create-react-app.log +++ b/tests/baselines/reference/user/create-react-app.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - test/fixtures/issue-5176-flow-class-properties/src/App.js(5,8): error TS8010: Type annotations can only be used in TypeScript files. +Standard output: +test/fixtures/issue-5176-flow-class-properties/src/App.js(5,8): error TS8010: Type annotations can only be used in TypeScript files. test/fixtures/issue-5176-flow-class-properties/src/App.js(5,13): error TS1005: ';' expected. test/fixtures/webpack-message-formatting/src/AppBabel.js(6,8): error TS17008: JSX element 'div' has no corresponding closing tag. test/fixtures/webpack-message-formatting/src/AppBabel.js(8,7): error TS17002: Expected corresponding JSX closing tag for 'span'. @@ -8,5 +8,4 @@ test/fixtures/webpack-message-formatting/src/AppBabel.js(14,1): error TS1005: '< - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/debug.log b/tests/baselines/reference/user/debug.log index 6014580a869..a7985faab5e 100644 --- a/tests/baselines/reference/user/debug.log +++ b/tests/baselines/reference/user/debug.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/debug/dist/debug.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable. +Standard output: +node_modules/debug/dist/debug.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable. node_modules/debug/dist/debug.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable. node_modules/debug/dist/debug.js(8,21): error TS2304: Cannot find name 'define'. node_modules/debug/dist/debug.js(8,46): error TS2304: Cannot find name 'define'. @@ -85,5 +85,4 @@ node_modules/debug/src/node.js(136,3): error TS2322: Type 'string | undefined' i - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/enhanced-resolve.log b/tests/baselines/reference/user/enhanced-resolve.log index d95b46b6898..79fe90add79 100644 --- a/tests/baselines/reference/user/enhanced-resolve.log +++ b/tests/baselines/reference/user/enhanced-resolve.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(127,18): error TS2769: No overload matches this call. +Standard output: +node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(127,18): error TS2769: No overload matches this call. Overload 1 of 2, '(intervalId: Timeout): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'Timeout'. Type 'null' is not assignable to type 'Timeout'. @@ -42,5 +42,4 @@ node_modules/enhanced-resolve/lib/createInnerCallback.js(23,20): error TS2339: P - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/follow-redirects.log b/tests/baselines/reference/user/follow-redirects.log index fa7a6bad786..34010feffeb 100644 --- a/tests/baselines/reference/user/follow-redirects.log +++ b/tests/baselines/reference/user/follow-redirects.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/follow-redirects/index.js(82,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +Standard output: +node_modules/follow-redirects/index.js(82,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. node_modules/follow-redirects/index.js(83,10): error TS2339: Property 'abort' does not exist on type 'RedirectableRequest'. node_modules/follow-redirects/index.js(130,10): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. node_modules/follow-redirects/index.js(133,12): error TS2339: Property 'socket' does not exist on type 'RedirectableRequest'. @@ -16,5 +16,4 @@ node_modules/follow-redirects/index.js(357,10): error TS2339: Property 'emit' do - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/graceful-fs.log b/tests/baselines/reference/user/graceful-fs.log index 2617aa8eaea..1f60574df06 100644 --- a/tests/baselines/reference/user/graceful-fs.log +++ b/tests/baselines/reference/user/graceful-fs.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/graceful-fs/clone.js(12,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'copy' must be of type '{ __proto__: any; }', but here has type 'any'. +Standard output: +node_modules/graceful-fs/clone.js(12,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'copy' must be of type '{ __proto__: any; }', but here has type 'any'. node_modules/graceful-fs/clone.js(15,38): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. @@ -22,5 +22,4 @@ node_modules/graceful-fs/graceful-fs.js(343,11): error TS2554: Expected 0 argume - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/lodash.log b/tests/baselines/reference/user/lodash.log index c37aa3da438..53427da62c4 100644 --- a/tests/baselines/reference/user/lodash.log +++ b/tests/baselines/reference/user/lodash.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/lodash/_Hash.js(20,17): error TS2532: Object is possibly 'undefined'. +Standard output: +node_modules/lodash/_Hash.js(20,17): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_ListCache.js(20,17): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_MapCache.js(20,17): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_SetCache.js(19,14): error TS2532: Object is possibly 'undefined'. @@ -424,5 +424,4 @@ node_modules/lodash/xorBy.js(36,81): error TS2554: Expected 0-1 arguments, but g - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/minimatch.log b/tests/baselines/reference/user/minimatch.log index 80262e31db6..fcddf77d650 100644 --- a/tests/baselines/reference/user/minimatch.log +++ b/tests/baselines/reference/user/minimatch.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/minimatch/minimatch.js(77,17): error TS2551: Property 'minimatch' does not exist on type 'typeof minimatch'. Did you mean 'Minimatch'? +Standard output: +node_modules/minimatch/minimatch.js(77,17): error TS2551: Property 'minimatch' does not exist on type 'typeof minimatch'. Did you mean 'Minimatch'? node_modules/minimatch/minimatch.js(410,15): error TS2532: Object is possibly 'undefined'. node_modules/minimatch/minimatch.js(411,13): error TS2532: Object is possibly 'undefined'. node_modules/minimatch/minimatch.js(414,9): error TS2532: Object is possibly 'undefined'. @@ -33,5 +33,4 @@ node_modules/minimatch/minimatch.js(876,18): error TS2554: Expected 0 arguments, - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/npm.log b/tests/baselines/reference/user/npm.log index 164fa6b0f4d..edbad98f256 100644 --- a/tests/baselines/reference/user/npm.log +++ b/tests/baselines/reference/user/npm.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/npm/bin/npm-cli.js(6,13): error TS2551: Property 'echo' does not exist on type '{ Echo(s: any): void; StdErr: TextStreamWriter; StdOut: TextStreamWriter; Arguments: { length: number; Item(n: number): string; }; ScriptFullName: string; ... 13 more ...; Sleep(intTime: number): void; }'. Did you mean 'Echo'? +Standard output: +node_modules/npm/bin/npm-cli.js(6,13): error TS2551: Property 'echo' does not exist on type '{ Echo(s: any): void; StdErr: TextStreamWriter; StdOut: TextStreamWriter; Arguments: { length: number; Item(n: number): string; }; ScriptFullName: string; ... 13 more ...; Sleep(intTime: number): void; }'. Did you mean 'Echo'? node_modules/npm/bin/npm-cli.js(13,13): error TS2551: Property 'quit' does not exist on type '{ Echo(s: any): void; StdErr: TextStreamWriter; StdOut: TextStreamWriter; Arguments: { length: number; Item(n: number): string; }; ScriptFullName: string; ... 13 more ...; Sleep(intTime: number): void; }'. Did you mean 'Quit'? node_modules/npm/bin/npm-cli.js(47,7): error TS2339: Property 'argv' does not exist on type 'typeof EventEmitter'. node_modules/npm/bin/npm-cli.js(48,11): error TS2339: Property 'deref' does not exist on type 'typeof EventEmitter'. @@ -1811,5 +1811,4 @@ node_modules/npm/test/tap/zz-cleanup.js(2,20): error TS2307: Cannot find module - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/npmlog.log b/tests/baselines/reference/user/npmlog.log index 2a16213ed44..6847693c109 100644 --- a/tests/baselines/reference/user/npmlog.log +++ b/tests/baselines/reference/user/npmlog.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/npmlog/log.js(83,12): error TS2551: Property '_pause' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? +Standard output: +node_modules/npmlog/log.js(83,12): error TS2551: Property '_pause' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(149,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(154,13): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(155,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? @@ -17,5 +17,4 @@ node_modules/npmlog/log.js(271,16): error TS2769: No overload matches this call. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/puppeteer.log b/tests/baselines/reference/user/puppeteer.log index c6f6220c763..5b66eff0fb3 100644 --- a/tests/baselines/reference/user/puppeteer.log +++ b/tests/baselines/reference/user/puppeteer.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - lib/Accessibility.js(134,15): error TS2503: Cannot find namespace 'Protocol'. +Standard output: +lib/Accessibility.js(134,15): error TS2503: Cannot find namespace 'Protocol'. lib/Accessibility.js(344,7): error TS2322: Type 'string | number | boolean' is not assignable to type 'never'. Type 'string' is not assignable to type 'never'. lib/Accessibility.js(367,7): error TS2322: Type 'string | number | true' is not assignable to type 'never'. @@ -87,5 +87,4 @@ lib/helper.js(89,15): error TS2503: Cannot find namespace 'Protocol'. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index c9f6525b23c..ab51c5a35df 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/uglify-js/lib/ast.js(223,38): error TS2554: Expected 0 arguments, but got 1. +Standard output: +node_modules/uglify-js/lib/ast.js(223,38): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/ast.js(905,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'? node_modules/uglify-js/lib/ast.js(906,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. @@ -132,5 +132,4 @@ node_modules/uglify-js/tools/node.js(64,26): error TS2339: Property 'minify' doe - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/url-search-params.log b/tests/baselines/reference/user/url-search-params.log index 7873541b15c..f3d6544ff8d 100644 --- a/tests/baselines/reference/user/url-search-params.log +++ b/tests/baselines/reference/user/url-search-params.log @@ -1,9 +1,8 @@ Exit Code: 1 - Standard output: - node_modules/url-search-params/build/url-search-params.node.js(174,1): error TS2539: Cannot assign to 'URLSearchParams' because it is not a variable. +Standard output: +node_modules/url-search-params/build/url-search-params.node.js(174,1): error TS2539: Cannot assign to 'URLSearchParams' because it is not a variable. node_modules/url-search-params/build/url-search-params.node.js(174,44): error TS2339: Property 'URLSearchParams' does not exist on type 'Global'. - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/util.log b/tests/baselines/reference/user/util.log index 5b9b3244ac9..5ede8516f9d 100644 --- a/tests/baselines/reference/user/util.log +++ b/tests/baselines/reference/user/util.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - node_modules/util/util.js(27,20): error TS2555: Expected at least 2 arguments, but got 1. +Standard output: +node_modules/util/util.js(27,20): error TS2555: Expected at least 2 arguments, but got 1. node_modules/util/util.js(35,45): error TS2769: No overload matches this call. The last overload gave the following error. Argument of type '(x: string) => string | number' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. @@ -15,5 +15,4 @@ node_modules/util/util.js(553,69): error TS2345: Argument of type 'IArguments' i - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/baselines/reference/user/webpack.log b/tests/baselines/reference/user/webpack.log index 086aea6b7d8..c7e0132d393 100644 --- a/tests/baselines/reference/user/webpack.log +++ b/tests/baselines/reference/user/webpack.log @@ -1,6 +1,6 @@ Exit Code: 1 - Standard output: - lib/MultiCompiler.js(15,65): error TS2300: Duplicate identifier 'AsyncSeriesHook'. +Standard output: +lib/MultiCompiler.js(15,65): error TS2300: Duplicate identifier 'AsyncSeriesHook'. lib/MultiCompiler.js(16,77): error TS2300: Duplicate identifier 'SyncBailHook'. lib/MultiCompiler.js(17,70): error TS2300: Duplicate identifier 'WatchOptions'. lib/MultiCompiler.js(18,37): error TS2300: Duplicate identifier 'Compiler'. @@ -22,5 +22,4 @@ lib/MultiCompiler.js(153,6): error TS2300: Duplicate identifier 'intermediateFil - Standard error: - \ No newline at end of file +Standard error: diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 714883553cf..473962e64f1 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -330,6 +330,7 @@ declare namespace FourSlashInterface { fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, formattingOptions?: FormatCodeOptions): void; getAndApplyCodeFix(errorCode?: number, index?: number): void; importFixAtPosition(expectedTextArray: string[], errorCode?: number, options?: UserPreferences): void; + importFixModuleSpecifiers(marker: string, moduleSpecifiers: string[]): void; navigationBar(json: any, options?: { checkSpans?: boolean }): void; navigationTree(json: any, options?: { checkSpans?: boolean }): void; diff --git a/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts b/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts new file mode 100644 index 00000000000..db1c899d70d --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFix_noDestructureNonObjectLiteral.ts @@ -0,0 +1,32 @@ +/// + +// @target: es2015 +// @strict: true +// @esModuleInterop: true + +// @Filename: /array.ts +////declare const arr: number[]; +////export = arr; + +// @Filename: /class-instance-member.ts +////class C { filter() {} } +////export = new C(); + +// @Filename: /object-literal.ts +////declare function filter(): void; +////export = { filter }; + +// @Filename: /jquery.d.ts +////interface JQueryStatic { +//// filter(): void; +////} +////declare const $: JQueryStatic; +////export = $; + +// @Filename: /jquery.js +////module.exports = {}; + +// @Filename: /index.ts +////filter/**/ + +verify.importFixModuleSpecifiers('', ['./object-literal', './jquery']); diff --git a/tests/projects/noEmitOnError/shared/types/db.ts b/tests/projects/noEmitOnError/shared/types/db.ts new file mode 100644 index 00000000000..72a8b9e7f56 --- /dev/null +++ b/tests/projects/noEmitOnError/shared/types/db.ts @@ -0,0 +1,3 @@ +export interface A { + name: string; +} \ No newline at end of file diff --git a/tests/projects/noEmitOnError/src/main.ts b/tests/projects/noEmitOnError/src/main.ts new file mode 100644 index 00000000000..e32ff40f442 --- /dev/null +++ b/tests/projects/noEmitOnError/src/main.ts @@ -0,0 +1,4 @@ +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; \ No newline at end of file diff --git a/tests/projects/noEmitOnError/src/other.ts b/tests/projects/noEmitOnError/src/other.ts new file mode 100644 index 00000000000..ecfb2d2ad39 --- /dev/null +++ b/tests/projects/noEmitOnError/src/other.ts @@ -0,0 +1 @@ +console.log("hi"); \ No newline at end of file diff --git a/tests/projects/noEmitOnError/tsconfig.json b/tests/projects/noEmitOnError/tsconfig.json new file mode 100644 index 00000000000..581e1ed5e24 --- /dev/null +++ b/tests/projects/noEmitOnError/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +}