diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index daec1666314..2365098deb9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,7 @@ Here's a checklist you might find useful. * [ ] There is an associated issue that is labeled 'Bug' or 'help wanted' or is in the Community milestone * [ ] Code is up-to-date with the `master` branch -* [ ] You've successfully run `jake runtests` locally +* [ ] You've successfully run `gulp runtests` locally * [ ] You've signed the CLA * [ ] There are new or updated unit tests validating the change diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31cfb858089..4b58cc2875a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,7 +104,7 @@ Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/ Library files in `built/local/` are updated automatically by running the standard build task: ```sh -jake +gulp ``` The files in `lib/` are used to bootstrap compilation and usually **should not** be updated unless publishing a new version or updating the LKG. @@ -115,49 +115,49 @@ The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` bo ## Running the Tests -To run all tests, invoke the `runtests-parallel` target using jake: +To run all tests, invoke the `runtests-parallel` target using gulp: ```Shell -jake runtests-parallel +gulp runtests-parallel ``` This will run all tests; to run only a specific subset of tests, use: ```Shell -jake runtests tests= +gulp runtests --tests= ``` e.g. to run all compiler baseline tests: ```Shell -jake runtests tests=compiler +gulp runtests --tests=compiler ``` or to run a specific test: `tests\cases\compiler\2dArrays.ts` ```Shell -jake runtests tests=2dArrays +gulp runtests --tests=2dArrays ``` ## Debugging the tests -To debug the tests, invoke the `runtests-browser` task from jake. +To debug the tests, invoke the `runtests-browser` task from gulp. You will probably only want to debug one test at a time: ```Shell -jake runtests-browser tests=2dArrays +gulp runtests-browser --tests=2dArrays ``` You can specify which browser to use for debugging. Currently Chrome and IE are supported: ```Shell -jake runtests-browser tests=2dArrays browser=chrome +gulp runtests-browser --tests=2dArrays --browser=chrome ``` -You can debug with VS Code or Node instead with `jake runtests inspect=true`: +You can debug with VS Code or Node instead with `gulp runtests --inspect=true`: ```Shell -jake runtests tests=2dArrays inspect=true +gulp runtests --tests=2dArrays --inspect=true ``` ## Adding a Test @@ -197,13 +197,13 @@ Compiler testcases generate baselines that track the emitted `.js`, the errors p When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use ```Shell -jake diff +gulp diff ``` After verifying that the changes in the baselines are correct, run ```Shell -jake baseline-accept +gulp baseline-accept ``` to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines. @@ -211,6 +211,6 @@ to establish the new baselines as the desired behavior. This will change the fil ## Localization All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json). -If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`. +If you make changes to it, run `gulp generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`. See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages). diff --git a/Gulpfile.js b/Gulpfile.js index 7d31e0a6137..93770f9d498 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -232,7 +232,7 @@ task("watch-tsserver").flags = { " --built": "Compile using the built version of the compiler." } -task("min", series(lkgPreBuild, parallel(buildTsc, buildServer))); +task("min", series(preBuild, parallel(buildTsc, buildServer))); task("min").description = "Builds only tsc and tsserver"; task("min").flags = { " --built": "Compile using the built version of the compiler." @@ -375,7 +375,7 @@ task("lint").flags = { const buildFoldStart = async () => { if (fold.isTravis()) console.log(fold.start("build")); }; const buildFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("build")); }; -task("local", series(buildFoldStart, lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd)); +task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd)); task("local").description = "Builds the full compiler and services"; task("local").flags = { " --built": "Compile using the built version of the compiler." @@ -473,22 +473,23 @@ task("diff").description = "Diffs the compiler baselines using the diff tool spe task("diff-rwc", () => exec(getDiffTool(), [refRwcBaseline, localRwcBaseline], { ignoreExitCode: true })); task("diff-rwc").description = "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable"; -const baselineAccept = subfolder => merge2( - src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**`, `!${localBaseline}${subfolder}/**/*.delete`], { base: localBaseline }) +/** + * @param {string} localBaseline Path to the local copy of the baselines + * @param {string} refBaseline Path to the reference copy of the baselines + */ +const baselineAccept = (localBaseline, refBaseline) => merge2( + src([`${localBaseline}/**`, `!${localBaseline}/**/*.delete`], { base: localBaseline }) .pipe(dest(refBaseline)), - src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**/*.delete`], { base: localBaseline, read: false }) + src([`${localBaseline}/**/*.delete`], { base: localBaseline, read: false }) .pipe(rm()) .pipe(rename({ extname: "" })) .pipe(rm(refBaseline))); -task("baseline-accept", () => baselineAccept("")); +task("baseline-accept", () => baselineAccept(localBaseline, refBaseline)); task("baseline-accept").description = "Makes the most recent test results the new baseline, overwriting the old baseline"; -task("baseline-accept-rwc", () => baselineAccept("rwc")); +task("baseline-accept-rwc", () => baselineAccept(localRwcBaseline, refRwcBaseline)); task("baseline-accept-rwc").description = "Makes the most recent rwc test results the new baseline, overwriting the old baseline"; -task("baseline-accept-test262", () => baselineAccept("test262")); -task("baseline-accept-test262").description = "Makes the most recent test262 test results the new baseline, overwriting the old baseline"; - // TODO(rbuckton): Determine if 'webhost' is still in use. const buildWebHost = () => buildProject("tests/webhost/webtsc.tsconfig.json"); task("webhost", series(lkgPreBuild, buildWebHost)); diff --git a/Jakefile.js b/Jakefile.js deleted file mode 100644 index 18f4aa56f8d..00000000000 --- a/Jakefile.js +++ /dev/null @@ -1,860 +0,0 @@ -// This file contains the build logic for the public repo -// @ts-check -/// - -const fs = require("fs"); -const os = require("os"); -const path = require("path"); -const fold = require("travis-fold"); -const ts = require("./lib/typescript"); -const del = require("del"); -const { getDirSize, needsUpdate, flatten } = require("./scripts/build/utils"); -const { base64VLQFormatEncode } = require("./scripts/build/sourcemaps"); - -// add node_modules to path so we don't need global modules, prefer the modules by adding them first -var nodeModulesPathPrefix = path.resolve("./node_modules/.bin/") + path.delimiter; -if (process.env.path !== undefined) { - process.env.path = nodeModulesPathPrefix + process.env.path; -} -else if (process.env.PATH !== undefined) { - process.env.PATH = nodeModulesPathPrefix + process.env.PATH; -} - -const host = process.env.TYPESCRIPT_HOST || process.env.host || "node"; - -const defaultTestTimeout = 40000; -const useBuilt = - (process.env.USE_BUILT === "true" || process.env.CI === "true") ? true : - process.env.LKG === "true" ? false : - false; - -let useDebugMode = true; - -const TaskNames = { - local: "local", - runtests: "runtests", - runtestsParallel: "runtests-parallel", - buildRules: "build-rules", - clean: "clean", - lib: "lib", - buildFoldStart: "build-fold-start", - buildFoldEnd: "build-fold-end", - generateDiagnostics: "generate-diagnostics", - coreBuild: "core-build", - tsc: "tsc", - lkg: "LKG", - release: "release", - lssl: "lssl", - lint: "lint", - scripts: "scripts", - localize: "localize", - configureInsiders: "configure-insiders", - publishInsiders: "publish-insiders", - configureNightly: "configure-nightly", - publishNightly: "publish-nightly", - help: "help" -}; - -const Paths = {}; -Paths.lkg = "lib"; -Paths.lkgCompiler = "lib/tsc.js"; -Paths.built = "built"; -Paths.builtLocal = "built/local"; -Paths.builtLocalCompiler = "built/local/tsc.js"; -Paths.builtLocalTSServer = "built/local/tsserver.js"; -Paths.builtLocalRun = "built/local/run.js"; -Paths.releaseCompiler = "built/local/tsc.release.js"; -Paths.typesMapOutput = "built/local/typesMap.json"; -Paths.typescriptFile = "built/local/typescript.js"; -Paths.servicesFile = "built/local/typescriptServices.js"; -Paths.servicesDefinitionFile = "built/local/typescriptServices.d.ts"; -Paths.servicesOutFile = "built/local/typescriptServices.out.js"; -Paths.servicesDefinitionOutFile = "built/local/typescriptServices.out.d.ts"; -Paths.typescriptDefinitionFile = "built/local/typescript.d.ts"; -Paths.typescriptStandaloneDefinitionFile = "built/local/typescript_standalone.d.ts"; -Paths.tsserverLibraryFile = "built/local/tsserverlibrary.js"; -Paths.tsserverLibraryDefinitionFile = "built/local/tsserverlibrary.d.ts"; -Paths.tsserverLibraryOutFile = "built/local/tsserverlibrary.out.js"; -Paths.tsserverLibraryDefinitionOutFile = "built/local/tsserverlibrary.out.d.ts"; -Paths.baselines = {}; -Paths.baselines.local = "tests/baselines/local"; -Paths.baselines.localTest262 = "tests/baselines/test262/local"; -Paths.baselines.localRwc = "internal/baselines/rwc/local"; -Paths.baselines.reference = "tests/baselines/reference"; -Paths.baselines.referenceTest262 = "tests/baselines/test262/reference"; -Paths.baselines.referenceRwc = "internal/baselines/rwc/reference"; -Paths.copyright = "CopyrightNotice.txt"; -Paths.thirdParty = "ThirdPartyNoticeText.txt"; -Paths.processDiagnosticMessagesJs = "scripts/processDiagnosticMessages.js"; -Paths.diagnosticInformationMap = "src/compiler/diagnosticInformationMap.generated.ts"; -Paths.diagnosticMessagesJson = "src/compiler/diagnosticMessages.json"; -Paths.diagnosticGeneratedJson = "src/compiler/diagnosticMessages.generated.json"; -Paths.builtDiagnosticGeneratedJson = "built/local/diagnosticMessages.generated.json"; -Paths.lcl = "src/loc/lcl" -Paths.locLcg = "built/local/enu/diagnosticMessages.generated.json.lcg"; -Paths.generatedLCGFile = path.join(Paths.builtLocal, "enu", "diagnosticMessages.generated.json.lcg"); -Paths.library = "src/lib"; -Paths.srcServer = "src/server"; -Paths.scripts = {}; -Paths.scripts.generateLocalizedDiagnosticMessages = "scripts/generateLocalizedDiagnosticMessages.js"; -Paths.scripts.processDiagnosticMessages = "scripts/processDiagnosticMessages.js"; -Paths.scripts.produceLKG = "scripts/produceLKG.js"; -Paths.scripts.configurePrerelease = "scripts/configurePrerelease.js"; -Paths.packageJson = "package.json"; -Paths.versionFile = "src/compiler/core.ts"; - -const ConfigFileFor = { - tsc: "src/tsc", - tscRelease: "src/tsc/tsconfig.release.json", - tsserver: "src/tsserver", - runjs: "src/testRunner", - lint: "scripts/tslint", - scripts: "scripts", - all: "src", - typescriptServices: "built/local/typescriptServices.tsconfig.json", - tsserverLibrary: "built/local/tsserverlibrary.tsconfig.json", -}; - -const ExpectedLKGFiles = [ - "tsc.js", - "tsserver.js", - "typescriptServices.js", - "typescriptServices.d.ts", - "typescript.js", - "typescript.d.ts", - "cancellationToken.js", - "typingsInstaller.js", - "protocol.d.ts", - "watchGuard.js" -]; - -directory(Paths.builtLocal); - -// Local target to build the compiler and services -desc("Builds the full compiler and services"); -task(TaskNames.local, [ - TaskNames.buildFoldStart, - TaskNames.coreBuild, - Paths.servicesDefinitionFile, - Paths.typescriptFile, - Paths.typescriptDefinitionFile, - Paths.typescriptStandaloneDefinitionFile, - Paths.tsserverLibraryDefinitionFile, - TaskNames.localize, - TaskNames.buildFoldEnd -]); - -task("default", [TaskNames.local]); - -const RunTestsPrereqs = [TaskNames.lib, Paths.servicesDefinitionFile, Paths.typescriptDefinitionFile, Paths.tsserverLibraryDefinitionFile]; -desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... i[nspect]=true."); -task(TaskNames.runtestsParallel, RunTestsPrereqs, function () { - tsbuild([ConfigFileFor.runjs], true, () => { - runConsoleTests("min", /*parallel*/ true); - }); -}, { async: true }); - -desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... i[nspect]=true."); -task(TaskNames.runtests, RunTestsPrereqs, function () { - tsbuild([ConfigFileFor.runjs], true, () => { - runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false); - }); -}, { async: true }); - -desc("Generates a diagnostic file in TypeScript based on an input JSON file"); -task(TaskNames.generateDiagnostics, [Paths.diagnosticInformationMap]); - -const libraryTargets = getLibraryTargets(); -desc("Builds the library targets"); -task(TaskNames.lib, libraryTargets); - -desc("Builds internal scripts"); -task(TaskNames.scripts, [TaskNames.coreBuild], function() { - tsbuild([ConfigFileFor.scripts], true, () => { - complete(); - }); -}, { async: true }); - -task(Paths.releaseCompiler, function () { - tsbuild([ConfigFileFor.tscRelease], true, () => { - complete(); - }); -}, { async: true }); - -// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory -desc("Makes a new LKG out of the built js files"); -task(TaskNames.lkg, [ - TaskNames.scripts, - TaskNames.release, - TaskNames.local, - Paths.servicesDefinitionFile, - Paths.typescriptFile, - Paths.typescriptDefinitionFile, - Paths.typescriptStandaloneDefinitionFile, - Paths.tsserverLibraryDefinitionFile, - Paths.releaseCompiler, - ...libraryTargets -], () => { - const sizeBefore = getDirSize(Paths.lkg); - - exec(`${host} ${Paths.scripts.produceLKG}`, () => { - const sizeAfter = getDirSize(Paths.lkg); - if (sizeAfter > (sizeBefore * 1.10)) { - throw new Error("The lib folder increased by 10% or more. This likely indicates a bug."); - } - - complete(); - }); -}, { async: true }); - -desc("Makes the most recent test results the new baseline, overwriting the old baseline"); -task("baseline-accept", function () { - acceptBaseline(Paths.baselines.local, Paths.baselines.reference); -}); - -desc("Makes the most recent rwc test results the new baseline, overwriting the old baseline"); -task("baseline-accept-rwc", function () { - acceptBaseline(Paths.baselines.localRwc, Paths.baselines.referenceRwc); -}); - -desc("Makes the most recent test262 test results the new baseline, overwriting the old baseline"); -task("baseline-accept-test262", function () { - acceptBaseline(Paths.baselines.localTest262, Paths.baselines.referenceTest262); -}); - -desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex"); -task(TaskNames.lint, [TaskNames.buildRules], () => { - if (fold.isTravis()) console.log(fold.start("lint")); - function lint(project, cb) { - const fix = process.env.fix || process.env.f; - const cmd = `node node_modules/tslint/bin/tslint --project ${project} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish${fix ? " --fix" : ""}`; - exec(cmd, cb); - } - lint("scripts/tslint/tsconfig.json", () => lint("src/tsconfig-base.json", () => { - if (fold.isTravis()) console.log(fold.end("lint")); - complete(); - })); -}, { async: true }); - -desc("Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable"); -task('diff', function () { - var cmd = `"${getDiffTool()}" ${Paths.baselines.reference} ${Paths.baselines.local}`; - exec(cmd); -}, { async: true }); - -desc("Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable"); -task('diff-rwc', function () { - var cmd = `"${getDiffTool()}" ${Paths.baselines.referenceRwc} ${Paths.baselines.localRwc}`; - exec(cmd); -}, { async: true }); - -task(TaskNames.configureNightly, [TaskNames.scripts], function () { - const cmd = `${host} ${Paths.scripts.configurePrerelease} dev ${Paths.packageJson} ${Paths.versionFile}`; - exec(cmd, () => complete()); -}, { async: true }); - -desc("Configure, build, test, and publish the nightly release."); -task(TaskNames.publishNightly, [TaskNames.coreBuild, TaskNames.configureNightly, TaskNames.lkg, "setDebugMode", "runtests-parallel"], function () { - var cmd = "npm publish --tag next"; - exec(cmd, () => complete()); -}, { async: true }); - -task(TaskNames.help, function() { - var cmd = "jake --tasks"; - exec(cmd, () => complete()); -}) - -task(TaskNames.configureInsiders, [TaskNames.scripts], function () { - const cmd = `${host} ${Paths.scripts.configurePrerelease} insiders ${Paths.packageJson} ${Paths.versionFile}`; - exec(cmd, () => complete()); -}, { async: true }); - -desc("Configure, build, test, and publish the insiders release."); -task(TaskNames.publishInsiders, [TaskNames.coreBuild, TaskNames.configureInsiders, TaskNames.lkg, "setDebugMode", "runtests-parallel"], function () { - var cmd = "npm publish --tag insiders"; - exec(cmd, () => complete()); -}, { async: true }); - -desc("Sets the release mode flag"); -task("release", function () { - useDebugMode = false; -}); - -desc("Clears the release mode flag"); -task("setDebugMode", function () { - useDebugMode = true; -}); - -desc("Generates localized diagnostic messages"); -task(TaskNames.localize, [Paths.generatedLCGFile]); - -desc("Emit the start of the build fold"); -task(TaskNames.buildFoldStart, [], function () { - if (fold.isTravis()) console.log(fold.start("build")); -}); - -desc("Emit the end of the build fold"); -task(TaskNames.buildFoldEnd, [], function () { - if (fold.isTravis()) console.log(fold.end("build")); -}); - -desc("Compiles tslint rules to js"); -task(TaskNames.buildRules, [], function () { - tsbuild(ConfigFileFor.lint, !useBuilt, () => complete()); -}, { async: true }); - -desc("Cleans the compiler output, declare files, and tests"); -task(TaskNames.clean, function () { - jake.rmRf(Paths.built); -}); - -desc("Generates the LCG file for localization"); -task("localize", [Paths.generatedLCGFile]); - -task(TaskNames.tsc, [Paths.diagnosticInformationMap, TaskNames.lib], function () { - tsbuild(ConfigFileFor.tsc, true, () => { - complete(); - }); -}, { async: true }); - -task(TaskNames.coreBuild, [Paths.diagnosticInformationMap, TaskNames.lib], function () { - tsbuild(ConfigFileFor.all, true, () => { - complete(); - }); -}, { async: true }); - -file(Paths.diagnosticMessagesJson); - -file(Paths.typesMapOutput, /** @type {*} */(function () { - var content = readFileSync(path.join(Paths.srcServer, 'typesMap.json')); - // Validate that it's valid JSON - try { - JSON.parse(content); - } catch (e) { - console.log("Parse error in typesMap.json: " + e); - } - fs.writeFileSync(Paths.typesMapOutput, content); -})); - -file(Paths.builtDiagnosticGeneratedJson, [Paths.diagnosticGeneratedJson], function () { - if (fs.existsSync(Paths.builtLocal)) { - jake.cpR(Paths.diagnosticGeneratedJson, Paths.builtDiagnosticGeneratedJson); - } -}); - -// Localized diagnostics -file(Paths.generatedLCGFile, [TaskNames.scripts, Paths.diagnosticInformationMap, Paths.diagnosticGeneratedJson], function () { - const cmd = `${host} ${Paths.scripts.generateLocalizedDiagnosticMessages} ${Paths.lcl} ${Paths.builtLocal} ${Paths.diagnosticGeneratedJson}` - exec(cmd, complete); -}, { async: true }); - - -// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task -file(Paths.diagnosticInformationMap, [Paths.diagnosticMessagesJson], function () { - tsbuild(ConfigFileFor.scripts, true, () => { - const cmd = `${host} ${Paths.scripts.processDiagnosticMessages} ${Paths.diagnosticMessagesJson}`; - exec(cmd, complete); - }); -}, { async: true }); - -file(ConfigFileFor.tsserverLibrary, [], function () { - flatten("src/tsserver/tsconfig.json", ConfigFileFor.tsserverLibrary, { - exclude: ["src/tsserver/server.ts"], - compilerOptions: { - "removeComments": false, - "stripInternal": true, - "declaration": true, - "outFile": "tsserverlibrary.out.js" - } - }) -}); - -// tsserverlibrary.js -// tsserverlibrary.d.ts -file(Paths.tsserverLibraryFile, [TaskNames.coreBuild, ConfigFileFor.tsserverLibrary], function() { - tsbuild(ConfigFileFor.tsserverLibrary, !useBuilt, () => { - if (needsUpdate([Paths.tsserverLibraryOutFile, Paths.tsserverLibraryDefinitionOutFile], [Paths.tsserverLibraryFile, Paths.tsserverLibraryDefinitionFile])) { - const copyright = readFileSync(Paths.copyright); - - let libraryDefinitionContent = readFileSync(Paths.tsserverLibraryDefinitionOutFile); - libraryDefinitionContent = copyright + removeConstModifierFromEnumDeclarations(libraryDefinitionContent); - libraryDefinitionContent += "\nexport = ts;\nexport as namespace ts;"; - fs.writeFileSync(Paths.tsserverLibraryDefinitionFile, libraryDefinitionContent, "utf8"); - - let libraryContent = readFileSync(Paths.tsserverLibraryOutFile); - libraryContent = copyright + libraryContent; - fs.writeFileSync(Paths.tsserverLibraryFile, libraryContent, "utf8"); - - // adjust source map for tsserverlibrary.js - let libraryMapContent = readFileSync(Paths.tsserverLibraryOutFile + ".map"); - const map = JSON.parse(libraryMapContent); - const lineStarts = /**@type {*}*/(ts).computeLineStarts(copyright); - let prependMappings = ""; - for (let i = 1; i < lineStarts.length; i++) { - prependMappings += ";"; - } - - const offset = copyright.length - lineStarts[lineStarts.length - 1]; - if (offset > 0) { - prependMappings += base64VLQFormatEncode(offset) + ","; - } - - const outputMap = { - version: map.version, - file: map.file, - sources: map.sources, - sourceRoot: map.sourceRoot, - mappings: prependMappings + map.mappings, - names: map.names, - sourcesContent: map.sourcesContent - }; - - libraryMapContent = JSON.stringify(outputMap); - fs.writeFileSync(Paths.tsserverLibraryFile + ".map", libraryMapContent); - } - complete(); - }); -}, { async: true }); -task(Paths.tsserverLibraryDefinitionFile, [Paths.tsserverLibraryFile]); - -file(ConfigFileFor.typescriptServices, [], function () { - flatten("src/services/tsconfig.json", ConfigFileFor.typescriptServices, { - compilerOptions: { - "removeComments": false, - "stripInternal": true, - "declarationMap": false, - "outFile": "typescriptServices.out.js" - } - }); -}); - -// typescriptServices.js -// typescriptServices.d.ts -file(Paths.servicesFile, [TaskNames.coreBuild, ConfigFileFor.typescriptServices], function() { - tsbuild(ConfigFileFor.typescriptServices, !useBuilt, () => { - if (needsUpdate([Paths.servicesOutFile, Paths.servicesDefinitionOutFile], [Paths.servicesFile, Paths.servicesDefinitionFile])) { - const copyright = readFileSync(Paths.copyright); - - let servicesDefinitionContent = readFileSync(Paths.servicesDefinitionOutFile); - servicesDefinitionContent = copyright + removeConstModifierFromEnumDeclarations(servicesDefinitionContent); - fs.writeFileSync(Paths.servicesDefinitionFile, servicesDefinitionContent, "utf8"); - - let servicesContent = readFileSync(Paths.servicesOutFile); - servicesContent = copyright + servicesContent; - fs.writeFileSync(Paths.servicesFile, servicesContent, "utf8"); - - // adjust source map for typescriptServices.js - let servicesMapContent = readFileSync(Paths.servicesOutFile + ".map"); - const map = JSON.parse(servicesMapContent); - const lineStarts = /**@type {*}*/(ts).computeLineStarts(copyright); - let prependMappings = ""; - for (let i = 1; i < lineStarts.length; i++) { - prependMappings += ";"; - } - - const offset = copyright.length - lineStarts[lineStarts.length - 1]; - if (offset > 0) { - prependMappings += base64VLQFormatEncode(offset) + ","; - } - - const outputMap = { - version: map.version, - file: map.file, - sources: map.sources, - sourceRoot: map.sourceRoot, - mappings: prependMappings + map.mappings, - names: map.names, - sourcesContent: map.sourcesContent - }; - - servicesMapContent = JSON.stringify(outputMap); - fs.writeFileSync(Paths.servicesFile + ".map", servicesMapContent); - } - - complete(); - }); -}, { async: true }); -task(Paths.servicesDefinitionFile, [Paths.servicesFile]); - -// typescript.js -// typescript.d.ts -file(Paths.typescriptFile, [Paths.servicesFile], function() { - if (needsUpdate([Paths.servicesFile, Paths.servicesDefinitionFile], [Paths.typescriptFile, Paths.typescriptDefinitionFile])) { - jake.cpR(Paths.servicesFile, Paths.typescriptFile); - if (fs.existsSync(Paths.servicesFile + ".map")) { - jake.cpR(Paths.servicesFile + ".map", Paths.typescriptFile + ".map"); - } - const content = readFileSync(Paths.servicesDefinitionFile); - fs.writeFileSync(Paths.typescriptDefinitionFile, content + "\r\nexport = ts;", { encoding: "utf-8" }); - } -}); -task(Paths.typescriptDefinitionFile, [Paths.typescriptFile]); - -// typescript_standalone.d.ts -file(Paths.typescriptStandaloneDefinitionFile, [Paths.servicesDefinitionFile], function() { - if (needsUpdate(Paths.servicesDefinitionFile, Paths.typescriptStandaloneDefinitionFile)) { - const content = readFileSync(Paths.servicesDefinitionFile); - fs.writeFileSync(Paths.typescriptStandaloneDefinitionFile, content.replace(/declare (namespace|module) ts(\..+)? \{/g, 'declare module "typescript" {'), { encoding: "utf-8"}); - } -}); - -function getLibraryTargets() { - /** @type {{ libs: string[], paths?: Record, sources?: Record }} */ - const libraries = readJson("./src/lib/libs.json"); - return libraries.libs.map(function (lib) { - const relativeSources = ["header.d.ts"].concat(libraries.sources && libraries.sources[lib] || [lib + ".d.ts"]); - const relativeTarget = libraries.paths && libraries.paths[lib] || ("lib." + lib + ".d.ts"); - const sources = [Paths.copyright].concat(relativeSources.map(s => path.join(Paths.library, s))); - const target = path.join(Paths.builtLocal, relativeTarget); - file(target, [Paths.builtLocal].concat(sources), function () { - concatenateFiles(target, sources); - }); - return target; - }); -} - -function runConsoleTests(defaultReporter, runInParallel) { - var dirty = process.env.dirty; - if (!dirty) { - cleanTestDirs(); - } - - let testTimeout = process.env.timeout || defaultTestTimeout; - const inspect = process.env.inspect || process.env["inspect-brk"] || process.env.i; - const runners = process.env.runners || process.env.runner || process.env.ru; - const tests = process.env.test || process.env.tests || process.env.t; - const light = process.env.light === undefined || process.env.light !== "false"; - const failed = process.env.failed; - const keepFailed = process.env.keepFailed || failed; - const stackTraceLimit = process.env.stackTraceLimit; - const colorsFlag = process.env.color || process.env.colors; - const colors = colorsFlag !== "false" && colorsFlag !== "0"; - const reporter = process.env.reporter || process.env.r || defaultReporter; - const bail = process.env.bail || process.env.b; - const lintFlag = process.env.lint !== 'false'; - const testConfigFile = 'test.config'; - - if (fs.existsSync(testConfigFile)) { - fs.unlinkSync(testConfigFile); - } - - let workerCount, taskConfigsFolder; - if (runInParallel) { - // generate name to store task configuration files - const prefix = os.tmpdir() + "/ts-tests"; - let i = 1; - do { - taskConfigsFolder = prefix + i; - i++; - } while (fs.existsSync(taskConfigsFolder)); - fs.mkdirSync(taskConfigsFolder); - - workerCount = process.env.workerCount || process.env.p || os.cpus().length; - } - - if (tests && tests.toLocaleLowerCase() === "rwc") { - testTimeout = 800000; - } - - if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed) { - writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout, keepFailed); - } - - // timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally - // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer - if (!runInParallel) { - var startTime = Travis.mark(); - var args = []; - args.push("-R", "scripts/failed-tests"); - args.push("-O", '"reporter=' + reporter + (keepFailed ? ",keepFailed=true" : "") + '"'); - if (tests) args.push("-g", `"${tests}"`); - args.push(colors ? "--colors" : "--no-colors"); - if (bail) args.push("--bail"); - if (inspect) { - args.unshift("--inspect-brk"); - } else { - args.push("-t", testTimeout); - } - args.push(Paths.builtLocalRun); - - var cmd; - if (failed) { - args.unshift("scripts/run-failed-tests.js"); - cmd = host + " " + args.join(" "); - } - else { - cmd = "mocha " + args.join(" "); - } - var savedNodeEnv = process.env.NODE_ENV; - process.env.NODE_ENV = "development"; - exec(cmd, function () { - process.env.NODE_ENV = savedNodeEnv; - Travis.measure(startTime); - runLinterAndComplete(); - }, function (e, status) { - process.env.NODE_ENV = savedNodeEnv; - Travis.measure(startTime); - finish(status); - }); - } - else { - var savedNodeEnv = process.env.NODE_ENV; - process.env.NODE_ENV = "development"; - var startTime = Travis.mark(); - const cmd = `${host} ${Paths.builtLocalRun}`; - exec(cmd, function () { - // Tests succeeded; run 'lint' task - process.env.NODE_ENV = savedNodeEnv; - Travis.measure(startTime); - runLinterAndComplete(); - }, function (e, status) { - // Tests failed - process.env.NODE_ENV = savedNodeEnv; - Travis.measure(startTime); - finish(status); - }); - } - - function finish(errorStatus) { - deleteTemporaryProjectOutput(); - if (errorStatus !== undefined) { - fail("Process exited with code " + errorStatus); - } - else { - complete(); - } - } - - function runLinterAndComplete() { - if (!lintFlag || dirty) { - return finish(); - } - var lint = jake.Task['lint']; - lint.once('complete', function () { - finish(); - }); - lint.invoke(); - } - - function deleteTemporaryProjectOutput() { - if (fs.existsSync(path.join(Paths.baselines.local, "projectOutput/"))) { - jake.rmRf(path.join(Paths.baselines.local, "projectOutput/")); - } - } -} - -// used to pass data from jake command line directly to run.js -function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout, keepFailed) { - var testConfigContents = JSON.stringify({ - runners: runners ? runners.split(",") : undefined, - test: tests ? [tests] : undefined, - light: light, - workerCount: workerCount, - taskConfigsFolder: taskConfigsFolder, - stackTraceLimit: stackTraceLimit, - noColor: !colors, - timeout: testTimeout, - keepFailed: keepFailed - }); - fs.writeFileSync('test.config', testConfigContents, { encoding: "utf-8" }); -} - -function cleanTestDirs() { - // Clean the local baselines directory - if (fs.existsSync(Paths.baselines.local)) { - del.sync(Paths.baselines.local); - } - - // Clean the local Rwc baselines directory - if (fs.existsSync(Paths.baselines.localRwc)) { - del.sync(Paths.baselines.localRwc); - } - - jake.mkdirP(Paths.baselines.local); - jake.mkdirP(Paths.baselines.localTest262); -} - -function tsbuild(tsconfigPath, useLkg = true, done = undefined) { - const startCompileTime = Travis.mark(); - const compilerPath = useLkg ? Paths.lkgCompiler : Paths.builtLocalCompiler; - const cmd = `${host} ${compilerPath} -b ${Array.isArray(tsconfigPath) ? tsconfigPath.join(" ") : tsconfigPath}`; - - exec(cmd, () => { - // Success - Travis.measure(startCompileTime); - done ? done() : complete(); - }, () => { - // Fail - Travis.measure(startCompileTime); - fail(`Compilation of ${tsconfigPath} unsuccessful`); - }); -} - -const Travis = { - mark() { - if (!fold.isTravis()) return; - var stamp = process.hrtime(); - var id = Math.floor(Math.random() * 0xFFFFFFFF).toString(16); - console.log("travis_time:start:" + id + "\r"); - return { - stamp: stamp, - id: id - }; - }, - measure(marker) { - if (!fold.isTravis()) return; - var diff = process.hrtime(marker.stamp); - var total = [marker.stamp[0] + diff[0], marker.stamp[1] + diff[1]]; - console.log("travis_time:end:" + marker.id + ":start=" + toNs(marker.stamp) + ",finish=" + toNs(total) + ",duration=" + toNs(diff) + "\r"); - } -}; - -function toNs(diff) { - return diff[0] * 1e9 + diff[1]; -} - -function exec(cmd, successHandler, errorHandler) { - var ex = jake.createExec([cmd], /** @type {jake.ExecOptions} */({ windowsVerbatimArguments: true, interactive: true })); - // Add listeners for output and error - ex.addListener("stdout", function (output) { - process.stdout.write(output); - }); - ex.addListener("stderr", function (error) { - process.stderr.write(error); - }); - ex.addListener("cmdEnd", function () { - if (successHandler) { - successHandler(); - } - }); - ex.addListener("error", function (e, status) { - if (errorHandler) { - errorHandler(e, status); - } - else { - fail("Process exited with code " + status); - } - }); - - console.log(cmd); - ex.run(); -} - -function acceptBaseline(sourceFolder, targetFolder) { - console.log('Accept baselines from ' + sourceFolder + ' to ' + targetFolder); - var deleteEnding = '.delete'; - - jake.mkdirP(targetFolder); - acceptBaselineFolder(sourceFolder, targetFolder); - - function acceptBaselineFolder(sourceFolder, targetFolder) { - var files = fs.readdirSync(sourceFolder); - - for (var i in files) { - var filename = files[i]; - var fullLocalPath = path.join(sourceFolder, filename); - var stat = fs.statSync(fullLocalPath); - if (stat.isFile()) { - if (filename.substr(filename.length - deleteEnding.length) === deleteEnding) { - filename = filename.substr(0, filename.length - deleteEnding.length); - fs.unlinkSync(path.join(targetFolder, filename)); - } - else { - var target = path.join(targetFolder, filename); - if (fs.existsSync(target)) { - fs.unlinkSync(target); - } - jake.mkdirP(path.dirname(target)); - fs.renameSync(path.join(sourceFolder, filename), target); - } - } - else if (stat.isDirectory()) { - acceptBaselineFolder(fullLocalPath, path.join(targetFolder, filename)); - } - } - } -} - -/** @param jsonPath {string} */ -function readJson(jsonPath) { - const jsonText = readFileSync(jsonPath); - const result = ts.parseConfigFileTextToJson(jsonPath, jsonText); - if (result.error) { - reportDiagnostics([result.error]); - throw new Error("An error occurred during parse."); - } - return result.config; -} - -/** @param diagnostics {ts.Diagnostic[]} */ -function reportDiagnostics(diagnostics) { - console.log(diagnosticsToString(diagnostics, process.stdout.isTTY)); -} - -/** - * @param diagnostics {ts.Diagnostic[]} - * @param [pretty] {boolean} - */ -function diagnosticsToString(diagnostics, pretty) { - const host = { - getCurrentDirectory() { return process.cwd(); }, - getCanonicalFileName(fileName) { return fileName; }, - getNewLine() { return os.EOL; } - }; - return pretty ? ts.formatDiagnosticsWithColorAndContext(diagnostics, host) : - ts.formatDiagnostics(diagnostics, host); -} - -/** - * Concatenate a list of sourceFiles to a destinationFile - * @param {string} destinationFile - * @param {string[]} sourceFiles - * @param {string=} extraContent - */ -function concatenateFiles(destinationFile, sourceFiles, extraContent) { - var temp = "temptemp"; - // append all files in sequence - var text = ""; - for (var i = 0; i < sourceFiles.length; i++) { - if (!fs.existsSync(sourceFiles[i])) { - fail(sourceFiles[i] + " does not exist!"); - } - if (i > 0) { text += "\n\n"; } - text += readFileSync(sourceFiles[i]).replace(/\r?\n/g, "\n"); - } - if (extraContent) { - text += extraContent; - } - fs.writeFileSync(temp, text); - // Move the file to the final destination - fs.renameSync(temp, destinationFile); -} - -function appendToFile(path, content) { - fs.writeFileSync(path, readFileSync(path) + "\r\n" + content); -} - -/** - * - * @param {string} path - * @returns string - */ -function readFileSync(path) { - return fs.readFileSync(path, { encoding: "utf-8" }); -} - -function getDiffTool() { - var program = process.env['DIFF']; - if (!program) { - fail("Add the 'DIFF' environment variable to the path of the program you want to use."); - } - return program; -} - -/** - * Replaces const enum declarations with non-const enums - * @param {string} text - */ -function removeConstModifierFromEnumDeclarations(text) { - return text.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4'); -} \ No newline at end of file diff --git a/README.md b/README.md index 2826db8aec6..3b20af2d398 100644 --- a/README.md +++ b/README.md @@ -61,29 +61,29 @@ Change to the TypeScript directory: cd TypeScript ``` -Install [Jake](http://jakejs.com/) tools and dev dependencies: +Install [Gulp](https://gulpjs.com/) tools and dev dependencies: ```bash -npm install -g jake +npm install -g gulp npm install ``` Use one of the following to build and test: ``` -jake local # Build the compiler into built/local -jake clean # Delete the built compiler -jake LKG # Replace the last known good with the built one. +gulp local # Build the compiler into built/local +gulp clean # Delete the built compiler +gulp LKG # Replace the last known good with the built one. # Bootstrapping step to be executed when the built compiler reaches a stable state. -jake tests # Build the test infrastructure using the built compiler. -jake runtests # Run tests using the built compiler and test infrastructure. +gulp tests # Build the test infrastructure using the built compiler. +gulp runtests # Run tests using the built compiler and test infrastructure. # You can override the host or specify a test for this command. - # Use host= or tests=. -jake runtests-browser # Runs the tests using the built run.js file. Syntax is jake runtests. Optional - parameters 'host=', 'tests=[regex], reporter=[list|spec|json|]'. -jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests. -jake lint # Runs tslint on the TypeScript source. -jake help # List the above commands. + # Use --host= or --tests=. +gulp runtests-browser # Runs the tests using the built run.js file. Syntax is gulp runtests. Optional + parameters '--host=', '--tests=[regex], --reporter=[list|spec|json|]'. +gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests. +gulp lint # Runs tslint on the TypeScript source. +gulp help # List the above commands. ``` diff --git a/lib/README.md b/lib/README.md index 0a85a9e7b5c..ce0455fa40d 100644 --- a/lib/README.md +++ b/lib/README.md @@ -2,4 +2,4 @@ **These files are not meant to be edited by hand.** If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory. -Running `jake LKG` will then appropriately update the files in this directory. +Running `gulp LKG` will then appropriately update the files in this directory. diff --git a/package.json b/package.json index abf7aa17d35..275411c477f 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "gulp-rename": "latest", "gulp-sourcemaps": "latest", "istanbul": "latest", - "jake": "latest", "lodash": "^4.17.11", "merge2": "latest", "minimist": "latest", @@ -91,16 +90,16 @@ "xml2js": "^0.4.19" }, "scripts": { - "pretest": "jake tests", - "test": "jake runtests-parallel light=false", + "pretest": "gulp tests", + "test": "gulp runtests-parallel --light=false", "build": "npm run build:compiler && npm run build:tests", - "build:compiler": "jake local", - "build:tests": "jake tests", + "build:compiler": "gulp local", + "build:tests": "gulp tests", "start": "node lib/tsc", - "clean": "jake clean", + "clean": "gulp clean", "gulp": "gulp", - "jake": "jake", - "lint": "jake lint", + "jake": "gulp", + "lint": "gulp lint", "setup-hooks": "node scripts/link-hooks.js" }, "browser": { diff --git a/scripts/bisect-test.ts b/scripts/bisect-test.ts index cc0248f6d64..d66e0b71061 100644 --- a/scripts/bisect-test.ts +++ b/scripts/bisect-test.ts @@ -15,6 +15,7 @@ function tsc(tscArgs: string, onExit: (exitCode: number) => void) { }); } +// TODO: Rewrite bisect script to handle the post-jake/gulp swap period var jake = cp.exec('jake clean local', () => void 0); jake.on('close', jakeExitCode => { if (jakeExitCode === 0) { diff --git a/scripts/build/tests.js b/scripts/build/tests.js index 36a9ea54cb9..0ac65002ab8 100644 --- a/scripts/build/tests.js +++ b/scripts/build/tests.js @@ -116,6 +116,17 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, errorStatus = exitCode; error = new Error(`Process exited with status code ${errorStatus}.`); } + else if (process.env.CI === "true") { + // finally, do a sanity check and build the compiler with the built version of itself + log.info("Starting sanity check build..."); + // Cleanup everything except lint rules (we'll need those later and would rather not waste time rebuilding them) + await exec("gulp", ["clean-tsc", "clean-services", "clean-tsserver", "clean-lssl", "clean-tests"], { cancelToken }); + const { exitCode } = await exec("gulp", ["local", "--lkg=false"], { cancelToken }); + if (exitCode !== 0) { + errorStatus = exitCode; + error = new Error(`Sanity check build process exited with status code ${errorStatus}.`); + } + } } catch (e) { errorStatus = undefined; @@ -129,13 +140,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, await deleteTemporaryProjectOutput(); if (error !== undefined) { - if (watchMode) { - throw error; - } - else { - log.error(error); - process.exit(typeof errorStatus === "number" ? errorStatus : 2); - } + process.exitCode = typeof errorStatus === "number" ? errorStatus : 2; + throw error; } } exports.runConsoleTests = runConsoleTests; @@ -148,7 +154,7 @@ async function cleanTestDirs() { exports.cleanTestDirs = cleanTestDirs; /** - * used to pass data from jake command line directly to run.js + * used to pass data from gulp command line directly to run.js * @param {string} tests * @param {string} runners * @param {boolean} light diff --git a/scripts/build/utils.js b/scripts/build/utils.js index 170c36adef6..f9e48c58256 100644 --- a/scripts/build/utils.js +++ b/scripts/build/utils.js @@ -340,6 +340,7 @@ function rm(dest, opts) { duplex.push(file); cb(); } + duplex.push(null); // signal end of read queue }; const duplex = new Duplex({ diff --git a/scripts/hooks/post-checkout b/scripts/hooks/post-checkout index fb41e4e8652..28a583794d9 100644 --- a/scripts/hooks/post-checkout +++ b/scripts/hooks/post-checkout @@ -1,2 +1,2 @@ #!/bin/sh -npm run jake -- generate-diagnostics \ No newline at end of file +npm run gulp -- generate-diagnostics \ No newline at end of file diff --git a/scripts/open-user-pr.ts b/scripts/open-user-pr.ts index f510c63d4e3..aedfcc42547 100644 --- a/scripts/open-user-pr.ts +++ b/scripts/open-user-pr.ts @@ -24,7 +24,7 @@ const branchName = `user-update-${now.getFullYear()}${padNum(now.getMonth())}${p const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`; runSequence([ ["git", ["checkout", "."]], // reset any changes - ["node", ["./node_modules/jake/bin/cli.js", "baseline-accept"]], // accept baselines + ["node", ["./node_modules/gulp/bin/gulp.js", "baseline-accept"]], // accept baselines ["git", ["checkout", "-b", branchName]], // create a branch ["git", ["add", "."]], // Add all changes ["git", ["commit", "-m", `"Update user baselines"`]], // Commit all changes diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9ac19fb98d0..958ceae0395 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24448,7 +24448,10 @@ namespace ts { const bodySignature = getSignatureFromDeclaration(bodyDeclaration); for (const signature of signatures) { if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { - error(signature.declaration, Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + addRelatedInfo( + error(signature.declaration, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), + createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here) + ); break; } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 89794d26181..09b0f721292 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1404,7 +1404,7 @@ "category": "Error", "code": 2393 }, - "Overload signature is not compatible with function implementation.": { + "This overload signature is not compatible with its implementation signature.": { "category": "Error", "code": 2394 }, @@ -2585,6 +2585,10 @@ "category": "Error", "code": 2749 }, + "The implementation signature is declared here.": { + "category": "Error", + "code": 2750 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 00d84192055..f303dcb47a6 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -89,10 +89,10 @@ namespace ts { return createLiteralFromNode(value); } - export function createNumericLiteral(value: string): NumericLiteral { + export function createNumericLiteral(value: string, numericLiteralFlags: TokenFlags = TokenFlags.None): NumericLiteral { const node = createSynthesizedNode(SyntaxKind.NumericLiteral); node.text = value; - node.numericLiteralFlags = 0; + node.numericLiteralFlags = numericLiteralFlags; return node; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c0ae3b99c44..cce869df44e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1648,20 +1648,26 @@ namespace ts { kind: SyntaxKind.NoSubstitutionTemplateLiteral; } - /* @internal */ export const enum TokenFlags { None = 0, + /* @internal */ PrecedingLineBreak = 1 << 0, + /* @internal */ PrecedingJSDocComment = 1 << 1, + /* @internal */ Unterminated = 1 << 2, + /* @internal */ ExtendedUnicodeEscape = 1 << 3, Scientific = 1 << 4, // e.g. `10e2` Octal = 1 << 5, // e.g. `0777` HexSpecifier = 1 << 6, // e.g. `0x00000000` BinarySpecifier = 1 << 7, // e.g. `0b0110010000000000` OctalSpecifier = 1 << 8, // e.g. `0o777` + /* @internal */ ContainsSeparator = 1 << 9, // e.g. `0b1100_0101` + /* @internal */ BinaryOrOctalSpecifier = BinarySpecifier | OctalSpecifier, + /* @internal */ NumericLiteralFlags = Scientific | Octal | HexSpecifier | BinaryOrOctalSpecifier | ContainsSeparator } diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index ec86415b9fa..45a79613db5 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -156,7 +156,7 @@ namespace ts.codefix { isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) ? arg.name.text : undefined); const contextualType = checker.getContextualType(call); - const returnType = inJs ? undefined : contextualType && checker.typeToTypeNode(contextualType, contextNode, /*flags*/ undefined, tracker) || createKeywordTypeNode(SyntaxKind.AnyKeyword); + const returnType = (inJs || !contextualType) ? undefined : checker.typeToTypeNode(contextualType, contextNode, /*flags*/ undefined, tracker); return createMethod( /*decorators*/ undefined, /*modifiers*/ makeStatic ? [createToken(SyntaxKind.StaticKeyword)] : undefined, diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index bcd3b52daef..3eff1c4b87a 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/anyIdenticalToItself.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/anyIdenticalToItself.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/anyIdenticalToItself.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -6,7 +6,8 @@ tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are ==== tests/cases/compiler/anyIdenticalToItself.ts (3 errors) ==== function foo(x: any); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/anyIdenticalToItself.ts:3:10: The implementation signature is declared here. function foo(x: any); function foo(x: any, y: number) { } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 70fccdf87c1..fab6f905efc 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -997,6 +997,14 @@ declare namespace ts { interface NoSubstitutionTemplateLiteral extends LiteralExpression { kind: SyntaxKind.NoSubstitutionTemplateLiteral; } + enum TokenFlags { + None = 0, + Scientific = 16, + Octal = 32, + HexSpecifier = 64, + BinarySpecifier = 128, + OctalSpecifier = 256 + } interface NumericLiteral extends LiteralExpression { kind: SyntaxKind.NumericLiteral; } @@ -3670,7 +3678,7 @@ declare namespace ts { function createLiteral(value: number | PseudoBigInt): NumericLiteral; function createLiteral(value: boolean): BooleanLiteral; function createLiteral(value: string | number | PseudoBigInt | boolean): PrimaryExpression; - function createNumericLiteral(value: string): NumericLiteral; + function createNumericLiteral(value: string, numericLiteralFlags?: TokenFlags): NumericLiteral; function createBigIntLiteral(value: string): BigIntLiteral; function createStringLiteral(text: string): StringLiteral; function createRegularExpressionLiteral(text: string): RegularExpressionLiteral; @@ -8347,7 +8355,7 @@ declare namespace ts.server { excludedFiles: ReadonlyArray; private typeAcquisition; updateGraph(): boolean; - getExcludedFiles(): readonly NormalizedPath[]; + getExcludedFiles(): ReadonlyArray; getTypeAcquisition(): TypeAcquisition; setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void; } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 15dbc080241..40e16bf55bd 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -997,6 +997,14 @@ declare namespace ts { interface NoSubstitutionTemplateLiteral extends LiteralExpression { kind: SyntaxKind.NoSubstitutionTemplateLiteral; } + enum TokenFlags { + None = 0, + Scientific = 16, + Octal = 32, + HexSpecifier = 64, + BinarySpecifier = 128, + OctalSpecifier = 256 + } interface NumericLiteral extends LiteralExpression { kind: SyntaxKind.NumericLiteral; } @@ -3670,7 +3678,7 @@ declare namespace ts { function createLiteral(value: number | PseudoBigInt): NumericLiteral; function createLiteral(value: boolean): BooleanLiteral; function createLiteral(value: string | number | PseudoBigInt | boolean): PrimaryExpression; - function createNumericLiteral(value: string): NumericLiteral; + function createNumericLiteral(value: string, numericLiteralFlags?: TokenFlags): NumericLiteral; function createBigIntLiteral(value: string): BigIntLiteral; function createStringLiteral(text: string): StringLiteral; function createRegularExpressionLiteral(text: string): RegularExpressionLiteral; diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt index 4f869fd63a0..682959074e8 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(18,5): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(26,5): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(18,5): error TS2394: This overload signature is not compatible with its implementation signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(26,5): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/constructorsWithSpecializedSignatures.ts (2 errors) ==== @@ -22,7 +22,8 @@ tests/cases/compiler/constructorsWithSpecializedSignatures.ts(26,5): error TS239 constructor(x: "hi"); constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/constructorsWithSpecializedSignatures.ts:20:5: The implementation signature is declared here. constructor(x: number); constructor(x: "hi") { } } @@ -32,7 +33,8 @@ tests/cases/compiler/constructorsWithSpecializedSignatures.ts(26,5): error TS239 constructor(x: "hi"); constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/constructorsWithSpecializedSignatures.ts:28:5: The implementation signature is declared here. constructor(x: string); constructor(x: "hi") { } // error } diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt index a87dc989178..a22bdef2199 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt @@ -1,11 +1,12 @@ -tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts(6,5): error TS2411: Property 'prop' of type 'number' is not assignable to string index type 'string'. ==== tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts (2 errors) ==== function Foo(s: string); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts:2:10: The implementation signature is declared here. function Foo(n: number) { } interface Foo { diff --git a/tests/baselines/reference/functionOverloadCompatibilityWithVoid01.errors.txt b/tests/baselines/reference/functionOverloadCompatibilityWithVoid01.errors.txt index 56951e380e4..5e81224b5eb 100644 --- a/tests/baselines/reference/functionOverloadCompatibilityWithVoid01.errors.txt +++ b/tests/baselines/reference/functionOverloadCompatibilityWithVoid01.errors.txt @@ -1,10 +1,11 @@ -tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid01.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid01.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid01.ts (1 errors) ==== function f(x: string): number; ~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/functions/functionOverloadCompatibilityWithVoid01.ts:2:10: The implementation signature is declared here. function f(x: string): void { return; } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadErrors.errors.txt b/tests/baselines/reference/functionOverloadErrors.errors.txt index ddcaf478602..66f0751fb42 100644 --- a/tests/baselines/reference/functionOverloadErrors.errors.txt +++ b/tests/baselines/reference/functionOverloadErrors.errors.txt @@ -5,9 +5,9 @@ tests/cases/conformance/functions/functionOverloadErrors.ts(75,21): error TS2383 tests/cases/conformance/functions/functionOverloadErrors.ts(79,14): error TS2383: Overload signatures must all be exported or non-exported. tests/cases/conformance/functions/functionOverloadErrors.ts(85,18): error TS2384: Overload signatures must all be ambient or non-ambient. tests/cases/conformance/functions/functionOverloadErrors.ts(90,18): error TS2384: Overload signatures must all be ambient or non-ambient. -tests/cases/conformance/functions/functionOverloadErrors.ts(94,10): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/conformance/functions/functionOverloadErrors.ts(99,10): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/conformance/functions/functionOverloadErrors.ts(103,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/functions/functionOverloadErrors.ts(94,10): error TS2394: This overload signature is not compatible with its implementation signature. +tests/cases/conformance/functions/functionOverloadErrors.ts(99,10): error TS2394: This overload signature is not compatible with its implementation signature. +tests/cases/conformance/functions/functionOverloadErrors.ts(103,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/functions/functionOverloadErrors.ts(116,19): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. @@ -121,20 +121,23 @@ tests/cases/conformance/functions/functionOverloadErrors.ts(116,19): error TS237 //Function overloads with fewer params than implementation signature function fewerParams(); ~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/functions/functionOverloadErrors.ts:95:10: The implementation signature is declared here. function fewerParams(n: string) { } //Function implementation whose parameter types are not assignable to all corresponding overload signature parameters function fn13(n: string); ~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/functions/functionOverloadErrors.ts:100:10: The implementation signature is declared here. function fn13(n: number) { } //Function overloads where return types are not all subtype of implementation return type function fn14(n: string): string; ~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/functions/functionOverloadErrors.ts:104:10: The implementation signature is declared here. function fn14() { return 3; } diff --git a/tests/baselines/reference/functionOverloads11.errors.txt b/tests/baselines/reference/functionOverloads11.errors.txt index 005ee9bb143..a2e37789b60 100644 --- a/tests/baselines/reference/functionOverloads11.errors.txt +++ b/tests/baselines/reference/functionOverloads11.errors.txt @@ -1,9 +1,10 @@ -tests/cases/compiler/functionOverloads11.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads11.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads11.ts (1 errors) ==== function foo():number; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads11.ts:2:10: The implementation signature is declared here. function foo():string { return "" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads17.errors.txt b/tests/baselines/reference/functionOverloads17.errors.txt index febd2c03ac8..1945e3fc17a 100644 --- a/tests/baselines/reference/functionOverloads17.errors.txt +++ b/tests/baselines/reference/functionOverloads17.errors.txt @@ -1,9 +1,10 @@ -tests/cases/compiler/functionOverloads17.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads17.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads17.ts (1 errors) ==== function foo():{a:number;} ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads17.ts:2:10: The implementation signature is declared here. function foo():{a:string;} { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads18.errors.txt b/tests/baselines/reference/functionOverloads18.errors.txt index bec6a45ed89..6010c633abf 100644 --- a/tests/baselines/reference/functionOverloads18.errors.txt +++ b/tests/baselines/reference/functionOverloads18.errors.txt @@ -1,9 +1,10 @@ -tests/cases/compiler/functionOverloads18.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads18.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads18.ts (1 errors) ==== function foo(bar:{a:number;}); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads18.ts:2:10: The implementation signature is declared here. function foo(bar:{a:string;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads19.errors.txt b/tests/baselines/reference/functionOverloads19.errors.txt index d87ba17562a..bd2ce38ec16 100644 --- a/tests/baselines/reference/functionOverloads19.errors.txt +++ b/tests/baselines/reference/functionOverloads19.errors.txt @@ -1,10 +1,11 @@ -tests/cases/compiler/functionOverloads19.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads19.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads19.ts (1 errors) ==== function foo(bar:{b:string;}); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads19.ts:3:10: The implementation signature is declared here. function foo(bar:{a:string;}); function foo(bar:{a:any;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads20.errors.txt b/tests/baselines/reference/functionOverloads20.errors.txt index 6b33795bc3e..b4e4f969dfb 100644 --- a/tests/baselines/reference/functionOverloads20.errors.txt +++ b/tests/baselines/reference/functionOverloads20.errors.txt @@ -1,10 +1,11 @@ -tests/cases/compiler/functionOverloads20.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads20.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads20.ts (1 errors) ==== function foo(bar:{a:number;}): number; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads20.ts:3:10: The implementation signature is declared here. function foo(bar:{a:string;}): string; function foo(bar:{a:any;}): string {return ""} \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads4.errors.txt b/tests/baselines/reference/functionOverloads4.errors.txt index 78d772a0f6f..d9ce3a7d189 100644 --- a/tests/baselines/reference/functionOverloads4.errors.txt +++ b/tests/baselines/reference/functionOverloads4.errors.txt @@ -1,8 +1,9 @@ -tests/cases/compiler/functionOverloads4.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/functionOverloads4.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/functionOverloads4.ts (1 errors) ==== function foo():number; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/functionOverloads4.ts:2:10: The implementation signature is declared here. function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/overloadAssignmentCompat.errors.txt b/tests/baselines/reference/overloadAssignmentCompat.errors.txt index 35906ee92c9..a0609b70e71 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.errors.txt +++ b/tests/baselines/reference/overloadAssignmentCompat.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overloadAssignmentCompat.ts(34,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadAssignmentCompat.ts(34,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/overloadAssignmentCompat.ts (1 errors) ==== @@ -37,7 +37,8 @@ tests/cases/compiler/overloadAssignmentCompat.ts(34,10): error TS2394: Overload // error - signatures are not assignment compatible function foo():number; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadAssignmentCompat.ts:35:10: The implementation signature is declared here. function foo():string { return "a" }; \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt index aa7bbf77239..457f7f5b388 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt @@ -1,11 +1,12 @@ -tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(9,8): error TS2345: Argument of type '1' is not assignable to parameter of type 'string'. ==== tests/cases/compiler/overloadOnConstNoAnyImplementation.ts (2 errors) ==== function x1(a: number, cb: (x: 'hi') => number); ~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadOnConstNoAnyImplementation.ts:3:10: The implementation signature is declared here. function x1(a: number, cb: (x: 'bye') => number); function x1(a: number, cb: (x: string) => number) { cb('hi'); diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index a090f370863..f6792949e59 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(6,5): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(6,5): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type '1' is not assignable to parameter of type 'string'. tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. Types of parameters 'x' and 'x' are incompatible. @@ -16,7 +16,8 @@ tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: class C { x1(a: number, callback: (x: 'hi') => number); ~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts:7:5: The implementation signature is declared here. x1(a: number, callback: (x: string) => number) { callback('hi'); callback('bye'); diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 3fe0a43d855..9fc6c97f6b7 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'. @@ -10,7 +10,8 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: function foo(name: "SPAN"): Derived1; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts:7:10: The implementation signature is declared here. function foo(name: "DIV"): Derived2 { return null; } diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index f50a6bbd8c3..c12d77714a3 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'. -tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/overloadingOnConstants2.ts (3 errors) ==== @@ -14,7 +14,8 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: Overload s function foo(x: "hi", items: string[]): D; function foo(x: "bye", items: string[]): E; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadingOnConstants2.ts:10:10: The implementation signature is declared here. function foo(x: string, items: string[]): C { return null; } @@ -28,7 +29,8 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: Overload s //function bar(x: "hi", items: string[]): D; function bar(x: "bye", items: string[]): E; ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/overloadingOnConstants2.ts:21:10: The implementation signature is declared here. function bar(x: string, items: string[]): C; function bar(x: string, items: string[]): C { return null; diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index d1a0513c1f6..6f64fdc8669 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Duplicate identifier 'names'. @@ -8,7 +8,8 @@ tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Dup class Customers { constructor(public names: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/parameterPropertyInConstructor2.ts:4:5: The implementation signature is declared here. ~~~~~~~~~~~~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public names: string, public ages: number) { diff --git a/tests/baselines/reference/parserClassDeclaration12.errors.txt b/tests/baselines/reference/parserClassDeclaration12.errors.txt index 130eaa3defd..453c4f13eba 100644 --- a/tests/baselines/reference/parserClassDeclaration12.errors.txt +++ b/tests/baselines/reference/parserClassDeclaration12.errors.txt @@ -1,10 +1,11 @@ -tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts(2,4): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts(2,4): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts (1 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts:3:4: The implementation signature is declared here. constructor(a) { } } \ No newline at end of file diff --git a/tests/baselines/reference/parserParameterList15.errors.txt b/tests/baselines/reference/parserParameterList15.errors.txt index 7a1a8af9093..cca41d94987 100644 --- a/tests/baselines/reference/parserParameterList15.errors.txt +++ b/tests/baselines/reference/parserParameterList15.errors.txt @@ -1,11 +1,12 @@ -tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts(1,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. ==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts (2 errors) ==== function foo(a = 4); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList15.ts:2:10: The implementation signature is declared here. ~~~~~ !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function foo(a, b) {} \ No newline at end of file diff --git a/tests/baselines/reference/parserParameterList16.errors.txt b/tests/baselines/reference/parserParameterList16.errors.txt index 4b30b386e6f..7d496cc03ea 100644 --- a/tests/baselines/reference/parserParameterList16.errors.txt +++ b/tests/baselines/reference/parserParameterList16.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16.ts(2,4): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16.ts(2,4): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16.ts(2,8): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. @@ -6,7 +6,8 @@ tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16. class C { foo(a = 4); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList16.ts:3:4: The implementation signature is declared here. ~~~~~ !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(a, b) { } diff --git a/tests/baselines/reference/parserParameterList17.errors.txt b/tests/baselines/reference/parserParameterList17.errors.txt index a75e3c3b712..025c2eabbba 100644 --- a/tests/baselines/reference/parserParameterList17.errors.txt +++ b/tests/baselines/reference/parserParameterList17.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17.ts(2,4): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17.ts(2,4): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17.ts(2,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. @@ -6,7 +6,8 @@ tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17. class C { constructor(a = 4); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList17.ts:3:4: The implementation signature is declared here. ~~~~~ !!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor(a, b) { } diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index 77010d7efa1..cf30a4ff273 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -7,7 +7,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(12,16): error TS2355: A function tests/cases/compiler/recursiveFunctionTypes.ts(17,5): error TS2322: Type '() => I' is not assignable to type 'number'. tests/cases/compiler/recursiveFunctionTypes.ts(22,5): error TS2345: Argument of type '3' is not assignable to parameter of type '(t: typeof g) => void'. tests/cases/compiler/recursiveFunctionTypes.ts(25,1): error TS2322: Type '3' is not assignable to type '() => any'. -tests/cases/compiler/recursiveFunctionTypes.ts(30,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/recursiveFunctionTypes.ts(30,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/compiler/recursiveFunctionTypes.ts(33,1): error TS2554: Expected 0-1 arguments, but got 2. tests/cases/compiler/recursiveFunctionTypes.ts(34,4): error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. tests/cases/compiler/recursiveFunctionTypes.ts(42,1): error TS2554: Expected 0-1 arguments, but got 2. @@ -63,7 +63,8 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of function f6(): typeof f6; function f6(a: typeof f6): () => number; ~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/recursiveFunctionTypes.ts:31:10: The implementation signature is declared here. function f6(a?: any) { return f6; } f6("", 3); // error (arity mismatch) diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt index 0e9454b9018..e6dd1aa26ee 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt @@ -1,10 +1,11 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts (1 errors) ==== function foo(x: 'a'); ~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts:2:10: The implementation signature is declared here. function foo(x: number) { } class C { diff --git a/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt index 027feb7cc31..4353264b649 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts(6,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts(6,10): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts (1 errors) ==== @@ -9,7 +9,8 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts(6,1 function doThing(x: "dog"): Dog; ~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts:9:10: The implementation signature is declared here. function doThing(x: "cat"): Cat; function doThing(x: string): Animal; function doThing(x: string, y?: string): Moose { diff --git a/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt index e523b4c2dcb..256d9dc1e91 100644 --- a/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt +++ b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,19): error TS1005: ';' expected. @@ -9,7 +9,8 @@ tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1 ~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts:3:10: The implementation signature is declared here. ~~~~~~~ !!! error TS1138: Parameter declaration expected. ~ diff --git a/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt index be9c3556caf..feb068d4957 100644 --- a/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt +++ b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,19): error TS1005: ';' expected. @@ -9,7 +9,8 @@ tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.t ~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts:3:10: The implementation signature is declared here. ~~~~~~~ !!! error TS1138: Parameter declaration expected. ~ diff --git a/tests/baselines/reference/user/async.log b/tests/baselines/reference/user/async.log index 1477ce5faa6..10f2d38ca6c 100644 --- a/tests/baselines/reference/user/async.log +++ b/tests/baselines/reference/user/async.log @@ -51,7 +51,7 @@ node_modules/async/autoInject.js(160,28): error TS2695: Left side of comma opera node_modules/async/autoInject.js(164,14): error TS2695: Left side of comma operator is unused and has no side effects. node_modules/async/autoInject.js(168,6): error TS2695: Left side of comma operator is unused and has no side effects. node_modules/async/cargo.js(62,12): error TS2304: Cannot find name 'AsyncFunction'. -node_modules/async/cargo.js(67,14): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig. +node_modules/async/cargo.js(67,14): error TS2749: 'module' refers to a value, but is being used as a type here. node_modules/async/cargo.js(67,20): error TS1005: '}' expected. node_modules/async/cargo.js(92,11): error TS2695: Left side of comma operator is unused and has no side effects. node_modules/async/compose.js(8,37): error TS2695: Left side of comma operator is unused and has no side effects. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index 55c189a92d6..5d98e163938 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -19,12 +19,7 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(77,16): error TS7014: node_modules/chrome-devtools-frontend/front_end/Runtime.js(78,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/Runtime.js(95,28): error TS2339: Property 'response' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(147,37): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/Runtime.js(158,21): error TS2345: Argument of type 'Promise' is not assignable to parameter of type 'Promise'. - Type 'string' is not assignable to type 'undefined'. -node_modules/chrome-devtools-frontend/front_end/Runtime.js(161,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. - Type 'undefined[]' is not assignable to type 'undefined'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(187,12): error TS2339: Property 'eval' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/Runtime.js(197,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(267,14): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(269,59): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(270,9): error TS2322: Type 'Promise' is not assignable to type 'Promise'. @@ -38,7 +33,6 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(693,7): error TS2322: Type 'boolean' is not assignable to type 'undefined'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(705,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(715,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. -node_modules/chrome-devtools-frontend/front_end/Runtime.js(721,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(729,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(854,36): error TS2339: Property 'eval' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(1083,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -282,7 +276,7 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(514, node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(553,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(583,43): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(665,37): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(691,24): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(691,24): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(708,11): error TS2339: Property 'AnimationDispatcher' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(731,24): error TS2694: Namespace 'Protocol' has no exported member 'Animation'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(741,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. @@ -293,7 +287,7 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(782, node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(811,11): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationModel.js(811,44): error TS2300: Duplicate identifier 'Request'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationScreenshotPopover.js(7,11): error TS2339: Property 'AnimationScreenshotPopover' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationScreenshotPopover.js(9,23): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationScreenshotPopover.js(9,23): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/animation/AnimationScreenshotPopover.js(18,39): error TS2345: Argument of type 'new (width?: number, height?: number) => HTMLImageElement' is not assignable to parameter of type 'Node'. Type 'new (width?: number, height?: number) => HTMLImageElement' is missing the following properties from type 'Node': baseURI, childNodes, firstChild, isConnected, and 47 more. node_modules/chrome-devtools-frontend/front_end/animation/AnimationScreenshotPopover.js(19,13): error TS2339: Property 'style' does not exist on type 'new (width?: number, height?: number) => HTMLImageElement'. @@ -345,7 +339,7 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(1 node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(173,25): error TS2339: Property 'boxInWindow' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(176,44): error TS2339: Property 'keysArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(177,63): error TS2339: Property 'parentElement' does not exist on type 'EventTarget'. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(194,30): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(194,30): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(197,25): error TS2339: Property 'AnimationScreenshotPopover' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(208,50): error TS2554: Expected 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(208,67): error TS2554: Expected 2 arguments, but got 1. @@ -451,7 +445,7 @@ node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheSto node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(19,13): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(21,37): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(32,5): error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? -node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(40,11): error TS2304: Cannot find name 'promise'. +node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(40,11): error TS2552: Cannot find name 'promise'. Did you mean 'Promise'? node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(61,13): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(68,37): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(70,13): error TS2339: Property 'resources' does not exist on type 'any[]'. @@ -719,10 +713,11 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15630,28): error TS2304: Cannot find name 'fs'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15636,30): error TS2304: Cannot find name 'fs'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15645,18): error TS2304: Cannot find name 'fs'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15684,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. - Type 'void' is not assignable to type 'any[]'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15684,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'void | any[]' is not assignable to type 'any[]'. + Type 'void' is not assignable to type 'any[]'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15687,1): error TS2304: Cannot find name 'fs'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15694,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15694,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15695,1): error TS2304: Cannot find name 'fs'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15695,78): error TS2345: Argument of type '0' is not assignable to parameter of type '(string | number)[]'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15791,19): error TS2304: Cannot find name 'fs'. @@ -744,15 +739,17 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(17501,1): error TS2322: Type 'any[]' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(18010,1): error TS2554: Expected 0 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19499,6): error TS2339: Property 'Util' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19585,1): error TS2322: Type 'Promise<{ artifacts: any; auditResults: any[]; }>' is not assignable to type 'Promise'. - Type '{ artifacts: any; auditResults: any[]; }' is not assignable to type 'void'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19585,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'void | { artifacts: any; auditResults: any[]; }' is not assignable to type 'void'. + Type '{ artifacts: any; auditResults: any[]; }' is not assignable to type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19591,15): error TS2339: Property 'artifacts' does not exist on type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19592,42): error TS2339: Property 'artifacts' does not exist on type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19597,31): error TS2339: Property 'auditResults' does not exist on type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19605,22): error TS2339: Property 'artifacts' does not exist on type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19612,22): error TS2339: Property 'artifacts' does not exist on type 'void'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19683,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. - Type 'number' is not assignable to type 'void'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19683,1): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'number | void' is not assignable to type 'void'. + Type 'number' is not assignable to type 'void'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19744,7): error TS2339: Property 'expected' does not exist on type 'Error'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20005,8): error TS2339: Property 'runLighthouseForConnection' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(20035,8): error TS2339: Property 'runLighthouseInWorker' does not exist on type 'Window'. @@ -3094,8 +3091,6 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(341, node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(351,31): error TS2694: Namespace 'Protocol' has no exported member 'Debugger'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(362,31): error TS2694: Namespace 'Protocol' has no exported member 'Debugger'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(375,9): error TS2322: Type 'Promise' is not assignable to type 'Promise'. -node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(378,9): error TS2322: Type 'Promise' is not assignable to type 'Promise'. -node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(381,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(60,52): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. Type 'BreakpointManager' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. Types of property 'modelAdded' are incompatible. @@ -5791,7 +5786,6 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(28 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2906,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2910,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2918,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2956,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2978,35): error TS2300: Duplicate identifier 'Context'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2978,35): error TS2339: Property 'Context' does not exist on type 'typeof StylePropertyTreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(3021,19): error TS2339: Property 'key' does not exist on type 'Event'. @@ -6917,7 +6911,7 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(794 node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(795,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(796,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(841,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(852,15): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(852,15): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(858,13): error TS2339: Property 'image' does not exist on type 'WebGLTexture'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(861,81): error TS2339: Property 'image' does not exist on type 'WebGLTexture'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(928,26): error TS2694: Namespace 'SDK' has no exported member 'SnapshotWithRect'. @@ -7936,7 +7930,6 @@ node_modules/chrome-devtools-frontend/front_end/perf_ui/FilmStripView.js(254,19) node_modules/chrome-devtools-frontend/front_end/perf_ui/FilmStripView.js(256,35): error TS2339: Property 'metaKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/perf_ui/FilmStripView.js(263,35): error TS2339: Property 'metaKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/perf_ui/FilmStripView.js(306,51): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. -node_modules/chrome-devtools-frontend/front_end/perf_ui/FilmStripView.js(307,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/perf_ui/FlameChart.js(307,36): error TS2339: Property 'offsetX' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/perf_ui/FlameChart.js(308,36): error TS2339: Property 'offsetY' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/perf_ui/FlameChart.js(313,45): error TS2339: Property 'offsetX' does not exist on type 'Event'. @@ -10269,8 +10262,6 @@ node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1179,3): err Types of parameters 'functionDeclaration' and 'functionDeclaration' are incompatible. node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1234,21): error TS2694: Namespace 'SDK' has no exported member 'CallFunctionResult'. node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1265,21): error TS2694: Namespace 'SDK' has no exported member 'CallFunctionResult'. -node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1325,5): error TS2322: Type 'Promise<{ properties: RemoteObjectProperty[]; internalProperties: RemoteObjectProperty[]; }>' is not assignable to type 'Promise'. - Type '{ properties: RemoteObjectProperty[]; internalProperties: RemoteObjectProperty[]; }' is missing the following properties from type 'RemoteObject': customPreview, objectId, type, subtype, and 20 more. node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1345,43): error TS2694: Namespace 'SDK.DebuggerModel' has no exported member 'FunctionDetails'. node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1352,45): error TS2694: Namespace 'SDK.DebuggerModel' has no exported member 'FunctionDetails'. node_modules/chrome-devtools-frontend/front_end/sdk/RemoteObject.js(1363,35): error TS2694: Namespace 'SDK.DebuggerModel' has no exported member 'FunctionDetails'. @@ -11058,7 +11049,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSid node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(80,71): error TS2339: Property 'uiLocation' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(81,60): error TS2339: Property 'breakpoint' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(82,62): error TS2339: Property 'breakpoint' does not exist on type 'V'. -node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(119,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(131,38): error TS2554: Expected 0 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(141,29): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(156,33): error TS2339: Property 'checkboxElement' does not exist on type 'EventTarget'. @@ -11258,9 +11248,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/SnippetsPlugin.js(41,73) node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(48,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(55,32): error TS2339: Property 'remove' does not exist on type 'Map; formatData: SourceFormatData; }>'. node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(67,32): error TS2339: Property 'remove' does not exist on type 'Map; formatData: SourceFormatData; }>'. -node_modules/chrome-devtools-frontend/front_end/sources/SourceMapNamesResolver.js(55,5): error TS2322: Type 'Promise<{ name: string; offset: number; }[]>' is not assignable to type 'Promise'. - Type '{ name: string; offset: number; }[]' is not assignable to type 'Identifier[]'. - Type '{ name: string; offset: number; }' is missing the following properties from type 'Identifier': lineNumber, columnNumber node_modules/chrome-devtools-frontend/front_end/sources/SourceMapNamesResolver.js(304,37): error TS2339: Property 'inverse' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sources/SourceMapNamesResolver.js(322,32): error TS2694: Namespace 'SDK.RuntimeModel' has no exported member 'EvaluationResult'. node_modules/chrome-devtools-frontend/front_end/sources/SourceMapNamesResolver.js(361,25): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. @@ -11935,8 +11922,9 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.j node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(204,36): error TS2339: Property '_overviewIndex' does not exist on type 'TimelineCategory'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(246,68): error TS2339: Property 'peekLast' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(248,81): error TS2339: Property '_overviewIndex' does not exist on type 'TimelineCategory'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(384,7): error TS2322: Type 'Promise HTMLImageElement>' is not assignable to type 'Promise'. - Type 'new (width?: number, height?: number) => HTMLImageElement' is missing the following properties from type 'HTMLImageElement': align, alt, border, complete, and 261 more. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(384,7): error TS2322: Type 'Promise HTMLImageElement)>' is not assignable to type 'Promise'. + Type 'HTMLImageElement | (new (width?: number, height?: number) => HTMLImageElement)' is not assignable to type 'HTMLImageElement'. + Type 'new (width?: number, height?: number) => HTMLImageElement' is missing the following properties from type 'HTMLImageElement': align, alt, border, complete, and 261 more. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(457,17): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(483,24): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineEventOverview.js(524,28): error TS2339: Property 'peekLast' does not exist on type 'TimelineFrame[]'. @@ -11951,7 +11939,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataP node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(111,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(140,27): error TS2339: Property '_blackboxRoot' does not exist on type 'string | Event | TimelineFrame | Frame'. Property '_blackboxRoot' does not exist on type 'string'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(171,49): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(171,49): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(203,24): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(222,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineFlameChartDataProvider.js(225,11): error TS2555: Expected at least 2 arguments, but got 1. @@ -13419,10 +13407,10 @@ node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1910,22): error TS node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1911,22): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1912,22): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1913,22): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. -node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1938,23): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1938,23): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1943,50): error TS2345: Argument of type 'HTMLImageElement' is not assignable to parameter of type '(new (width?: number, height?: number) => HTMLImageElement) | PromiseLike HTMLImageElement>'. Property 'then' is missing in type 'HTMLImageElement' but required in type 'PromiseLike HTMLImageElement>'. -node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1951,23): error TS2304: Cannot find name 'Image'. +node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1951,23): error TS2749: 'Image' refers to a value, but is being used as a type here. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1961,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1966,23): error TS2339: Property 'type' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1967,23): error TS2339: Property 'style' does not exist on type 'Element'. diff --git a/tests/baselines/reference/user/debug.log b/tests/baselines/reference/user/debug.log index 78c472d877f..4879bb3f8b3 100644 --- a/tests/baselines/reference/user/debug.log +++ b/tests/baselines/reference/user/debug.log @@ -53,21 +53,21 @@ node_modules/debug/src/browser.js(45,138): error TS2551: Property 'WebkitAppeara node_modules/debug/src/browser.js(46,70): error TS2339: Property 'firebug' does not exist on type 'Console'. node_modules/debug/src/browser.js(100,148): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. node_modules/debug/src/browser.js(152,13): error TS2304: Cannot find name 'LocalStorage'. -node_modules/debug/src/common.js(51,24): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/src/common.js(51,60): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. +node_modules/debug/src/common.js(51,24): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. +node_modules/debug/src/common.js(51,60): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. node_modules/debug/src/common.js(80,12): error TS2339: Property 'diff' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. node_modules/debug/src/common.js(81,12): error TS2339: Property 'prev' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. node_modules/debug/src/common.js(82,12): error TS2339: Property 'curr' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/src/common.js(113,19): error TS2551: Property 'formatArgs' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. Did you mean 'formatters'? +node_modules/debug/src/common.js(113,19): error TS2551: Property 'formatArgs' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. Did you mean 'formatters'? node_modules/debug/src/common.js(114,24): error TS2339: Property 'log' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/src/common.js(114,43): error TS2339: Property 'log' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/src/common.js(120,35): error TS2339: Property 'useColors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/src/common.js(127,28): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/src/common.js(128,19): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/src/common.js(159,17): error TS2339: Property 'save' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. +node_modules/debug/src/common.js(114,43): error TS2339: Property 'log' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. +node_modules/debug/src/common.js(120,35): error TS2339: Property 'useColors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. +node_modules/debug/src/common.js(127,28): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. +node_modules/debug/src/common.js(128,19): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. +node_modules/debug/src/common.js(159,17): error TS2339: Property 'save' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. node_modules/debug/src/common.js(230,13): error TS2304: Cannot find name 'Mixed'. node_modules/debug/src/common.js(231,14): error TS2304: Cannot find name 'Mixed'. -node_modules/debug/src/common.js(244,34): error TS2339: Property 'load' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. +node_modules/debug/src/common.js(244,34): error TS2339: Property 'load' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: { (value: number, options?: { ...; } | undefined): string; (value: string): number; }; ... 4 more ...; selectColor: (namespace...'. node_modules/debug/src/index.js(7,47): error TS2339: Property 'type' does not exist on type 'Process'. node_modules/debug/src/index.js(7,78): error TS2339: Property 'browser' does not exist on type 'Process'. node_modules/debug/src/index.js(7,106): error TS2339: Property '__nwjs' does not exist on type 'Process'. diff --git a/tests/baselines/reference/user/follow-redirects.log b/tests/baselines/reference/user/follow-redirects.log index 7e3f419696e..a5a92443227 100644 --- a/tests/baselines/reference/user/follow-redirects.log +++ b/tests/baselines/reference/user/follow-redirects.log @@ -2,12 +2,16 @@ Exit Code: 1 Standard output: node_modules/follow-redirects/index.js(105,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. node_modules/follow-redirects/index.js(106,10): error TS2339: Property 'abort' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(173,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(212,16): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(259,12): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(293,35): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. +node_modules/follow-redirects/index.js(153,10): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(156,12): error TS2339: Property 'socket' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(166,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(167,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(206,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(245,16): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(292,12): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(326,35): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/follow-redirects/index.js(306,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(339,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. diff --git a/tests/baselines/reference/voidAsNonAmbiguousReturnType.errors.txt b/tests/baselines/reference/voidAsNonAmbiguousReturnType.errors.txt index ce8b52f316c..09dfef337b2 100644 --- a/tests/baselines/reference/voidAsNonAmbiguousReturnType.errors.txt +++ b/tests/baselines/reference/voidAsNonAmbiguousReturnType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/voidAsNonAmbiguousReturnType_0.ts(1,17): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/voidAsNonAmbiguousReturnType_0.ts(1,17): error TS2394: This overload signature is not compatible with its implementation signature. ==== tests/cases/compiler/voidAsNonAmbiguousReturnType_1.ts (0 errors) ==== @@ -12,6 +12,7 @@ tests/cases/compiler/voidAsNonAmbiguousReturnType_0.ts(1,17): error TS2394: Over ==== tests/cases/compiler/voidAsNonAmbiguousReturnType_0.ts (1 errors) ==== export function mkdirSync(path: string, mode?: number): void; ~~~~~~~~~ -!!! error TS2394: Overload signature is not compatible with function implementation. +!!! error TS2394: This overload signature is not compatible with its implementation signature. +!!! related TS2750 tests/cases/compiler/voidAsNonAmbiguousReturnType_0.ts:2:17: The implementation signature is declared here. export function mkdirSync(path: string, mode?: string): void {} \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddMissingMember9.ts b/tests/cases/fourslash/codeFixAddMissingMember9.ts index b583cd28e9a..e22e854c2e5 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember9.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember9.ts @@ -18,7 +18,7 @@ verify.codeFixAll({ const x = 0; this.y(x, "a", this.z); } - y(x: number, arg1: string, z: boolean): any { + y(x: number, arg1: string, z: boolean) { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all.ts b/tests/cases/fourslash/codeFixAddMissingMember_all.ts index 6c7076dd341..9c0c86f282d 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all.ts @@ -36,7 +36,7 @@ verify.codeFixAll({ this.y(); this.x = ""; } - y(): any { + y() { throw new Error("Method not implemented."); } } diff --git a/tests/cases/fourslash/codeFixAddMissingMember_generator_function.ts b/tests/cases/fourslash/codeFixAddMissingMember_generator_function.ts index 6742cc43348..ad0bd7b47ca 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_generator_function.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_generator_function.ts @@ -14,7 +14,7 @@ verify.codeFixAll({ *method() { yield* this.y(); } - *y(): any { + *y() { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixAddMissingMember_non_generator_function.ts b/tests/cases/fourslash/codeFixAddMissingMember_non_generator_function.ts index a868646446a..c3773bf285c 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_non_generator_function.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_non_generator_function.ts @@ -14,7 +14,7 @@ verify.codeFixAll({ method() { yield* this.y(); } - y(): any { + y() { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts index 8f775d5158e..a8171668751 100644 --- a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts +++ b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts @@ -23,15 +23,15 @@ verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` - m2(c: C): any { + m2(c: C) { throw new Error("Method not implemented."); } y: {}; - m1(): any { + m1() { throw new Error("Method not implemented."); } static x: any; - static m0(arg0: number, arg1: string, arg2: undefined[]): any { + static m0(arg0: number, arg1: string, arg2: undefined[]) { throw new Error("Method not implemented."); } `); diff --git a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles3.ts b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles3.ts index dcf5c999d6a..9ea5ac1a165 100644 --- a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles3.ts +++ b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles3.ts @@ -20,7 +20,7 @@ verify.getAndApplyCodeFix(/*errorCode*/ undefined, 0); verify.rangeIs(` - m0(arg0: import("./f2").D): any { + m0(arg0: import("./f2").D) { throw new Error("Method not implemented."); } `); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index a406360c500..17fcd9ce688 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -20,7 +20,7 @@ verify.codeFix({ this.prop1 = 10; A.prop2 = "asdf"; } - static m1(arg0: number, arg1: number, arg2: number): any { + static m1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } }`, @@ -38,10 +38,10 @@ verify.codeFix({ this.prop1 = 10; A.prop2 = "asdf"; } - static m2(arg0: number, arg1: number): any { + static m2(arg0: number, arg1: number) { throw new Error("Method not implemented."); } - static m1(arg0: number, arg1: number, arg2: number): any { + static m1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } }`, @@ -60,10 +60,10 @@ verify.codeFix({ this.prop1 = 10; A.prop2 = "asdf"; } - static m2(arg0: number, arg1: number): any { + static m2(arg0: number, arg1: number) { throw new Error("Method not implemented."); } - static m1(arg0: number, arg1: number, arg2: number): any { + static m1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } }`, @@ -83,10 +83,10 @@ verify.codeFix({ this.prop1 = 10; A.prop2 = "asdf"; } - static m2(arg0: number, arg1: number): any { + static m2(arg0: number, arg1: number) { throw new Error("Method not implemented."); } - static m1(arg0: number, arg1: number, arg2: number): any { + static m1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixUndeclaredMethod.ts b/tests/cases/fourslash/codeFixUndeclaredMethod.ts index 151192078f3..32713e5dd19 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethod.ts @@ -15,7 +15,7 @@ verify.codeFix({ index: 0, newFileContent: `class A { - foo1(arg0: number, arg1: number, arg2: number): any { + foo1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } constructor() { @@ -34,10 +34,10 @@ verify.codeFix({ index: 0, newFileContent: `class A { - foo2(): any { + foo2() { throw new Error("Method not implemented."); } - foo1(arg0: number, arg1: number, arg2: number): any { + foo1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } constructor() { @@ -56,13 +56,13 @@ verify.codeFix({ index: 0, newFileContent: `class A { - foo3(): any { + foo3() { throw new Error("Method not implemented."); } - foo2(): any { + foo2() { throw new Error("Method not implemented."); } - foo1(arg0: number, arg1: number, arg2: number): any { + foo1(arg0: number, arg1: number, arg2: number) { throw new Error("Method not implemented."); } constructor() { diff --git a/tests/cases/fourslash/codeFixUndeclaredMethodFunctionArgs.ts b/tests/cases/fourslash/codeFixUndeclaredMethodFunctionArgs.ts index 478b2a7c647..c4056625b70 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethodFunctionArgs.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethodFunctionArgs.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Declare method 'foo1'", index: 0, newRangeContent: ` - foo1(arg0: () => number, arg1: () => string, arg2: () => boolean): any { + foo1(arg0: () => number, arg1: () => string, arg2: () => boolean) { throw new Error("Method not implemented."); } `, @@ -22,10 +22,10 @@ verify.codeFix({ description: "Declare method 'foo2'", index: 0, newRangeContent: ` - foo2(arg0: (a: number) => number, arg1: (b: string) => string, arg2: (c: boolean) => boolean): any { + foo2(arg0: (a: number) => number, arg1: (b: string) => string, arg2: (c: boolean) => boolean) { throw new Error("Method not implemented."); } - foo1(arg0: () => number, arg1: () => string, arg2: () => boolean): any { + foo1(arg0: () => number, arg1: () => string, arg2: () => boolean) { throw new Error("Method not implemented."); } `, diff --git a/tests/cases/fourslash/codeFixUndeclaredMethodObjectLiteralArgs.ts b/tests/cases/fourslash/codeFixUndeclaredMethodObjectLiteralArgs.ts index bd434cf9d9d..5c0698ad653 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethodObjectLiteralArgs.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethodObjectLiteralArgs.ts @@ -3,6 +3,8 @@ //// class A {[| //// |]constructor() { //// this.foo1(null, {}, { a: 1, b: "2"}); +//// const bar = this.foo2(null, {}, { a: 1, b: "2"}); +//// const baz: number = this.foo3(null, {}, { a: 1, b: "2"}); //// } //// } @@ -10,7 +12,38 @@ verify.codeFix({ description: "Declare method 'foo1'", index: 0, newRangeContent: ` - foo1(arg0: null, arg1: {}, arg2: { a: number; b: string; }): any { + foo1(arg0: null, arg1: {}, arg2: { a: number; b: string; }) { + throw new Error("Method not implemented."); + } + `, + applyChanges: true +}); + +verify.codeFix({ + description: "Declare method 'foo2'", + index: 0, + newRangeContent: ` + foo2(arg0: null, arg1: {}, arg2: { a: number; b: string; }) { + throw new Error("Method not implemented."); + } + foo1(arg0: null, arg1: {}, arg2: { a: number; b: string; }) { + throw new Error("Method not implemented."); + } + `, + applyChanges: true +}); + +verify.codeFix({ + description: "Declare method 'foo3'", + index: 0, + newRangeContent: ` + foo3(arg0: null, arg1: {}, arg2: { a: number; b: string; }): number { + throw new Error("Method not implemented."); + } + foo2(arg0: null, arg1: {}, arg2: { a: number; b: string; }) { + throw new Error("Method not implemented."); + } + foo1(arg0: null, arg1: {}, arg2: { a: number; b: string; }) { throw new Error("Method not implemented."); } `