From 336c37662d11f8c8bc0751d98f051c44f23b56f7 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Sat, 9 Jun 2018 16:48:08 -0700 Subject: [PATCH] Projzilla phase 1 --- Jakefile.js | 1145 +- scripts/tslint/tsconfig.json | 2 + src/built/local/cancellationToken.js | 57 + src/built/local/cancellationToken.js.map | 1 + src/built/local/harness.d.ts | 2223 +++ src/built/local/harness.js | 11641 ++++++++++++++++ src/built/local/harness.js.map | 1 + .../cancellationToken/cancellationToken.ts | 0 .../cancellationToken/tsconfig.json | 5 +- src/compiler/resolutionCache.ts | 16 +- src/compiler/tsconfig.json | 20 +- src/{compiler => core}/core.ts | 1774 +-- src/{compiler => core}/performance.ts | 0 src/core/tsconfig.json | 11 + src/{server => harness}/client.ts | 0 src/harness/fourslash.ts | 32 +- src/harness/harness.ts | 28 - src/harness/harnessLanguageService.ts | 5 - src/harness/loggedIO.ts | 6 - src/harness/sourceMapRecorder.ts | 17 - src/harness/tsconfig.json | 162 +- src/harness/virtualFileSystemWithWatch.ts | 2 - src/{compiler => parser}/commandLineParser.ts | 0 .../diagnosticInformationMap.generated.ts | 1107 ++ src/parser/diagnosticMessages.generated.json | 1098 ++ .../diagnosticMessages.json | 0 src/{compiler => parser}/parser.ts | 0 src/{compiler => parser}/scanner.ts | 0 src/{compiler => parser}/sys.ts | 0 src/parser/tsconfig.json | 18 + src/{compiler => parser}/types.ts | 61 - src/{compiler => parser}/utilities.ts | 1581 ++- src/server/tsconfig.json | 128 +- src/server/tsconfig.library.json | 146 - src/server/typingsInstaller/tsconfig.json | 32 - src/services/tsconfig.json | 51 +- src/{harness => testRunner}/compilerRunner.ts | 8 - .../externalCompileRunner.ts | 2 - .../fourslashRunner.ts | 23 +- src/{harness => testRunner}/parallel/host.ts | 0 .../parallel/shared.ts | 0 .../parallel/worker.ts | 0 src/{harness => testRunner}/projectsRunner.ts | 8 - src/{harness => testRunner}/runner.ts | 50 +- src/{harness => testRunner}/rwcRunner.ts | 4 - src/{harness => testRunner}/test262Runner.ts | 2 - src/testRunner/tsconfig.json | 39 + src/{compiler => tsc}/tsc.ts | 0 src/tsc/tsconfig.json | 13 + src/tsconfig-base.json | 13 +- src/tsconfig.json | 7 + src/{server => tsserver}/server.ts | 0 src/tsserver/tsconfig.json | 19 + .../typingsInstaller/nodeTypingsInstaller.ts | 0 src/typingsInstaller/tsconfig.json | 28 + src/typingsInstallerCore/tsconfig.json | 25 + .../typingsInstaller.ts | 0 src/{harness => }/unittests/asserts.ts | 2 - src/{harness => }/unittests/base64.ts | 1 - src/{harness => }/unittests/builder.ts | 2 - .../cancellableLanguageServiceOperations.ts | 2 - .../unittests/commandLineParsing.ts | 3 - src/{harness => }/unittests/compileOnSave.ts | 4 - .../unittests/configurationExtension.ts | 4 - .../convertCompilerOptionsFromJson.ts | 5 - .../unittests/convertToBase64.ts | 2 - .../convertTypeAcquisitionFromJson.ts | 5 - .../unittests/customTransforms.ts | 3 - .../unittests/evaluation/asyncArrow.ts | 0 .../unittests/evaluation/asyncGenerator.ts | 0 .../unittests/evaluation/forAwaitOf.ts | 0 .../unittests/extractConstants.ts | 2 - .../unittests/extractFunctions.ts | 2 - src/{harness => }/unittests/extractRanges.ts | 2 - .../unittests/extractTestHelpers.ts | 3 - .../unittests/hostNewLineSupport.ts | 1 - .../unittests/incrementalParser.ts | 3 - .../unittests/initializeTSConfig.ts | 3 - src/{harness => }/unittests/jsDocParsing.ts | 3 - .../unittests/languageService.ts | 2 - src/{harness => }/unittests/matchFiles.ts | 4 - .../unittests/moduleResolution.ts | 2 - .../unittests/organizeImports.ts | 4 - src/{harness => }/unittests/paths.ts | 0 src/{harness => }/unittests/printer.ts | 3 - .../unittests/programMissingFiles.ts | 4 - .../unittests/programNoParseFalsyFileNames.ts | 1 - src/{harness => }/unittests/projectErrors.ts | 4 - .../unittests/projectReferences.ts | 3 - src/{harness => }/unittests/publicApi.ts | 2 - .../unittests/reuseProgramStructure.ts | 3 - .../unittests/services/colorization.ts | 2 - .../unittests/services/documentRegistry.ts | 2 - .../unittests/services/patternMatcher.ts | 2 - .../unittests/services/preProcessFile.ts | 2 - src/{harness => }/unittests/session.ts | 2 - src/{harness => }/unittests/symbolWalker.ts | 2 - src/{harness => }/unittests/telemetry.ts | 3 - src/{harness => }/unittests/textChanges.ts | 4 - src/{harness => }/unittests/textStorage.ts | 4 - src/{harness => }/unittests/transform.ts | 3 - src/{harness => }/unittests/transpile.ts | 2 - src/{harness => }/unittests/tsbuild.ts | 0 src/{harness => }/unittests/tscWatchMode.ts | 4 - src/unittests/tsconfig.json | 23 + .../unittests/tsconfigParsing.ts | 5 - .../unittests/tsserverProjectSystem.ts | 4 - .../unittests/typingsInstaller.ts | 5 - src/{harness => }/unittests/versionCache.ts | 3 - src/{server => }/watchGuard/tsconfig.json | 4 +- src/{server => }/watchGuard/watchGuard.ts | 0 111 files changed, 18277 insertions(+), 3494 deletions(-) create mode 100644 src/built/local/cancellationToken.js create mode 100644 src/built/local/cancellationToken.js.map create mode 100644 src/built/local/harness.d.ts create mode 100644 src/built/local/harness.js create mode 100644 src/built/local/harness.js.map rename src/{server => }/cancellationToken/cancellationToken.ts (100%) rename src/{server => }/cancellationToken/tsconfig.json (62%) rename src/{compiler => core}/core.ts (52%) rename src/{compiler => core}/performance.ts (100%) create mode 100644 src/core/tsconfig.json rename src/{server => harness}/client.ts (100%) rename src/{compiler => parser}/commandLineParser.ts (100%) create mode 100644 src/parser/diagnosticInformationMap.generated.ts create mode 100644 src/parser/diagnosticMessages.generated.json rename src/{compiler => parser}/diagnosticMessages.json (100%) rename src/{compiler => parser}/parser.ts (100%) rename src/{compiler => parser}/scanner.ts (100%) rename src/{compiler => parser}/sys.ts (100%) create mode 100644 src/parser/tsconfig.json rename src/{compiler => parser}/types.ts (97%) rename src/{compiler => parser}/utilities.ts (77%) delete mode 100644 src/server/tsconfig.library.json delete mode 100644 src/server/typingsInstaller/tsconfig.json rename src/{harness => testRunner}/compilerRunner.ts (95%) rename src/{harness => testRunner}/externalCompileRunner.ts (97%) rename src/{harness => testRunner}/fourslashRunner.ts (79%) rename src/{harness => testRunner}/parallel/host.ts (100%) rename src/{harness => testRunner}/parallel/shared.ts (100%) rename src/{harness => testRunner}/parallel/worker.ts (100%) rename src/{harness => testRunner}/projectsRunner.ts (97%) rename src/{harness => testRunner}/runner.ts (80%) rename src/{harness => testRunner}/rwcRunner.ts (96%) rename src/{harness => testRunner}/test262Runner.ts (96%) create mode 100644 src/testRunner/tsconfig.json rename src/{compiler => tsc}/tsc.ts (100%) create mode 100644 src/tsc/tsconfig.json create mode 100644 src/tsconfig.json rename src/{server => tsserver}/server.ts (100%) create mode 100644 src/tsserver/tsconfig.json rename src/{server => }/typingsInstaller/nodeTypingsInstaller.ts (100%) create mode 100644 src/typingsInstaller/tsconfig.json create mode 100644 src/typingsInstallerCore/tsconfig.json rename src/{server/typingsInstaller => typingsInstallerCore}/typingsInstaller.ts (100%) rename src/{harness => }/unittests/asserts.ts (91%) rename src/{harness => }/unittests/base64.ts (92%) rename src/{harness => }/unittests/builder.ts (97%) rename src/{harness => }/unittests/cancellableLanguageServiceOperations.ts (97%) rename src/{harness => }/unittests/commandLineParsing.ts (97%) rename src/{harness => }/unittests/compileOnSave.ts (97%) rename src/{harness => }/unittests/configurationExtension.ts (97%) rename src/{harness => }/unittests/convertCompilerOptionsFromJson.ts (97%) rename src/{harness => }/unittests/convertToBase64.ts (94%) rename src/{harness => }/unittests/convertTypeAcquisitionFromJson.ts (95%) rename src/{harness => }/unittests/customTransforms.ts (95%) rename src/{harness => }/unittests/evaluation/asyncArrow.ts (100%) rename src/{harness => }/unittests/evaluation/asyncGenerator.ts (100%) rename src/{harness => }/unittests/evaluation/forAwaitOf.ts (100%) rename src/{harness => }/unittests/extractConstants.ts (95%) rename src/{harness => }/unittests/extractFunctions.ts (95%) rename src/{harness => }/unittests/extractRanges.ts (95%) rename src/{harness => }/unittests/extractTestHelpers.ts (96%) rename src/{harness => }/unittests/hostNewLineSupport.ts (96%) rename src/{harness => }/unittests/incrementalParser.ts (97%) rename src/{harness => }/unittests/initializeTSConfig.ts (93%) rename src/{harness => }/unittests/jsDocParsing.ts (96%) rename src/{harness => }/unittests/languageService.ts (95%) rename src/{harness => }/unittests/matchFiles.ts (97%) rename src/{harness => }/unittests/moduleResolution.ts (98%) rename src/{harness => }/unittests/organizeImports.ts (96%) rename src/{harness => }/unittests/paths.ts (100%) rename src/{harness => }/unittests/printer.ts (97%) rename src/{harness => }/unittests/programMissingFiles.ts (95%) rename src/{harness => }/unittests/programNoParseFalsyFileNames.ts (96%) rename src/{harness => }/unittests/projectErrors.ts (96%) rename src/{harness => }/unittests/projectReferences.ts (96%) rename src/{harness => }/unittests/publicApi.ts (94%) rename src/{harness => }/unittests/reuseProgramStructure.ts (98%) rename src/{harness => }/unittests/services/colorization.ts (97%) rename src/{harness => }/unittests/services/documentRegistry.ts (97%) rename src/{harness => }/unittests/services/patternMatcher.ts (97%) rename src/{harness => }/unittests/services/preProcessFile.ts (97%) rename src/{harness => }/unittests/session.ts (97%) rename src/{harness => }/unittests/symbolWalker.ts (95%) rename src/{harness => }/unittests/telemetry.ts (96%) rename src/{harness => }/unittests/textChanges.ts (97%) rename src/{harness => }/unittests/textStorage.ts (93%) rename src/{harness => }/unittests/transform.ts (97%) rename src/{harness => }/unittests/transpile.ts (97%) rename src/{harness => }/unittests/tsbuild.ts (100%) rename src/{harness => }/unittests/tscWatchMode.ts (97%) create mode 100644 src/unittests/tsconfig.json rename src/{harness => }/unittests/tsconfigParsing.ts (96%) rename src/{harness => }/unittests/tsserverProjectSystem.ts (97%) rename src/{harness => }/unittests/typingsInstaller.ts (97%) rename src/{harness => }/unittests/versionCache.ts (96%) rename src/{server => }/watchGuard/tsconfig.json (64%) rename src/{server => }/watchGuard/watchGuard.ts (100%) diff --git a/Jakefile.js b/Jakefile.js index a6483355c73..8329f66118f 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -2,759 +2,71 @@ // @ts-check /// -var fs = require("fs"); -var os = require("os"); -var path = require("path"); -var child_process = require("child_process"); -var fold = require("travis-fold"); -var ts = require("./lib/typescript"); +const fs = require("fs"); +const os = require("os"); +const path = require("path"); +const child_process = require("child_process"); +const fold = require("travis-fold"); +const ts = require("./lib/typescript"); +const del = require("del"); const getDirSize = require("./scripts/build/getDirSize"); -// Variables -var compilerDirectory = "src/compiler/"; -var serverDirectory = "src/server/"; -var harnessDirectory = "src/harness/"; -var libraryDirectory = "src/lib/"; -var scriptsDirectory = "scripts/"; -var unittestsDirectory = "src/harness/unittests/"; -var docDirectory = "doc/"; -var lclDirectory = "src/loc/lcl"; +const host = process.env.TYPESCRIPT_HOST || process.env.host || "node"; -var builtDirectory = "built/"; -var builtLocalDirectory = "built/local/"; -var LKGDirectory = "lib/"; +const defaultTestTimeout = 40000; -var copyright = "CopyrightNotice.txt"; -var thirdParty = "ThirdPartyNoticeText.txt"; - -var defaultTestTimeout = 40000; - -// 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 TaskNames = { + runtests: "runtests", + runtestsParallel: "runtests-parallel", + buildRules: "build-rules", + clean: "clean" } -/** - * @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); -} - -/** @param diagnostics {ts.Diagnostic[]} */ -function reportDiagnostics(diagnostics) { - console.log(diagnosticsToString(diagnostics, process.stdout.isTTY)); -} - -/** @param jsonPath {string} */ -function readJson(jsonPath) { - const jsonText = fs.readFileSync(jsonPath, "utf8"); - const result = ts.parseConfigFileTextToJson(jsonPath, jsonText); - if (result.error) { - reportDiagnostics([result.error]); - throw new Error("An error occurred during parse."); +const Paths = { + lkgCompiler: "lib/tsc.js", + built: "built", + builtLocal: "built/local", + builtLocalCompiler: "built/local/tsc.js", + builtLocalRun: "built/local/run.js", + baselines: { + local: "tests/baselines/local", + localTest262: "tests/baselines/test262/local", + localRwc: "tests/baselines/rwc/local", + reference: "tests/baselines/reference", + referenceTest262: "tests/baselines/test262/reference", + referenceTwc: "tests/baselines/rwc/reference" } - return result.config; } -/** @param configPath {string} */ -function filesFromConfig(configPath) { - const config = readJson(configPath); - const configFileContent = ts.parseJsonConfigFileContent(config, ts.sys, path.dirname(configPath)); - if (configFileContent.errors && configFileContent.errors.length) { - reportDiagnostics(configFileContent.errors); - throw new Error("An error occurred during parse."); - } - return configFileContent.fileNames; -} +const ConfigFileFor = { + tsc: "src/tsc", + tsserver: "src/tsserver", + runjs: "src/testRunner", + lint: "scripts/tslint" +}; -function toNs(diff) { - return diff[0] * 1e9 + diff[1]; -} +desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true."); +task(TaskNames.runtestsParallel, [TaskNames.buildRules], function() { + tsbuild(ConfigFileFor.runjs); + runConsoleTests("min", /*parallel*/ true); +}, { async: true}); -function 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 - }; -} +desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true."); +task(TaskNames.runtests, [TaskNames.buildRules], function() { + tsbuild(ConfigFileFor.runjs); + runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false);; +}, { async: true}); -function 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 removeConstModifierFromEnumDeclarations(text) { - return text.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4'); -} - -var compilerSources = filesFromConfig("./src/compiler/tsconfig.json"); -var servicesSources = filesFromConfig("./src/services/tsconfig.json"); -var cancellationTokenSources = filesFromConfig(path.join(serverDirectory, "cancellationToken/tsconfig.json")); -var typingsInstallerSources = filesFromConfig(path.join(serverDirectory, "typingsInstaller/tsconfig.json")); -var watchGuardSources = filesFromConfig(path.join(serverDirectory, "watchGuard/tsconfig.json")); -var serverSources = filesFromConfig(path.join(serverDirectory, "tsconfig.json")); -var languageServiceLibrarySources = filesFromConfig(path.join(serverDirectory, "tsconfig.library.json")); -var harnessSources = filesFromConfig("./src/harness/tsconfig.json"); - -var typesMapOutputPath = path.join(builtLocalDirectory, 'typesMap.json'); - -/** @type {{ libs: string[], paths?: Record, sources?: Record }} */ -var libraries = readJson("./src/lib/libs.json"); - -/** - * .lcg file is what localization team uses to know what messages to localize. - * The file is always generated in 'enu\diagnosticMessages.generated.json.lcg' - */ -var generatedLCGFile = path.join(builtLocalDirectory, "enu", "diagnosticMessages.generated.json.lcg"); - -/** - * The localization target produces the two following transformations: - * 1. 'src\loc\lcl\\diagnosticMessages.generated.json.lcl' => 'built\local\\diagnosticMessages.generated.json' - * convert localized resources into a .json file the compiler can understand - * 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg' - * generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json - */ -var localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"].map(function (f) { - return path.join(builtLocalDirectory, f); -}).concat(path.dirname(generatedLCGFile)); - -// Prepends the contents of prefixFile to destinationFile -function prependFile(prefixFile, destinationFile) { - if (!fs.existsSync(prefixFile)) { - fail(prefixFile + " does not exist!"); - } - if (!fs.existsSync(destinationFile)) { - fail(destinationFile + " failed to be created!"); - } - var temp = "temptemp"; - jake.cpR(prefixFile, temp, { silent: true }); - fs.appendFileSync(temp, fs.readFileSync(destinationFile)); - fs.renameSync(temp, destinationFile); -} - -// concatenate a list of sourceFiles to a destinationFile -function concatenateFiles(destinationFile, sourceFiles) { - 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 += fs.readFileSync(sourceFiles[i]).toString().replace(/\r?\n/g, "\n"); - } - fs.writeFileSync(temp, text); - // Move the file to the final destination - fs.renameSync(temp, destinationFile); -} - -var useDebugMode = true; -var host = process.env.TYPESCRIPT_HOST || process.env.host || "node"; -var compilerFilename = "tsc.js"; -var LKGCompiler = path.join(LKGDirectory, compilerFilename); -var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename); - -/** - * Compiles a file from a list of sources - * @param {string} outFile the target file name - * @param {string[]} sources an array of the names of the source files - * @param {string[]} prereqs prerequisite tasks to compiling the file - * @param {string[]} prefixes a list of files to prepend to the target file - * @param {boolean} useBuiltCompiler true to use the built compiler, false to use the LKG - * @param {object} [opts] property bag containing auxiliary options - * @param {boolean} [opts.noOutFile] true to compile without using --out - * @param {boolean} [opts.generateDeclarations] true to compile using --declaration - * @param {string} [opts.outDir] value for '--outDir' command line option - * @param {boolean} [opts.keepComments] false to compile using --removeComments - * @param {boolean} [opts.preserveConstEnums] true if compiler should keep const enums in code - * @param {boolean} [opts.noResolve] true if compiler should not include non-rooted files in compilation - * @param {boolean} [opts.stripInternal] true if compiler should remove declarations marked as internal - * @param {boolean} [opts.inlineSourceMap] true if compiler should inline sourceMap - * @param {string[]} [opts.types] array of types to include in compilation - * @param {string} [opts.lib] explicit libs to include. - * @param {function(): void} [callback] a function to execute after the compilation process ends - */ -function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts, callback) { - file(outFile, prereqs, function() { - var startCompileTime = mark(); - opts = opts || {}; - var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler; - var options = "--noImplicitAny --noImplicitThis --alwaysStrict --noEmitOnError"; - if (opts.types) { - options += " --types " + opts.types.join(","); - } - options += " --pretty"; - // Keep comments when specifically requested - // or when in debug mode. - if (!(opts.keepComments || useDebugMode)) { - options += " --removeComments"; - } - - if (opts.generateDeclarations) { - options += " --declaration"; - } - - if (opts.preserveConstEnums || useDebugMode) { - options += " --preserveConstEnums"; - } - - if (opts.outDir) { - options += " --outDir " + opts.outDir; - } - - if (!opts.noOutFile) { - options += " --out " + outFile; - } - else { - options += " --module commonjs"; - } - - if (opts.noResolve) { - options += " --noResolve"; - } - - if (useDebugMode) { - if (opts.inlineSourceMap) { - options += " --inlineSourceMap --inlineSources"; - } - else { - options += " --sourcemap"; - } - } - options += " --newLine LF"; - - if (opts.stripInternal) { - options += " --stripInternal"; - } - options += " --target es5"; - if (opts.lib) { - options += " --lib " + opts.lib; - } - else { - options += " --lib es5"; - } - options += " --noUnusedLocals --noUnusedParameters --strictNullChecks"; - - var cmd = host + " " + compilerPath + " " + options + " "; - cmd = cmd + sources.join(" "); - console.log(cmd + "\n"); - - var ex = jake.createExec([cmd]); - // 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 (!useDebugMode && prefixes && fs.existsSync(outFile)) { - for (var i in prefixes) { - prependFile(prefixes[i], outFile); - } - } - - if (callback) { - callback(); - } - - measure(startCompileTime); - complete(); - }); - ex.addListener("error", function () { - fs.unlinkSync(outFile); - fail("Compilation of " + outFile + " unsuccessful"); - measure(startCompileTime); - }); - ex.run(); - }, { async: true }); -} - -// Prerequisite task for built directory and library typings -directory(builtLocalDirectory); - -var libraryTargets = libraries.libs.map(function (lib) { - var relativeSources = ["header.d.ts"].concat(libraries.sources && libraries.sources[lib] || [lib + ".d.ts"]); - var relativeTarget = libraries.paths && libraries.paths[lib] || ("lib." + lib + ".d.ts"); - var sources = [copyright].concat(relativeSources.map(s => path.join(libraryDirectory, s))); - var target = path.join(builtLocalDirectory, relativeTarget); - file(target, [builtLocalDirectory].concat(sources), function () { - concatenateFiles(target, sources); - }); - return target; -}); - -// Lib target to build the library files -desc("Builds the library targets"); -task("lib", libraryTargets); - - -// Generate diagnostics -var processDiagnosticMessagesJs = path.join(scriptsDirectory, "processDiagnosticMessages.js"); -var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnosticMessages.ts"); -var processDiagnosticMessagesSources = filesFromConfig("./scripts/processDiagnosticMessages.tsconfig.json"); - -var diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json"); -var diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts"); -var generatedDiagnosticMessagesJSON = path.join(compilerDirectory, "diagnosticMessages.generated.json"); -var builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "diagnosticMessages.generated.json"); - -file(processDiagnosticMessagesTs); - -// processDiagnosticMessages script -compileFile(processDiagnosticMessagesJs, - processDiagnosticMessagesSources, - processDiagnosticMessagesSources, - [], - /*useBuiltCompiler*/ false); - -// Localize diagnostics script -var generateLocalizedDiagnosticMessagesJs = path.join(scriptsDirectory, "generateLocalizedDiagnosticMessages.js"); -var generateLocalizedDiagnosticMessagesTs = path.join(scriptsDirectory, "generateLocalizedDiagnosticMessages.ts"); - -file(generateLocalizedDiagnosticMessagesTs); - -compileFile(generateLocalizedDiagnosticMessagesJs, - [generateLocalizedDiagnosticMessagesTs], - [generateLocalizedDiagnosticMessagesTs], - [], - /*useBuiltCompiler*/ false, { noOutFile: true, types: ["node", "xml2js"] }); - -// Localize diagnostics -file(generatedLCGFile, [generateLocalizedDiagnosticMessagesJs, diagnosticInfoMapTs, generatedDiagnosticMessagesJSON], function () { - var cmd = host + " " + generateLocalizedDiagnosticMessagesJs + " " + lclDirectory + " " + builtLocalDirectory + " " + generatedDiagnosticMessagesJSON; - console.log(cmd); - var ex = jake.createExec([cmd]); - // 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 () { - complete(); - }); - ex.run(); +desc("Compiles tslint rules to js"); +task(TaskNames.buildRules, [], function() { + tsbuild(ConfigFileFor.lint); }, { async: true }); -task("localize", [generatedLCGFile]); - -var buildProtocolTs = path.join(scriptsDirectory, "buildProtocol.ts"); -var buildProtocolJs = path.join(scriptsDirectory, "buildProtocol.js"); -var buildProtocolDts = path.join(builtLocalDirectory, "protocol.d.ts"); -var typescriptServicesDts = path.join(builtLocalDirectory, "typescriptServices.d.ts"); - -file(buildProtocolTs); - -compileFile(buildProtocolJs, - [buildProtocolTs], - [buildProtocolTs], - [], - /*useBuiltCompiler*/ false, - { noOutFile: true, lib: "es6" }); - -file(buildProtocolDts, [buildProtocolTs, buildProtocolJs, typescriptServicesDts], function() { - - var protocolTs = path.join(serverDirectory, "protocol.ts"); - - var cmd = host + " " + buildProtocolJs + " "+ protocolTs + " " + typescriptServicesDts + " " + buildProtocolDts; - console.log(cmd); - var ex = jake.createExec([cmd]); - // 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 () { - complete(); - }); - ex.run(); -}, { async: true }); - -// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task -file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () { - var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson; - console.log(cmd); - var ex = jake.createExec([cmd]); - // 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 () { - complete(); - }); - ex.run(); -}, { async: true }); - -file(builtGeneratedDiagnosticMessagesJSON, [generatedDiagnosticMessagesJSON], function () { - if (fs.existsSync(builtLocalDirectory)) { - jake.cpR(generatedDiagnosticMessagesJSON, builtGeneratedDiagnosticMessagesJSON); - } -}); - -desc("Generates a diagnostic file in TypeScript based on an input JSON file"); -task("generate-diagnostics", [diagnosticInfoMapTs]); - -// Publish nightly -var configurePrereleaseJs = path.join(scriptsDirectory, "configurePrerelease.js"); -var configurePrereleaseTs = path.join(scriptsDirectory, "configurePrerelease.ts"); -var packageJson = "package.json"; -var versionFile = path.join(compilerDirectory, "core.ts"); - -file(configurePrereleaseTs); - -compileFile(/*outfile*/configurePrereleaseJs, - /*sources*/[configurePrereleaseTs], - /*prereqs*/[configurePrereleaseTs], - /*prefixes*/[], - /*useBuiltCompiler*/ false, - { noOutFile: true, generateDeclarations: false, keepComments: false, noResolve: false, stripInternal: false }); - -task("setDebugMode", function () { - useDebugMode = true; -}); - -task("configure-nightly", [configurePrereleaseJs], function () { - var cmd = host + " " + configurePrereleaseJs + " dev " + packageJson + " " + versionFile; - console.log(cmd); - exec(cmd); -}, { async: true }); - -desc("Configure, build, test, and publish the nightly release."); -task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "runtests-parallel"], function () { - var cmd = "npm publish --tag next"; - console.log(cmd); - exec(cmd); -}); - -task("configure-insiders", [configurePrereleaseJs], function () { - var cmd = host + " " + configurePrereleaseJs + " insiders " + packageJson + " " + versionFile; - console.log(cmd); - exec(cmd); -}, { async: true }); - -desc("Configure, build, test, and publish the insiders release."); -task("publish-insiders", ["configure-insiders", "LKG", "clean", "setDebugMode", "runtests-parallel"], function () { - var cmd = "npm publish --tag insiders"; - console.log(cmd); - exec(cmd); -}); - -var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests"); -var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js"); -var importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts"); - -file(importDefinitelyTypedTestsTs); -file(importDefinitelyTypedTestsJs, ["tsd-scripts", importDefinitelyTypedTestsTs], function () { - var cmd = host + " " + LKGCompiler + " -p " + importDefinitelyTypedTestsDirectory; - console.log(cmd); - exec(cmd); -}, { async: true }); - -task("importDefinitelyTypedTests", [importDefinitelyTypedTestsJs], function () { - var cmd = host + " " + importDefinitelyTypedTestsJs + " ./ ../DefinitelyTyped"; - console.log(cmd); - exec(cmd); -}, { async: true }); - -// Local target to build the compiler and services -var tscFile = path.join(builtLocalDirectory, compilerFilename); -compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); - -var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js"); -var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); -var nodePackageFile = path.join(builtLocalDirectory, "typescript.js"); -var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts"); -var nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_standalone.d.ts"); - -compileFile(servicesFile, servicesSources, [builtLocalDirectory, copyright].concat(servicesSources), - /*prefixes*/[copyright], - /*useBuiltCompiler*/ true, - /*opts*/ { - noOutFile: false, - generateDeclarations: true, - preserveConstEnums: true, - keepComments: true, - noResolve: false, - stripInternal: true - }, - /*callback*/ function () { - jake.cpR(servicesFile, nodePackageFile, { silent: true }); - - prependFile(copyright, standaloneDefinitionsFile); - - // Stanalone/web definition file using global 'ts' namespace - jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, { silent: true }); - var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString(); - definitionFileContents = removeConstModifierFromEnumDeclarations(definitionFileContents); - fs.writeFileSync(standaloneDefinitionsFile, definitionFileContents); - - // Official node package definition file, pointed to by 'typings' in package.json - // Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module - var nodeDefinitionsFileContents = definitionFileContents + "\nexport = ts;"; - fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents); - - // Node package definition file to be distributed without the package. Created by replacing - // 'ts' namespace with '"typescript"' as a module. - var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"'); - fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents); - }); - -file(typescriptServicesDts, [servicesFile]); - -var cancellationTokenFile = path.join(builtLocalDirectory, "cancellationToken.js"); -compileFile(cancellationTokenFile, cancellationTokenSources, [builtLocalDirectory].concat(cancellationTokenSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], outDir: builtLocalDirectory, noOutFile: true, lib: "es6" }); - -var typingsInstallerFile = path.join(builtLocalDirectory, "typingsInstaller.js"); -compileFile(typingsInstallerFile, typingsInstallerSources, [builtLocalDirectory].concat(typingsInstallerSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], outDir: builtLocalDirectory, noOutFile: false, lib: "es6" }); - -var watchGuardFile = path.join(builtLocalDirectory, "watchGuard.js"); -compileFile(watchGuardFile, watchGuardSources, [builtLocalDirectory].concat(watchGuardSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], outDir: builtLocalDirectory, noOutFile: false, lib: "es6" }); - -var serverFile = path.join(builtLocalDirectory, "tsserver.js"); -compileFile(serverFile, serverSources, [builtLocalDirectory, copyright, cancellationTokenFile, typingsInstallerFile, watchGuardFile].concat(serverSources).concat(servicesSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], preserveConstEnums: true, lib: "es6" }); -var tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js"); -var tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts"); -file(typesMapOutputPath, /** @type {*} */(function() { - var content = fs.readFileSync(path.join(serverDirectory, 'typesMap.json')); - // Validate that it's valid JSON - try { - JSON.parse(content.toString()); - } catch (e) { - console.log("Parse error in typesMap.json: " + e); - } - fs.writeFileSync(typesMapOutputPath, content); -})); -compileFile( - tsserverLibraryFile, - languageServiceLibrarySources, - [builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets), - /*prefixes*/[copyright], - /*useBuiltCompiler*/ true, - { noOutFile: false, generateDeclarations: true, stripInternal: true, preserveConstEnums: true, keepComments: true }, - /*callback*/ function () { - prependFile(copyright, tsserverLibraryDefinitionFile); - - // Appending exports at the end of the server library - var tsserverLibraryDefinitionFileContents = - fs.readFileSync(tsserverLibraryDefinitionFile).toString() + - "\nexport = ts;" + - "\nexport as namespace ts;"; - tsserverLibraryDefinitionFileContents = removeConstModifierFromEnumDeclarations(tsserverLibraryDefinitionFileContents); - - fs.writeFileSync(tsserverLibraryDefinitionFile, tsserverLibraryDefinitionFileContents); - }); - -// Local target to build the language service server library -desc("Builds language service server library"); -task("lssl", [tsserverLibraryFile, tsserverLibraryDefinitionFile, typesMapOutputPath]); - -desc("Emit the start of the build fold"); -task("build-fold-start", [], function () { - if (fold.isTravis()) console.log(fold.start("build")); -}); - -desc("Emit the end of the build fold"); -task("build-fold-end", [], function () { - if (fold.isTravis()) console.log(fold.end("build")); -}); - -// Local target to build the compiler and services -desc("Builds the full compiler and services"); -task("local", ["build-fold-start", "generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, buildProtocolDts, builtGeneratedDiagnosticMessagesJSON, "lssl", "localize", "build-fold-end"]); - -// Local target to build only tsc.js -desc("Builds only the compiler"); -task("tsc", ["generate-diagnostics", "lib", tscFile]); - -// Local target to build the compiler and services -desc("Sets release mode flag"); -task("release", function () { - useDebugMode = false; -}); - -// Set the default task to "local" -task("default", ["local"]); - -// Cleans the built directory desc("Cleans the compiler output, declare files, and tests"); task("clean", function () { - jake.rmRf(builtDirectory); + jake.rmRf(Paths.built);; }); -// Generate Markdown spec -var word2mdJs = path.join(scriptsDirectory, "word2md.js"); -var word2mdTs = path.join(scriptsDirectory, "word2md.ts"); -var specWord = path.join(docDirectory, "TypeScript Language Specification.docx"); -var specMd = path.join(docDirectory, "spec.md"); - -file(word2mdTs); - -// word2md script -compileFile(word2mdJs, - [word2mdTs], - [word2mdTs], - [], - /*useBuiltCompiler*/ false, - { - lib: "scripthost,es5" - }); - -// The generated spec.md; built for the 'generate-spec' task -file(specMd, [word2mdJs, specWord], function () { - var specWordFullPath = path.resolve(specWord); - var specMDFullPath = path.resolve(specMd); - var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + '"' + specMDFullPath + '"'; - console.log(cmd); - child_process.exec(cmd, function () { - complete(); - }); -}, { async: true }); - - -desc("Generates a Markdown version of the Language Specification"); -task("generate-spec", [specMd]); - - -// 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("LKG", ["clean", "release", "local"].concat(libraryTargets), () => { - const sizeBefore = getDirSize(LKGDirectory); - var expectedFiles = [tscFile, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, cancellationTokenFile, typingsInstallerFile, buildProtocolDts, watchGuardFile]. - concat(libraryTargets). - concat(localizationTargets); - var missingFiles = expectedFiles.filter(f => !fs.existsSync(f)); - if (missingFiles.length > 0) { - fail(new Error("Cannot replace the LKG unless all built targets are present in directory " + builtLocalDirectory + - ". The following files are missing:\n" + missingFiles.join("\n"))); - } - // Copy all the targets into the LKG directory - jake.mkdirP(LKGDirectory); - expectedFiles.forEach(f => jake.cpR(f, LKGDirectory)); - - const sizeAfter = getDirSize(LKGDirectory); - if (sizeAfter > (sizeBefore * 1.10)) { - throw new Error("The lib folder increased by 10% or more. This likely indicates a bug."); - } -}); - -// Test directory -directory(builtLocalDirectory); - -// Task to build the tests infrastructure using the built compiler -var run = path.join(builtLocalDirectory, "run.js"); -compileFile( - /*outFile*/ run, - /*source*/ harnessSources, - /*prereqs*/[builtLocalDirectory, tscFile, tsserverLibraryFile].concat(libraryTargets).concat(servicesSources).concat(harnessSources), - /*prefixes*/[], - /*useBuiltCompiler:*/ true, - /*opts*/ { types: ["node", "mocha", "chai"], lib: "es6" }); - -var internalTests = "internal/"; - -var localBaseline = "tests/baselines/local/"; -var refBaseline = "tests/baselines/reference/"; - -var localRwcBaseline = path.join(internalTests, "baselines/rwc/local"); -var refRwcBaseline = path.join(internalTests, "baselines/rwc/reference"); - -var localTest262Baseline = path.join(internalTests, "baselines/test262/local"); -var refTest262Baseline = path.join(internalTests, "baselines/test262/reference"); - -desc("Builds the test infrastructure using the built compiler"); -task("tests", ["local", run].concat(libraryTargets)); - -function exec(cmd, completeHandler, 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 (completeHandler) { - completeHandler(); - } - complete(); - }); - ex.addListener("error", function (e, status) { - if (errorHandler) { - errorHandler(e, status); - } - else { - fail("Process exited with code " + status); - } - }); - - ex.run(); -} - -const del = require("del"); -function cleanTestDirs() { - // Clean the local baselines directory - if (fs.existsSync(localBaseline)) { - del.sync(localBaseline); - } - - // Clean the local Rwc baselines directory - if (fs.existsSync(localRwcBaseline)) { - del.sync(localRwcBaseline); - } - - jake.mkdirP(localRwcBaseline); - jake.mkdirP(localTest262Baseline); - jake.mkdirP(localBaseline); -} - -// used to pass data from jake command line directly to run.js -function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout) { - 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 - }); - fs.writeFileSync('test.config', testConfigContents); -} - -function deleteTemporaryProjectOutput() { - if (fs.existsSync(path.join(localBaseline, "projectOutput/"))) { - jake.rmRf(path.join(localBaseline, "projectOutput/")); - } -} - function runConsoleTests(defaultReporter, runInParallel) { var dirty = process.env.dirty; if (!dirty) { @@ -803,7 +115,7 @@ function runConsoleTests(defaultReporter, runInParallel) { // 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 = mark(); + var startTime = Travis.mark(); var args = []; args.push("-R", reporter); if (tests) { @@ -827,7 +139,7 @@ function runConsoleTests(defaultReporter, runInParallel) { else { args.push("-t", testTimeout); } - args.push(run); + args.push(Paths.builtLocalRun); var cmd = "mocha " + args.join(" "); console.log(cmd); @@ -836,12 +148,12 @@ function runConsoleTests(defaultReporter, runInParallel) { process.env.NODE_ENV = "development"; exec(cmd, function () { process.env.NODE_ENV = savedNodeEnv; - measure(startTime); + Travis.measure(startTime); runLinter(); finish(); }, function (e, status) { process.env.NODE_ENV = savedNodeEnv; - measure(startTime); + Travis.measure(startTime); finish(status); }); @@ -849,15 +161,15 @@ function runConsoleTests(defaultReporter, runInParallel) { else { var savedNodeEnv = process.env.NODE_ENV; process.env.NODE_ENV = "development"; - var startTime = mark(); + var startTime = Travis.mark(); exec(host + " " + run, function () { process.env.NODE_ENV = savedNodeEnv; - measure(startTime); + Travis.measure(startTime); runLinter(); finish(); }, function (e, status) { process.env.NODE_ENV = savedNodeEnv; - measure(startTime); + Travis.measure(startTime); finish(status); }); } @@ -885,245 +197,128 @@ function runConsoleTests(defaultReporter, runInParallel) { }); lint.invoke(); } -} -desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true."); -task("runtests-parallel", ["build-rules", "tests", builtLocalDirectory], function () { - runConsoleTests('min', /*runInParallel*/ true); -}, { async: true }); - -desc("Runs the tests using the built run.js file. Optional arguments are: t[ests]=regex r[eporter]=[list|spec|json|] d[ebug]=true color[s]=false lint=true bail=false dirty=false."); -task("runtests", ["build-rules", "tests", builtLocalDirectory], function() { - runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false); -}, { async: true }); - -desc("Generates code coverage data via instanbul"); -task("generate-code-coverage", ["tests", builtLocalDirectory], function () { - var testTimeout = process.env.timeout || defaultTestTimeout; - var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run; - console.log(cmd); - exec(cmd); -}, { async: true }); - -// Browser tests -var nodeServerOutFile = "tests/webTestServer.js"; -var nodeServerInFile = "tests/webTestServer.ts"; -compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true, lib: "es6" }); - -desc("Runs browserify on run.js to produce a file suitable for running tests in the browser"); -task("browserify", [], function() { - // Shell out to `gulp`, since we do the work to handle sourcemaps correctly w/o inline maps there - var cmd = 'gulp browserify --silent'; - exec(cmd); -}, { async: true }); - -desc("Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], browser=[chrome|IE]"); -task("runtests-browser", ["browserify", nodeServerOutFile], function () { - cleanTestDirs(); - host = "node"; - var browser = process.env.browser || process.env.b || (os.platform() === "win32" ? "edge" : "chrome"); - var runners = process.env.runners || process.env.runner || process.env.ru; - var tests = process.env.test || process.env.tests || process.env.t; - var light = process.env.light || false; - var testConfigFile = 'test.config'; - if (fs.existsSync(testConfigFile)) { - fs.unlinkSync(testConfigFile); - } - if (tests || runners || light) { - writeTestConfigFile(tests, runners, light); + // used to pass data from jake command line directly to run.js + function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout) { + 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 + }); + fs.writeFileSync('test.config', testConfigContents); } - tests = tests ? tests : ''; - var cmd = host + " tests/webTestServer.js " + browser + " " + JSON.stringify(tests); - console.log(cmd); - exec(cmd); -}, { async: true }); - -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; -} - -// Baseline Diff -desc("Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable"); -task('diff', function () { - var cmd = '"' + getDiffTool() + '" ' + refBaseline + ' ' + localBaseline; - console.log(cmd); - 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() + '" ' + refRwcBaseline + ' ' + localRwcBaseline; - console.log(cmd); - exec(cmd); -}, { async: true }); - -desc("Builds the test sources and automation in debug mode"); -task("tests-debug", ["setDebugMode", "tests"]); - - -// Makes the test results the new baseline -desc("Makes the most recent test results the new baseline, overwriting the old baseline"); -task("baseline-accept", function () { - acceptBaseline(localBaseline, refBaseline); -}); - -function acceptBaseline(sourceFolder, targetFolder) { - console.log('Accept baselines from ' + sourceFolder + ' to ' + targetFolder); - var deleteEnding = '.delete'; - - 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)); - } + function deleteTemporaryProjectOutput() { + if (fs.existsSync(path.join(Paths.baselines.local, "projectOutput/"))) { + jake.rmRf(path.join(Paths.baselines.local, "projectOutput/")); } } } -desc("Makes the most recent rwc test results the new baseline, overwriting the old baseline"); -task("baseline-accept-rwc", function () { - acceptBaseline(localRwcBaseline, refRwcBaseline); -}); - -desc("Makes the most recent test262 test results the new baseline, overwriting the old baseline"); -task("baseline-accept-test262", function () { - acceptBaseline(localTest262Baseline, refTest262Baseline); -}); - - -// Webhost -var webhostPath = "tests/webhost/webtsc.ts"; -var webhostJsPath = "tests/webhost/webtsc.js"; -compileFile(webhostJsPath, [webhostPath], [tscFile, webhostPath].concat(libraryTargets), [], /*useBuiltCompiler*/true); - -desc("Builds the tsc web host"); -task("webhost", [webhostJsPath], function () { - jake.cpR(path.join(builtLocalDirectory, "lib.d.ts"), "tests/webhost/", { silent: true }); -}); - -// Perf compiler -var perftscPath = "tests/perftsc.ts"; -var perftscJsPath = "built/local/perftsc.js"; -compileFile(perftscJsPath, [perftscPath], [tscFile, perftscPath, "tests/perfsys.ts"].concat(libraryTargets), [], /*useBuiltCompiler*/ true); -desc("Builds augmented version of the compiler for perf tests"); -task("perftsc", [perftscJsPath]); - -// Instrumented compiler -var loggedIOpath = harnessDirectory + 'loggedIO.ts'; -var loggedIOJsPath = builtLocalDirectory + 'loggedIO.js'; -file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function () { - var temp = builtLocalDirectory + 'temp'; - jake.mkdirP(temp); - var options = "--target es5 --lib es6 --types --outdir " + temp + ' ' + loggedIOpath; - var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " "; - console.log(cmd + "\n"); - var ex = jake.createExec([cmd]); - ex.addListener("cmdEnd", function () { - fs.renameSync(temp + '/harness/loggedIO.js', loggedIOJsPath); - jake.rmRf(temp); - complete(); - }); - ex.run(); -}, { async: true }); - -var instrumenterPath = harnessDirectory + 'instrumenter.ts'; -var instrumenterJsPath = builtLocalDirectory + 'instrumenter.js'; -compileFile(instrumenterJsPath, [instrumenterPath], [tscFile, instrumenterPath].concat(libraryTargets), [], /*useBuiltCompiler*/ true, { lib: "es6", types: ["node"], noOutFile: true, outDir: builtLocalDirectory }); - -desc("Builds an instrumented tsc.js - run with test=[testname]"); -task('tsc-instrumented', [loggedIOJsPath, instrumenterJsPath, tscFile], function () { - var test = process.env.test || process.env.tests || process.env.t || "iocapture"; - var cmd = host + ' ' + instrumenterJsPath + " record " + test + " " + builtLocalDirectory + compilerFilename; - console.log(cmd); - var ex = jake.createExec([cmd]); - ex.addListener("cmdEnd", function () { - complete(); - }); - ex.run(); -}, { async: true }); - -desc("Updates the sublime plugin's tsserver"); -task("update-sublime", ["local", serverFile], function () { - jake.cpR(serverFile, "../TypeScript-Sublime-Plugin/tsserver/"); - jake.cpR(serverFile + ".map", "../TypeScript-Sublime-Plugin/tsserver/"); -}); - -var tslintRuleDir = "scripts/tslint/rules"; -var tslintRules = fs.readdirSync(tslintRuleDir); -var tslintRulesFiles = tslintRules.map(function (p) { - return path.join(tslintRuleDir, p); -}); -var tslintRulesOutFiles = tslintRules.map(function (p) { - return path.join(builtLocalDirectory, "tslint/rules", p.replace(".ts", ".js")); -}); -var tslintFormattersDir = "scripts/tslint/formatters"; -var tslintFormatters = [ - "autolinkableStylishFormatter", -]; -var tslintFormatterFiles = tslintFormatters.map(function (p) { - return path.join(tslintFormattersDir, p + ".ts"); -}); -var tslintFormattersOutFiles = tslintFormatters.map(function (p) { - return path.join(builtLocalDirectory, "tslint/formatters", p + ".js"); -}); -desc("Compiles tslint rules to js"); -task("build-rules", ["build-rules-start"].concat(tslintRulesOutFiles).concat(tslintFormattersOutFiles).concat(["build-rules-end"])); -tslintRulesFiles.forEach(function (ruleFile, i) { - compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, - { noOutFile: true, generateDeclarations: false, outDir: path.join(builtLocalDirectory, "tslint/rules"), lib: "es6" }); -}); -tslintFormatterFiles.forEach(function (ruleFile, i) { - compileFile(tslintFormattersOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, - { noOutFile: true, generateDeclarations: false, outDir: path.join(builtLocalDirectory, "tslint/formatters"), lib: "es6" }); -}); - -desc("Emit the start of the build-rules fold"); -task("build-rules-start", [], function () { - if (fold.isTravis()) console.log(fold.start("build-rules")); -}); - -desc("Emit the end of the build-rules fold"); -task("build-rules-end", [], function () { - if (fold.isTravis()) console.log(fold.end("build-rules")); -}); - -desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex"); -task("lint", ["build-rules"], () => { - 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" : ""}`; - console.log("Linting: " + cmd); - jake.exec([cmd], cb, /** @type {jake.ExecOptions} */({ interactive: true, windowsVerbatimArguments: true })); +function cleanTestDirs() { + // Clean the local baselines directory + if (fs.existsSync(Paths.baselines.local)) { + del.sync(Paths.baselines.local); } - lint("scripts/tslint/tsconfig.json", () => lint("src/tsconfig-base.json", () => { - if (fold.isTravis()) console.log(fold.end("lint")); + + // 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.localRwc); + jake.mkdirP(Paths.baselines.localTest262); +} + +function tsbuild(tsconfigPath, useLkg = false) { + const startCompileTime = Travis.mark(); + + const compilerPath = useLkg ? Paths.lkgCompiler : Paths.builtLocalCompiler; + const cmd = `${host} ${compilerPath} -b -v ${tsconfigPath}`; + + var ex = jake.createExec([cmd]); + // 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 (!useDebugMode && prefixes && fs.existsSync(outFile)) { + for (var i in prefixes) { + prependFile(prefixes[i], outFile); + } + } + + if (callback) { + callback(); + } + */ + + Travis.measure(startCompileTime); complete(); - })); -}); + }); + ex.addListener("error", function () { + fail(`Compilation of ${tsconfigPath} unsuccessful`); + Travis.measure(startCompileTime); + }); + ex.run(); +} + +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, completeHandler, 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 (completeHandler) { + completeHandler(); + } + complete(); + }); + ex.addListener("error", function (e, status) { + if (errorHandler) { + errorHandler(e, status); + } + else { + fail("Process exited with code " + status); + } + }); + + ex.run(); +} \ No newline at end of file diff --git a/scripts/tslint/tsconfig.json b/scripts/tslint/tsconfig.json index 9d348658394..79ec67c3ad6 100644 --- a/scripts/tslint/tsconfig.json +++ b/scripts/tslint/tsconfig.json @@ -1,6 +1,8 @@ { "compilerOptions": { "lib": ["es6"], + "sourceMap": false, + "declaration": false, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, diff --git a/src/built/local/cancellationToken.js b/src/built/local/cancellationToken.js new file mode 100644 index 00000000000..5ead504797b --- /dev/null +++ b/src/built/local/cancellationToken.js @@ -0,0 +1,57 @@ +"use strict"; +var fs = require("fs"); +function pipeExists(name) { + try { + fs.statSync(name); + return true; + } + catch (e) { + return false; + } +} +function createCancellationToken(args) { + var cancellationPipeName; + for (var i = 0; i < args.length - 1; i++) { + if (args[i] === "--cancellationPipeName") { + cancellationPipeName = args[i + 1]; + break; + } + } + if (!cancellationPipeName) { + return { + isCancellationRequested: function () { return false; }, + setRequest: function (_requestId) { return void 0; }, + resetRequest: function (_requestId) { return void 0; } + }; + } + if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") { + var namePrefix_1 = cancellationPipeName.slice(0, -1); + if (namePrefix_1.length === 0 || namePrefix_1.indexOf("*") >= 0) { + throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'."); + } + var perRequestPipeName_1; + var currentRequestId_1; + return { + isCancellationRequested: function () { return perRequestPipeName_1 !== undefined && pipeExists(perRequestPipeName_1); }, + setRequest: function (requestId) { + currentRequestId_1 = requestId; + perRequestPipeName_1 = namePrefix_1 + requestId; + }, + resetRequest: function (requestId) { + if (currentRequestId_1 !== requestId) { + throw new Error("Mismatched request id, expected " + currentRequestId_1 + ", actual " + requestId); + } + perRequestPipeName_1 = undefined; + } + }; + } + else { + return { + isCancellationRequested: function () { return pipeExists(cancellationPipeName); }, + setRequest: function (_requestId) { return void 0; }, + resetRequest: function (_requestId) { return void 0; } + }; + } +} +module.exports = createCancellationToken; +//# sourceMappingURL=cancellationToken.js.map \ No newline at end of file diff --git a/src/built/local/cancellationToken.js.map b/src/built/local/cancellationToken.js.map new file mode 100644 index 00000000000..d8f1300682a --- /dev/null +++ b/src/built/local/cancellationToken.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cancellationToken.js","sourceRoot":"","sources":["../../cancellationToken/cancellationToken.ts"],"names":[],"mappings":";AAEA,uBAA0B;AAQ1B,oBAAoB,IAAY;IAC5B,IAAI;QACA,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;KACf;IACD,OAAO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AAC,SAAiB;gBAC1B,IAAI,kBAAgB,KAAK,SAAS,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,qCAAmC,kBAAgB,iBAAY,SAAW,CAAC,CAAC;iBAC/F;gBACD,oBAAkB,GAAG,SAAS,CAAC;YACnC,CAAC;SACJ,CAAC;KACL;SACI;QACD,OAAO;YACH,uBAAuB,EAAE,cAAM,OAAA,UAAU,CAAC,oBAAqB,CAAC,EAAjC,CAAiC;YAChE,UAAU,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;YAChD,YAAY,EAAE,UAAC,UAAkB,IAAW,OAAA,KAAK,CAAC,EAAN,CAAM;SACrD,CAAC;KACL;AACL,CAAC;AACD,iBAAS,uBAAuB,CAAC"} \ No newline at end of file diff --git a/src/built/local/harness.d.ts b/src/built/local/harness.d.ts new file mode 100644 index 00000000000..04c03214347 --- /dev/null +++ b/src/built/local/harness.d.ts @@ -0,0 +1,2223 @@ +/// +/// +declare namespace collections { + interface SortOptions { + comparer: (a: T, b: T) => number; + sort: "insertion" | "comparison"; + } + class SortedMap { + private _comparer; + private _keys; + private _values; + private _order; + private _version; + private _copyOnWrite; + constructor(comparer: ((a: K, b: K) => number) | SortOptions, iterable?: Iterable<[K, V]>); + readonly size: number; + readonly comparer: (a: K, b: K) => number; + readonly [Symbol.toStringTag]: string; + has(key: K): boolean; + get(key: K): V | undefined; + set(key: K, value: V): this; + delete(key: K): boolean; + clear(): void; + forEach(callback: (value: V, key: K, collection: this) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + private writePreamble; + private writePostScript; + private getIterationOrder; + } + function insertAt(array: T[], index: number, value: T): void; + function getIterator(iterable: Iterable): Iterator; + function nextResult(iterator: Iterator): IteratorResult | undefined; + function closeIterator(iterator: Iterator): void; + /** + * A collection of metadata that supports inheritance. + */ + class Metadata { + private static readonly _undefinedValue; + private _parent; + private _map; + private _version; + private _size; + private _parentVersion; + constructor(parent?: Metadata); + readonly size: number; + readonly parent: Metadata | undefined; + has(key: string): boolean; + get(key: string): any; + set(key: string, value: any): this; + delete(key: string): boolean; + clear(): void; + forEach(callback: (value: any, key: string, map: this) => void): void; + private static _escapeKey; + private static _unescapeKey; + } +} +/** + * Common utilities + */ +declare namespace utils { + function removeTestPathPrefixes(text: string, retainTrailingDirectorySeparator?: boolean): string; + /** + * Removes leading indentation from a template literal string. + */ + function dedent(array: TemplateStringsArray, ...args: any[]): string; + function toUtf8(text: string): string; + function getByteOrderMarkLength(text: string): number; + function removeByteOrderMark(text: string): string; + function addUTF8ByteOrderMark(text: string): string; +} +declare namespace documents { + class TextDocument { + readonly meta: Map; + readonly file: string; + readonly text: string; + private _lineStarts; + private _testFile; + constructor(file: string, text: string, meta?: Map); + readonly lineStarts: ReadonlyArray; + static fromTestFile(file: Harness.Compiler.TestFile): TextDocument; + asTestFile(): Harness.Compiler.TestFile; + } + interface RawSourceMap { + version: number; + file: string; + sourceRoot?: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: string; + } + interface Mapping { + mappingIndex: number; + emittedLine: number; + emittedColumn: number; + sourceIndex: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + } + class SourceMap { + readonly raw: RawSourceMap; + readonly mapFile: string | undefined; + readonly version: number; + readonly file: string; + readonly sourceRoot: string | undefined; + readonly sources: ReadonlyArray; + readonly sourcesContent: ReadonlyArray | undefined; + readonly mappings: ReadonlyArray; + readonly names: ReadonlyArray | undefined; + private static readonly _mappingRegExp; + private static readonly _sourceMappingURLRegExp; + private static readonly _dataURLRegExp; + private static readonly _base64Chars; + private _emittedLineMappings; + private _sourceLineMappings; + constructor(mapFile: string | undefined, data: string | RawSourceMap); + static getUrl(text: string): string | undefined; + static fromUrl(url: string): SourceMap | undefined; + static fromSource(text: string): SourceMap | undefined; + getMappingsForEmittedLine(emittedLine: number): ReadonlyArray | undefined; + getMappingsForSourceLine(sourceIndex: number, sourceLine: number): ReadonlyArray | undefined; + private static _decodeVLQ; + } +} +declare namespace vpath { + export import sep = ts.directorySeparator; + export import normalizeSeparators = ts.normalizeSlashes; + export import isAbsolute = ts.isRootedDiskPath; + export import isRoot = ts.isDiskPathRoot; + export import hasTrailingSeparator = ts.hasTrailingDirectorySeparator; + export import addTrailingSeparator = ts.ensureTrailingDirectorySeparator; + export import removeTrailingSeparator = ts.removeTrailingDirectorySeparator; + export import normalize = ts.normalizePath; + export import combine = ts.combinePaths; + export import parse = ts.getPathComponents; + export import reduce = ts.reducePathComponents; + export import format = ts.getPathFromPathComponents; + export import resolve = ts.resolvePath; + export import compare = ts.comparePaths; + export import compareCaseSensitive = ts.comparePathsCaseSensitive; + export import compareCaseInsensitive = ts.comparePathsCaseInsensitive; + export import dirname = ts.getDirectoryPath; + export import basename = ts.getBaseFileName; + export import extname = ts.getAnyExtensionFromPath; + export import relative = ts.getRelativePathFromDirectory; + export import beneath = ts.containsPath; + export import changeExtension = ts.changeAnyExtension; + export import isTypeScript = ts.hasTypeScriptFileExtension; + export import isJavaScript = ts.hasJavaScriptFileExtension; + const enum ValidationFlags { + None = 0, + RequireRoot = 1, + RequireDirname = 2, + RequireBasename = 4, + RequireExtname = 8, + RequireTrailingSeparator = 16, + AllowRoot = 32, + AllowDirname = 64, + AllowBasename = 128, + AllowExtname = 256, + AllowTrailingSeparator = 512, + AllowNavigation = 1024, + AllowWildcard = 2048, + /** Path must be a valid directory root */ + Root = 545, + /** Path must be a absolute */ + Absolute = 2017, + /** Path may be relative or absolute */ + RelativeOrAbsolute = 2016, + /** Path may only be a filename */ + Basename = 260 + } + function validate(path: string, flags?: ValidationFlags): string; + function isDeclaration(path: string): boolean; + function isSourceMap(path: string): boolean; + function isJavaScriptSourceMap(path: string): boolean; + function isJson(path: string): boolean; + function isDefaultLibrary(path: string): boolean; + function isTsConfigFile(path: string): boolean; +} +declare namespace vfs { + /** + * Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.) + */ + const builtFolder = "/.ts"; + /** + * Posix-style path to additional mountable folders (./tests/projects in this repo) + */ + const projectsFolder = "/.projects"; + /** + * Posix-style path to additional test libraries + */ + const testLibFolder = "/.lib"; + /** + * Posix-style path to sources under test + */ + const srcFolder = "/.src"; + /** + * Represents a virtual POSIX-like file system. + */ + class FileSystem { + /** Indicates whether the file system is case-sensitive (`false`) or case-insensitive (`true`). */ + readonly ignoreCase: boolean; + /** Gets the comparison function used to compare two paths. */ + readonly stringComparer: (a: string, b: string) => number; + private _lazy; + private _cwd; + private _time; + private _shadowRoot; + private _dirStack; + constructor(ignoreCase: boolean, options?: FileSystemOptions); + /** + * Gets metadata for this `FileSystem`. + */ + readonly meta: collections.Metadata; + /** + * Gets a value indicating whether the file system is read-only. + */ + readonly isReadonly: boolean; + /** + * Makes the file system read-only. + */ + makeReadonly(): this; + /** + * Gets the file system shadowed by this file system. + */ + readonly shadowRoot: FileSystem | undefined; + /** + * Gets a shadow copy of this file system. Changes to the shadow copy do not affect the + * original, allowing multiple copies of the same core file system without multiple copies + * of the same data. + */ + shadow(ignoreCase?: boolean): FileSystem; + /** + * Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html + */ + time(value?: number | Date | (() => number | Date)): number; + /** + * Gets the metadata object for a path. + * @param path + */ + filemeta(path: string): collections.Metadata; + private _filemeta; + /** + * Get the pathname of the current working directory. + * + * @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html + */ + cwd(): string; + /** + * Changes the current working directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html + */ + chdir(path: string): void; + /** + * Pushes the current directory onto the directory stack and changes the current working directory to the supplied path. + */ + pushd(path?: string): void; + /** + * Pops the previous directory from the location stack and changes the current directory to that directory. + */ + popd(): void; + /** + * Update the file system with a set of files. + */ + apply(files: FileSet): void; + /** + * Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + scanSync(path: string, axis: Axis, traversal: Traversal): string[]; + /** + * Scan file system entries along a path. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + lscanSync(path: string, axis: Axis, traversal: Traversal): string[]; + private _scan; + /** + * Mounts a physical or virtual file system at a location in this virtual file system. + * + * @param source The path in the physical (or other virtual) file system. + * @param target The path in this virtual file system. + * @param resolver An object used to resolve files in `source`. + */ + mountSync(source: string, target: string, resolver: FileSystemResolver): void; + /** + * Recursively remove all files and directories underneath the provided path. + */ + rimrafSync(path: string): void; + /** + * Make a directory and all of its parent paths (if they don't exist). + */ + mkdirpSync(path: string): void; + getFileListing(): string; + /** + * Print diagnostic information about the structure of the file system to the console. + */ + debugPrint(): void; + /** + * Determines whether a path exists. + */ + existsSync(path: string): boolean; + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + statSync(path: string): Stats; + /** + * Change file access times + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + utimesSync(path: string, atime: Date, mtime: Date): void; + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + lstatSync(path: string): Stats; + private _stat; + /** + * Read a directory. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + readdirSync(path: string): string[]; + /** + * Make a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + mkdirSync(path: string): void; + private _mkdir; + /** + * Remove a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + rmdirSync(path: string): void; + /** + * Link one file to another file (also known as a "hard link"). + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + linkSync(oldpath: string, newpath: string): void; + /** + * Remove a directory entry. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + unlinkSync(path: string): void; + /** + * Rename a file. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + renameSync(oldpath: string, newpath: string): void; + /** + * Make a symbolic link. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + symlinkSync(target: string, linkpath: string): void; + /** + * Resolve a pathname. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + realpathSync(path: string): string; + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + readFileSync(path: string, encoding?: null): Buffer; + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + readFileSync(path: string, encoding: string): string; + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + readFileSync(path: string, encoding?: string | null): string | Buffer; + /** + * Write to a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + writeFileSync(path: string, data: string | Buffer, encoding?: string | null): void; + private _mknod; + private _addLink; + private _removeLink; + private _replaceLink; + private _getRootLinks; + private _getLinks; + private _getShadow; + private _copyShadowLinks; + private _getSize; + private _getBuffer; + /** + * Walk a path to its end. + * + * @param path The path to follow. + * @param noFollow A value indicating whether to *not* dereference a symbolic link at the + * end of a path. + * + * @link http://man7.org/linux/man-pages/man7/path_resolution.7.html + */ + private _walk; + /** + * Resolve a path relative to the current working directory. + */ + private _resolve; + private _applyFiles; + private _applyFileExtendedOptions; + private _applyFilesWorker; + private _normalizeFileSetEntry; + } + interface FileSystemOptions { + time?: number | Date | (() => number | Date); + files?: FileSet; + cwd?: string; + meta?: Record; + } + interface FileSystemCreateOptions { + documents?: ReadonlyArray; + cwd?: string; + } + type Axis = "ancestors" | "ancestors-or-self" | "self" | "descendants-or-self" | "descendants"; + interface Traversal { + /** A function called to choose whether to continue to traverse to either ancestors or descendants. */ + traverse?(path: string, stats: Stats): boolean; + /** A function called to choose whether to accept a path as part of the result. */ + accept?(path: string, stats: Stats): boolean; + } + interface FileSystemResolver { + statSync(path: string): { + mode: number; + size: number; + }; + readdirSync(path: string): string[]; + readFileSync(path: string): Buffer; + } + interface FileSystemResolverHost { + useCaseSensitiveFileNames(): boolean; + getAccessibleFileSystemEntries(path: string): ts.FileSystemEntries; + directoryExists(path: string): boolean; + fileExists(path: string): boolean; + getFileSize(path: string): number; + readFile(path: string): string | undefined; + getWorkspaceRoot(): string; + } + function createResolver(host: FileSystemResolverHost): FileSystemResolver; + /** + * Create a virtual file system from a physical file system using the following path mappings: + * + * - `/.ts` is a directory mapped to `${workspaceRoot}/built/local` + * - `/.lib` is a directory mapped to `${workspaceRoot}/tests/lib` + * - `/.src` is a virtual directory to be used for tests. + * + * Unless overridden, `/.src` will be the current working directory for the virtual file system. + */ + function createFromFileSystem(host: FileSystemResolverHost, ignoreCase: boolean, { documents, cwd }?: FileSystemCreateOptions): FileSystem; + class Stats { + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atimeMs: number; + mtimeMs: number; + ctimeMs: number; + birthtimeMs: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + constructor(); + constructor(dev: number, ino: number, mode: number, nlink: number, rdev: number, size: number, blksize: number, blocks: number, atimeMs: number, mtimeMs: number, ctimeMs: number, birthtimeMs: number); + isFile(): boolean; + isDirectory(): boolean; + isSymbolicLink(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + } + const IOErrorMessages: Readonly<{ + EACCES: string; + EIO: string; + ENOENT: string; + EEXIST: string; + ELOOP: string; + ENOTDIR: string; + EISDIR: string; + EBADF: string; + EINVAL: string; + ENOTEMPTY: string; + EPERM: string; + EROFS: string; + }>; + function createIOError(code: keyof typeof IOErrorMessages, details?: string): NodeJS.ErrnoException; + /** + * A template used to populate files, directories, links, etc. in a virtual file system. + */ + interface FileSet { + [name: string]: DirectoryLike | FileLike | Link | Symlink | Mount | null | undefined; + } + type DirectoryLike = FileSet | Directory; + type FileLike = File | Buffer | string; + /** Extended options for a directory in a `FileSet` */ + class Directory { + readonly files: FileSet; + readonly meta: Record | undefined; + constructor(files: FileSet, { meta }?: { + meta?: Record; + }); + } + /** Extended options for a file in a `FileSet` */ + class File { + readonly data: Buffer | string; + readonly encoding: string | undefined; + readonly meta: Record | undefined; + constructor(data: Buffer | string, { meta, encoding }?: { + encoding?: string; + meta?: Record; + }); + } + /** Extended options for a hard link in a `FileSet` */ + class Link { + readonly path: string; + constructor(path: string); + } + /** Extended options for a symbolic link in a `FileSet` */ + class Symlink { + readonly symlink: string; + readonly meta: Record | undefined; + constructor(symlink: string, { meta }?: { + meta?: Record; + }); + } + /** Extended options for mounting a virtual copy of an external file system via a `FileSet` */ + class Mount { + readonly source: string; + readonly resolver: FileSystemResolver; + readonly meta: Record | undefined; + constructor(source: string, resolver: FileSystemResolver, { meta }?: { + meta?: Record; + }); + } +} +/** + * Test harness compiler functionality. + */ +declare namespace compiler { + interface Project { + file: string; + config?: ts.ParsedCommandLine; + errors?: ts.Diagnostic[]; + } + function readProject(host: fakes.ParseConfigHost, project: string | undefined, existingOptions?: ts.CompilerOptions): Project | undefined; + /** + * Correlates compilation inputs and outputs + */ + interface CompilationOutput { + readonly inputs: ReadonlyArray; + readonly js: documents.TextDocument | undefined; + readonly dts: documents.TextDocument | undefined; + readonly map: documents.TextDocument | undefined; + } + class CompilationResult { + readonly host: fakes.CompilerHost; + readonly program: ts.Program | undefined; + readonly result: ts.EmitResult | undefined; + readonly options: ts.CompilerOptions; + readonly diagnostics: ReadonlyArray; + readonly js: ReadonlyMap; + readonly dts: ReadonlyMap; + readonly maps: ReadonlyMap; + private _inputs; + private _inputsAndOutputs; + constructor(host: fakes.CompilerHost, options: ts.CompilerOptions, program: ts.Program | undefined, result: ts.EmitResult | undefined, diagnostics: ts.Diagnostic[]); + readonly vfs: vfs.FileSystem; + readonly inputs: ReadonlyArray; + readonly outputs: ReadonlyArray; + readonly traces: ReadonlyArray; + readonly emitSkipped: boolean; + readonly singleFile: boolean; + readonly commonSourceDirectory: string; + getInputsAndOutputs(path: string): CompilationOutput | undefined; + getInputs(path: string): ReadonlyArray | undefined; + getOutput(path: string, kind: "js" | "dts" | "map"): documents.TextDocument | undefined; + getSourceMapRecord(): string | undefined; + getSourceMap(path: string): documents.SourceMap | undefined; + getOutputPath(path: string, ext: string): string; + getNumberOfJsFiles(): number; + } + function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions): CompilationResult; +} +declare namespace evaluator { + function evaluateTypeScript(sourceText: string, options?: ts.CompilerOptions, globals?: Record): any; +} +/** + * Fake implementations of various compiler dependencies. + */ +declare namespace fakes { + interface SystemOptions { + executingFilePath?: string; + newLine?: "\r\n" | "\n"; + env?: Record; + } + /** + * A fake `ts.System` that leverages a virtual file system. + */ + class System implements ts.System { + readonly vfs: vfs.FileSystem; + readonly args: string[]; + readonly output: string[]; + readonly newLine: string; + readonly useCaseSensitiveFileNames: boolean; + exitCode: number | undefined; + private readonly _executingFilePath; + private readonly _env; + constructor(vfs: vfs.FileSystem, { executingFilePath, newLine, env }?: SystemOptions); + write(message: string): void; + readFile(path: string): string | undefined; + writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; + deleteFile(path: string): void; + fileExists(path: string): boolean; + directoryExists(path: string): boolean; + createDirectory(path: string): void; + getCurrentDirectory(): string; + getDirectories(path: string): string[]; + readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; + getAccessibleFileSystemEntries(path: string): ts.FileSystemEntries; + exit(exitCode?: number): void; + getFileSize(path: string): number; + resolvePath(path: string): string; + getExecutingFilePath(): string; + getModifiedTime(path: string): Date; + setModifiedTime(path: string, time: Date): void; + createHash(data: string): string; + realpath(path: string): string; + getEnvironmentVariable(name: string): string; + private _getStats; + } + /** + * A fake `ts.ParseConfigHost` that leverages a virtual file system. + */ + class ParseConfigHost implements ts.ParseConfigHost { + readonly sys: System; + constructor(sys: System | vfs.FileSystem); + readonly vfs: vfs.FileSystem; + readonly useCaseSensitiveFileNames: boolean; + fileExists(fileName: string): boolean; + directoryExists(directoryName: string): boolean; + readFile(path: string): string | undefined; + readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[]; + } + /** + * A fake `ts.CompilerHost` that leverages a virtual file system. + */ + class CompilerHost implements ts.CompilerHost { + readonly sys: System; + readonly defaultLibLocation: string; + readonly outputs: documents.TextDocument[]; + private readonly _outputsMap; + readonly traces: string[]; + readonly shouldAssertInvariants: boolean; + private _setParentNodes; + private _sourceFiles; + private _parseConfigHost; + private _newLine; + constructor(sys: System | vfs.FileSystem, options?: ts.CompilerOptions, setParentNodes?: boolean); + readonly vfs: vfs.FileSystem; + readonly parseConfigHost: ParseConfigHost; + getCurrentDirectory(): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + getCanonicalFileName(fileName: string): string; + deleteFile(fileName: string): void; + fileExists(fileName: string): boolean; + directoryExists(directoryName: string): boolean; + getModifiedTime(fileName: string): Date; + setModifiedTime(fileName: string, time: Date): void; + getDirectories(path: string): string[]; + readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; + readFile(path: string): string | undefined; + writeFile(fileName: string, content: string, writeByteOrderMark: boolean): void; + trace(s: string): void; + realpath(path: string): string; + getDefaultLibLocation(): string; + getDefaultLibFileName(options: ts.CompilerOptions): string; + getSourceFile(fileName: string, languageVersion: number): ts.SourceFile | undefined; + } +} +declare namespace ts.server { + interface SessionClientHost extends LanguageServiceHost { + writeMessage(message: string): void; + } + function extractMessage(message: string): string; + class SessionClient implements LanguageService { + private host; + private sequence; + private lineMaps; + private messages; + private lastRenameEntry; + constructor(host: SessionClientHost); + onMessage(message: string): void; + private writeMessage; + private getLineMap; + private lineOffsetToPosition; + private positionToOneBasedLineOffset; + private convertCodeEditsToTextChange; + private processRequest; + private processResponse; + openFile(file: string, fileContent?: string, scriptKindName?: "TS" | "JS" | "TSX" | "JSX"): void; + closeFile(file: string): void; + changeFile(fileName: string, start: number, end: number, insertString: string): void; + toLineColumnOffset(fileName: string, position: number): { + line: number; + character: number; + }; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getProjectInfo(file: string, needFileNameList: boolean): protocol.ProjectInfo; + getCompletionsAtPosition(fileName: string, position: number, _preferences: UserPreferences | undefined): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string, _options: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined): CompletionEntryDetails; + getCompletionEntrySymbol(_fileName: string, _position: number, _entryName: string): Symbol; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getFormattingEditsForRange(file: string, start: number, end: number, _options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, _options: FormatCodeOptions): TextChange[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan; + getTypeDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getImplementationAtPosition(fileName: string, position: number): ImplementationLocation[]; + findReferences(_fileName: string, _position: number): ReferencedSymbol[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getEmitOutput(_fileName: string): EmitOutput; + getSyntacticDiagnostics(file: string): DiagnosticWithLocation[]; + getSemanticDiagnostics(file: string): Diagnostic[]; + getSuggestionDiagnostics(file: string): DiagnosticWithLocation[]; + private getDiagnostics; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getRenameInfo(fileName: string, position: number, findInStrings?: boolean, findInComments?: boolean): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + private decodeNavigationBarItems; + getNavigationBarItems(file: string): NavigationBarItem[]; + private decodeNavigationTree; + getNavigationTree(file: string): NavigationTree; + private decodeSpan; + getNameOrDottedNameSpan(_fileName: string, _startPos: number, _endPos: number): TextSpan; + getBreakpointStatementAtPosition(_fileName: string, _position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[]; + getOutliningSpans(file: string): OutliningSpan[]; + getTodoComments(_fileName: string, _descriptors: TodoCommentDescriptor[]): TodoComment[]; + getDocCommentTemplateAtPosition(_fileName: string, _position: number): TextInsertion; + isValidBraceCompletionAtPosition(_fileName: string, _position: number, _openingBrace: number): boolean; + getJsxClosingTagAtPosition(_fileName: string, _position: number): never; + getSpanOfEnclosingComment(_fileName: string, _position: number, _onlyMultiLine: boolean): TextSpan; + getCodeFixesAtPosition(file: string, start: number, end: number, errorCodes: ReadonlyArray): ReadonlyArray; + getCombinedCodeFix: typeof notImplemented; + applyCodeActionCommand: typeof notImplemented; + private createFileLocationOrRangeRequestArgs; + private createFileLocationRequestArgs; + private createFileRangeRequestArgs; + private createFileLocationRequestArgsWithEndLineAndOffset; + getApplicableRefactors(fileName: string, positionOrRange: number | TextRange): ApplicableRefactorInfo[]; + getEditsForRefactor(fileName: string, _formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo; + organizeImports(_scope: OrganizeImportsScope, _formatOptions: FormatCodeSettings): ReadonlyArray; + getEditsForFileRename(): never; + private convertCodeEditsToTextChanges; + private convertChanges; + convertTextChangeToCodeEdit(change: protocol.CodeEdit, fileName: string): TextChange; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(_fileName: string, _position: number, _options: EditorOptions): number; + getSyntacticClassifications(_fileName: string, _span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(_fileName: string, _span: TextSpan): ClassifiedSpan[]; + getEncodedSyntacticClassifications(_fileName: string, _span: TextSpan): Classifications; + getEncodedSemanticClassifications(_fileName: string, _span: TextSpan): Classifications; + getProgram(): Program; + getNonBoundSourceFile(_fileName: string): SourceFile; + getSourceFile(_fileName: string): SourceFile; + cleanupSemanticCache(): void; + dispose(): void; + } +} +declare type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "user" | "dt"; +declare type CompilerTestKind = "conformance" | "compiler"; +declare type FourslashTestKind = "fourslash" | "fourslash-shims" | "fourslash-shims-pp" | "fourslash-server"; +declare abstract class RunnerBase { + tests: (string | Harness.FileBasedTest)[]; + /** Add a source file to the runner's list of tests that need to be initialized with initializeTests */ + addTest(fileName: string): void; + enumerateFiles(folder: string, regex?: RegExp, options?: { + recursive: boolean; + }): string[]; + abstract kind(): TestRunnerKind; + abstract enumerateTestFiles(): (string | Harness.FileBasedTest)[]; + /** The working directory where tests are found. Needed for batch testing where the input path will differ from the output path inside baselines */ + workingDirectory: string; + /** Setup the runner's tests so that they are ready to be executed by the harness + * The first test should be a describe/it block that sets up the harness's compiler instance appropriately + */ + abstract initializeTests(): void; + /** Replaces instances of full paths with fileNames only */ + static removeFullPaths(path: string): string; +} +declare namespace Harness.SourceMapRecorder { + function getSourceMapRecord(sourceMapDataList: ReadonlyArray, program: ts.Program, jsFiles: ReadonlyArray, declarationFiles: ReadonlyArray): string; +} +declare var _chai: typeof chai; +declare var assert: typeof _chai.assert; +declare var global: NodeJS.Global; +declare var window: {}; +declare var XMLHttpRequest: { + new (): XMLHttpRequest; +}; +interface XMLHttpRequest { + readonly readyState: number; + readonly responseText: string; + readonly status: number; + readonly statusText: string; + open(method: string, url: string, async?: boolean, user?: string, password?: string): void; + send(data?: string): void; + setRequestHeader(header: string, value: string): void; + getAllResponseHeaders(): string; + getResponseHeader(header: string): string | null; + overrideMimeType(mime: string): void; +} +declare namespace Utils { + const enum ExecutionEnvironment { + Node = 0, + Browser = 1 + } + function getExecutionEnvironment(): ExecutionEnvironment; + let currentExecutionEnvironment: ExecutionEnvironment; + function encodeString(s: string): string; + function byteLength(s: string, encoding?: string): number; + function evalFile(fileContents: string, fileName: string, nodeContext?: any): void; + /** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ + function splitContentByNewlines(content: string): string[]; + /** Reads a file under /tests */ + function readTestFile(path: string): string | undefined; + function memoize(f: T, memoKey: (...anything: any[]) => string): T; + const canonicalizeForHarness: ts.GetCanonicalFileName; + function assertInvariants(node: ts.Node | undefined, parent: ts.Node | undefined): void; + function convertDiagnostics(diagnostics: ReadonlyArray): { + start: number | undefined; + length: number | undefined; + messageText: string; + category: string; + code: number; + }[]; + function sourceFileToJSON(file: ts.Node): string; + function assertDiagnosticsEquals(array1: ReadonlyArray, array2: ReadonlyArray): void; + function assertStructuralEquals(node1: ts.Node, node2: ts.Node): void; + function filterStack(error: Error, stackTraceLimit?: number): Error; +} +declare namespace Harness { + interface IO { + newLine(): string; + getCurrentDirectory(): string; + useCaseSensitiveFileNames(): boolean; + resolvePath(path: string): string | undefined; + getFileSize(path: string): number; + readFile(path: string): string | undefined; + writeFile(path: string, contents: string): void; + directoryName(path: string): string | undefined; + getDirectories(path: string): string[]; + createDirectory(path: string): void; + fileExists(fileName: string): boolean; + directoryExists(path: string): boolean; + deleteFile(fileName: string): void; + enumerateTestFiles(runner: RunnerBase): (string | FileBasedTest)[]; + listFiles(path: string, filter?: RegExp, options?: { + recursive?: boolean; + }): string[]; + log(text: string): void; + args(): string[]; + getExecutingFilePath(): string; + getWorkspaceRoot(): string; + exit(exitCode?: number): void; + readDirectory(path: string, extension?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; + getAccessibleFileSystemEntries(dirname: string): ts.FileSystemEntries; + tryEnableSourceMapsForHost?(): void; + getEnvironmentVariable?(name: string): string; + getMemoryUsage?(): number | undefined; + } + let IO: IO; + const harnessNewLine = "\r\n"; + const virtualFileSystemRoot = "/"; + function mockHash(s: string): string; +} +declare namespace Harness { + const libFolder = "built/local/"; + const tcServicesFile: string; + type SourceMapEmitterCallback = (emittedFile: string, emittedLine: number, emittedColumn: number, sourceFile: string, sourceLine: number, sourceColumn: number, sourceName: string) => void; + let userSpecifiedRoot: string; + let lightMode: boolean; + /** Functionality for compiling TypeScript code */ + namespace Compiler { + /** Aggregate various writes into a single array of lines. Useful for passing to the + * TypeScript compiler to fill with source code or errors. + */ + class WriterAggregator { + lines: string[]; + currentLine: string; + Write(str: string): void; + WriteLine(str: string): void; + Close(): void; + reset(): void; + } + function createSourceFileAndAssertInvariants(fileName: string, sourceText: string, languageVersion: ts.ScriptTarget): ts.SourceFile; + const defaultLibFileName = "lib.d.ts"; + const es2015DefaultLibFileName = "lib.es2015.d.ts"; + function getDefaultLibrarySourceFile(fileName?: string): ts.SourceFile | undefined; + function getDefaultLibFileName(options: ts.CompilerOptions): string; + const fourslashFileName = "fourslash.ts"; + let fourslashSourceFile: ts.SourceFile; + function getCanonicalFileName(fileName: string): string; + interface HarnessOptions { + useCaseSensitiveFileNames?: boolean; + includeBuiltFile?: string; + baselineFile?: string; + libFiles?: string; + } + function setCompilerOptionsFromHarnessSetting(settings: TestCaseParser.CompilerSettings, options: ts.CompilerOptions & HarnessOptions): void; + interface TestFile { + unitName: string; + content: string; + fileOptions?: any; + } + function compileFiles(inputFiles: TestFile[], otherFiles: TestFile[], harnessSettings: TestCaseParser.CompilerSettings | undefined, compilerOptions: ts.CompilerOptions | undefined, currentDirectory: string | undefined): compiler.CompilationResult; + interface DeclarationCompilationContext { + declInputFiles: TestFile[]; + declOtherFiles: TestFile[]; + harnessSettings: TestCaseParser.CompilerSettings & HarnessOptions | undefined; + options: ts.CompilerOptions; + currentDirectory: string; + } + function prepareDeclarationCompilationContext(inputFiles: ReadonlyArray, otherFiles: ReadonlyArray, result: compiler.CompilationResult, harnessSettings: TestCaseParser.CompilerSettings & HarnessOptions, options: ts.CompilerOptions, currentDirectory: string | undefined): DeclarationCompilationContext | undefined; + function compileDeclarationFiles(context: DeclarationCompilationContext | undefined): { + declInputFiles: TestFile[]; + declOtherFiles: TestFile[]; + declResult: compiler.CompilationResult; + } | undefined; + function minimalDiagnosticsToString(diagnostics: ReadonlyArray, pretty?: boolean): string; + function getErrorBaseline(inputFiles: ReadonlyArray, diagnostics: ReadonlyArray, pretty?: boolean): string; + const diagnosticSummaryMarker = "__diagnosticSummary"; + const globalErrorsMarker = "__globalErrors"; + function iterateErrorBaseline(inputFiles: ReadonlyArray, diagnostics: ReadonlyArray, options?: { + pretty?: boolean; + caseSensitive?: boolean; + currentDirectory?: string; + }): IterableIterator<[string, string, number]>; + function doErrorBaseline(baselinePath: string, inputFiles: ReadonlyArray, errors: ReadonlyArray, pretty?: boolean): void; + function doTypeAndSymbolBaseline(baselinePath: string, program: ts.Program, allFiles: { + unitName: string; + content: string; + }[], opts?: Baseline.BaselineOptions, multifile?: boolean, skipTypeBaselines?: boolean, skipSymbolBaselines?: boolean): void; + function doSourcemapBaseline(baselinePath: string, options: ts.CompilerOptions, result: compiler.CompilationResult, harnessSettings: TestCaseParser.CompilerSettings): void; + function doJsEmitBaseline(baselinePath: string, header: string, options: ts.CompilerOptions, result: compiler.CompilationResult, tsConfigFiles: ReadonlyArray, toBeCompiled: ReadonlyArray, otherFiles: ReadonlyArray, harnessSettings: TestCaseParser.CompilerSettings): void; + function collateOutputs(outputFiles: ReadonlyArray): string; + function iterateOutputs(outputFiles: Iterable): IterableIterator<[string, string]>; + function sanitizeTestFilePath(name: string): string; + } + interface FileBasedTest { + file: string; + configurations?: FileBasedTestConfiguration[]; + } + interface FileBasedTestConfiguration { + [key: string]: string; + } + /** + * Compute FileBasedTestConfiguration variations based on a supplied list of variable settings. + */ + function getFileBasedTestConfigurations(settings: TestCaseParser.CompilerSettings, varyBy: string[]): FileBasedTestConfiguration[] | undefined; + /** + * Compute a description for this configuration based on its entries + */ + function getFileBasedTestConfigurationDescription(configuration: FileBasedTestConfiguration): string; + namespace TestCaseParser { + /** all the necessary information to set the right compiler settings */ + interface CompilerSettings { + [name: string]: string; + } + /** All the necessary information to turn a multi file test into useful units for later compilation */ + interface TestUnitData { + content: string; + name: string; + fileOptions: any; + originalFilePath: string; + references: string[]; + } + function extractCompilerSettings(content: string): CompilerSettings; + interface TestCaseContent { + settings: CompilerSettings; + testUnitData: TestUnitData[]; + tsConfig: ts.ParsedCommandLine | undefined; + tsConfigFileUnitData: TestUnitData | undefined; + } + /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ + function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings?: CompilerSettings): TestCaseContent; + } + /** Support class for baseline files */ + namespace Baseline { + interface BaselineOptions { + Subfolder?: string; + Baselinefolder?: string; + } + function localPath(fileName: string, baselineFolder?: string, subfolder?: string): string; + function runBaseline(relativeFileName: string, generateContent: () => string | null, opts?: BaselineOptions): void; + function runMultifileBaseline(relativeFileBase: string, extension: string, generateContent: () => IterableIterator<[string, string, number]> | IterableIterator<[string, string]> | null, opts?: BaselineOptions, referencedExtensions?: string[]): void; + } + function isDefaultLibraryFile(filePath: string): boolean; + function isBuiltFile(filePath: string): boolean; + function getDefaultLibraryFile(filePath: string, io: IO): Compiler.TestFile; + function getConfigNameFromFileName(filename: string): "tsconfig.json" | "jsconfig.json" | undefined; +} +declare namespace Harness.LanguageService { + class ScriptInfo { + fileName: string; + content: string; + isRootFile: boolean; + version: number; + editRanges: { + length: number; + textChangeRange: ts.TextChangeRange; + }[]; + private lineMap; + constructor(fileName: string, content: string, isRootFile: boolean); + private setContent; + getLineMap(): number[]; + updateContent(content: string): void; + editContent(start: number, end: number, newText: string): void; + getTextChangeRangeBetweenVersions(startVersion: number, endVersion: number): ts.TextChangeRange; + } + class DefaultHostCancellationToken implements ts.HostCancellationToken { + static readonly instance: DefaultHostCancellationToken; + isCancellationRequested(): boolean; + } + interface LanguageServiceAdapter { + getHost(): LanguageServiceAdapterHost; + getLanguageService(): ts.LanguageService; + getClassifier(): ts.Classifier; + getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo; + } + abstract class LanguageServiceAdapterHost { + protected cancellationToken: DefaultHostCancellationToken; + protected settings: ts.CompilerOptions; + readonly sys: fakes.System; + typesRegistry: ts.Map | undefined; + private scriptInfos; + constructor(cancellationToken?: DefaultHostCancellationToken, settings?: ts.CompilerOptions); + readonly vfs: vfs.FileSystem; + getNewLine(): string; + getFilenames(): string[]; + getScriptInfo(fileName: string): ScriptInfo | undefined; + addScript(fileName: string, content: string, isRootFile: boolean): void; + editScript(fileName: string, start: number, end: number, newText: string): void; + openFile(_fileName: string, _content?: string, _scriptKindName?: string): void; + /** + * @param line 0 based index + * @param col 0 based index + */ + positionToLineAndCharacter(fileName: string, position: number): ts.LineAndCharacter; + } + class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts.LanguageServiceHost, LanguageServiceAdapterHost { + isKnownTypesPackageName(name: string): boolean; + installPackage: typeof ts.notImplemented; + getCompilationSettings(): ts.CompilerOptions; + getCancellationToken(): DefaultHostCancellationToken; + getDirectories(path: string): string[]; + getCurrentDirectory(): string; + getDefaultLibFileName(): string; + getScriptFileNames(): string[]; + getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined; + getScriptKind(): ts.ScriptKind; + getScriptVersion(fileName: string): string; + directoryExists(dirName: string): boolean; + fileExists(fileName: string): boolean; + readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; + readFile(path: string): string | undefined; + realpath(path: string): string; + getTypeRootsVersion(): number; + log: typeof ts.noop; + trace: typeof ts.noop; + error: typeof ts.noop; + } + class NativeLanguageServiceAdapter implements LanguageServiceAdapter { + private host; + constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions); + getHost(): LanguageServiceAdapterHost; + getLanguageService(): ts.LanguageService; + getClassifier(): ts.Classifier; + getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo; + } + class ShimLanguageServiceHost extends LanguageServiceAdapterHost implements ts.LanguageServiceShimHost, ts.CoreServicesShimHost { + private nativeHost; + getModuleResolutionsForFile: (fileName: string) => string; + getTypeReferenceDirectiveResolutionsForFile: (fileName: string) => string; + constructor(preprocessToResolve: boolean, cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions); + getFilenames(): string[]; + getScriptInfo(fileName: string): ScriptInfo | undefined; + addScript(fileName: string, content: string, isRootFile: boolean): void; + editScript(fileName: string, start: number, end: number, newText: string): void; + positionToLineAndCharacter(fileName: string, position: number): ts.LineAndCharacter; + getCompilationSettings(): string; + getCancellationToken(): ts.HostCancellationToken; + getCurrentDirectory(): string; + getDirectories(path: string): string; + getDefaultLibFileName(): string; + getScriptFileNames(): string; + getScriptSnapshot(fileName: string): ts.ScriptSnapshotShim; + getScriptKind(): ts.ScriptKind; + getScriptVersion(fileName: string): string; + getLocalizedDiagnosticMessages(): string; + readDirectory: typeof ts.notImplemented; + readDirectoryNames: typeof ts.notImplemented; + readFileNames: typeof ts.notImplemented; + fileExists(fileName: string): boolean; + readFile(fileName: string): string | undefined; + log(s: string): void; + trace(s: string): void; + error(s: string): void; + directoryExists(): boolean; + } + class ShimLanguageServiceAdapter implements LanguageServiceAdapter { + private host; + private factory; + constructor(preprocessToResolve: boolean, cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions); + getHost(): ShimLanguageServiceHost; + getLanguageService(): ts.LanguageService; + getClassifier(): ts.Classifier; + getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo; + } + class SessionClientHost extends NativeLanguageServiceHost implements ts.server.SessionClientHost { + private client; + constructor(cancellationToken: ts.HostCancellationToken | undefined, settings: ts.CompilerOptions | undefined); + onMessage: typeof ts.noop; + writeMessage: typeof ts.noop; + setClient(client: ts.server.SessionClient): void; + openFile(fileName: string, content?: string, scriptKindName?: "TS" | "JS" | "TSX" | "JSX"): void; + editScript(fileName: string, start: number, end: number, newText: string): void; + } + class ServerLanguageServiceAdapter implements LanguageServiceAdapter { + private host; + private client; + constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions); + getHost(): SessionClientHost; + getLanguageService(): ts.LanguageService; + getClassifier(): ts.Classifier; + getPreProcessedFileInfo(): ts.PreProcessedFileInfo; + } +} +declare namespace ts.TestFSWithWatch { + const libFile: File; + const safeList: { + path: Path; + content: string; + }; + interface TestServerHostCreationParameters { + useCaseSensitiveFileNames?: boolean; + executingFilePath?: string; + currentDirectory?: string; + newLine?: string; + useWindowsStylePaths?: boolean; + environmentVariables?: Map; + } + function createWatchedSystem(fileOrFolderList: ReadonlyArray, params?: TestServerHostCreationParameters): TestServerHost; + function createServerHost(fileOrFolderList: ReadonlyArray, params?: TestServerHostCreationParameters): TestServerHost; + interface File { + path: string; + content: string; + fileSize?: number; + } + interface Folder { + path: string; + } + interface SymLink { + path: string; + symLink: string; + } + type FileOrFolderOrSymLink = File | Folder | SymLink; + function verifyMapSize(caption: string, map: Map, expectedKeys: ReadonlyArray): void; + function checkMultiMapKeyCount(caption: string, actual: MultiMap, expectedKeys: ReadonlyMap): void; + function checkMultiMapKeyCount(caption: string, actual: MultiMap, expectedKeys: ReadonlyArray, eachKeyCount: number): void; + function checkArray(caption: string, actual: ReadonlyArray, expected: ReadonlyArray): void; + function checkWatchedFiles(host: TestServerHost, expectedFiles: string[]): void; + function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyMap): void; + function checkWatchedFilesDetailed(host: TestServerHost, expectedFiles: ReadonlyArray, eachFileWatchCount: number): void; + function checkWatchedDirectories(host: TestServerHost, expectedDirectories: string[], recursive: boolean): void; + function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyMap, recursive: boolean): void; + function checkWatchedDirectoriesDetailed(host: TestServerHost, expectedDirectories: ReadonlyArray, eachDirectoryWatchCount: number, recursive: boolean): void; + function checkOutputContains(host: TestServerHost, expected: ReadonlyArray): void; + function checkOutputDoesNotContain(host: TestServerHost, expectedToBeAbsent: string[] | ReadonlyArray): void; + type TimeOutCallback = () => any; + interface TestFileWatcher { + cb: FileWatcherCallback; + fileName: string; + } + interface TestDirectoryWatcher { + cb: DirectoryWatcherCallback; + directoryName: string; + } + interface ReloadWatchInvokeOptions { + /** Invokes the directory watcher for the parent instead of the file changed */ + invokeDirectoryWatcherInsteadOfFileChanged: boolean; + /** When new file is created, do not invoke watches for it */ + ignoreWatchInvokedWithTriggerAsFileCreate: boolean; + /** Invoke the file delete, followed by create instead of file changed */ + invokeFileDeleteCreateAsPartInsteadOfChange: boolean; + } + enum Tsc_WatchDirectory { + WatchFile = "RecursiveDirectoryUsingFsWatchFile", + NonRecursiveWatchDirectory = "RecursiveDirectoryUsingNonRecursiveWatchDirectory", + DynamicPolling = "RecursiveDirectoryUsingDynamicPriorityPolling" + } + class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, ModuleResolutionHost { + withSafeList: boolean; + useCaseSensitiveFileNames: boolean; + readonly newLine: string; + readonly useWindowsStylePath?: boolean | undefined; + private readonly environmentVariables?; + args: string[]; + private readonly output; + private fs; + private time; + getCanonicalFileName: (s: string) => string; + private toPath; + private timeoutCallbacks; + private immediateCallbacks; + readonly screenClears: number[]; + readonly watchedDirectories: MultiMap; + readonly watchedDirectoriesRecursive: MultiMap; + readonly watchedFiles: MultiMap; + private readonly executingFilePath; + private readonly currentDirectory; + private readonly dynamicPriorityWatchFile; + private readonly customRecursiveWatchDirectory; + constructor(withSafeList: boolean, useCaseSensitiveFileNames: boolean, executingFilePath: string, currentDirectory: string, fileOrFolderorSymLinkList: ReadonlyArray, newLine?: string, useWindowsStylePath?: boolean | undefined, environmentVariables?: Map | undefined); + getNewLine(): string; + toNormalizedAbsolutePath(s: string): string; + toFullPath(s: string): Path; + getHostSpecificPath(s: string): string; + private now; + reloadFS(fileOrFolderOrSymLinkList: ReadonlyArray, options?: Partial): void; + modifyFile(filePath: string, content: string, options?: Partial): void; + renameFolder(folderName: string, newFolderName: string): void; + private renameFolderEntries; + ensureFileOrFolder(fileOrDirectoryOrSymLink: FileOrFolderOrSymLink, ignoreWatchInvokedWithTriggerAsFileCreate?: boolean): void; + private ensureFolder; + private addFileOrFolderInFolder; + private removeFileOrFolder; + removeFolder(folderPath: string, recursive?: boolean): void; + invokeWatchedDirectoriesCallback(folderFullPath: string, relativePath: string): void; + invokeWatchedDirectoriesRecursiveCallback(folderFullPath: string, relativePath: string): void; + invokeFileWatcher(fileFullPath: string, eventKind: FileWatcherEventKind, useFileNameInCallback?: boolean): void; + private getRelativePathToDirectory; + /** + * This will call the directory watcher for the folderFullPath and recursive directory watchers for this and base folders + */ + private invokeDirectoryWatcher; + private directoryCallback; + /** + * This will call the recursive directory watcher for this directory as well as all the base directories + */ + private invokeRecursiveDirectoryWatcher; + private toFsEntry; + private toFsFile; + private toFsSymLink; + private toFsFolder; + private getRealFsEntry; + private isFsFile; + private getRealFile; + private isFsFolder; + private getRealFolder; + fileExists(s: string): boolean; + getModifiedTime(s: string): Date; + readFile(s: string): string | undefined; + getFileSize(s: string): number; + directoryExists(s: string): boolean; + getDirectories(s: string): string[]; + readDirectory(path: string, extensions?: ReadonlyArray, exclude?: ReadonlyArray, include?: ReadonlyArray, depth?: number): string[]; + watchDirectory(directoryName: string, cb: DirectoryWatcherCallback, recursive: boolean): FileWatcher; + createHash(s: string): string; + createSHA256Hash(s: string): string; + watchFile(fileName: string, cb: FileWatcherCallback, pollingInterval: number): FileWatcher; + setTimeout(callback: TimeOutCallback, _time: number, ...args: any[]): number; + getNextTimeoutId(): number; + clearTimeout(timeoutId: any): void; + clearScreen(): void; + checkTimeoutQueueLengthAndRun(expected: number): void; + checkTimeoutQueueLength(expected: number): void; + runQueuedTimeoutCallbacks(timeoutId?: number): void; + runQueuedImmediateCallbacks(checkCount?: number): void; + setImmediate(callback: TimeOutCallback, _time: number, ...args: any[]): number; + clearImmediate(timeoutId: any): void; + createDirectory(directoryName: string): void; + writeFile(path: string, content: string): void; + write(message: string): void; + getOutput(): ReadonlyArray; + clearOutput(): void; + realpath(s: string): string; + readonly exitMessage: string; + exitCode: number | undefined; + readonly resolvePath: (s: string) => string; + readonly getExecutingFilePath: () => string; + readonly getCurrentDirectory: () => string; + exit(exitCode?: number): void; + getEnvironmentVariable(name: string): string; + } +} +declare namespace FourSlash { + import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; + const enum FourSlashTestType { + Native = 0, + Shims = 1, + ShimsWithPreprocess = 2, + Server = 3 + } + interface FourSlashFile { + content: string; + fileName: string; + symlinks?: string[]; + version: number; + fileOptions: Harness.TestCaseParser.CompilerSettings; + } + interface FourSlashData { + globalOptions: Harness.TestCaseParser.CompilerSettings; + files: FourSlashFile[]; + markerPositions: ts.Map; + markers: Marker[]; + /** + * Inserted in source files by surrounding desired text + * in a range with `[|` and `|]`. For example, + * + * [|text in range|] + * + * is a range with `text in range` "selected". + */ + ranges: Range[]; + } + interface Marker { + fileName: string; + position: number; + data?: {}; + } + interface Range { + fileName: string; + pos: number; + end: number; + marker?: Marker; + } + interface TextSpan { + start: number; + end: number; + } + class TestCancellationToken implements ts.HostCancellationToken { + private static readonly notCanceled; + private numberOfCallsBeforeCancellation; + isCancellationRequested(): boolean; + setCancelled(numberOfCalls?: number): void; + resetCancelled(): void; + } + function verifyOperationIsCancelled(f: () => void): void; + class TestState { + private basePath; + private testType; + testData: FourSlashData; + private languageServiceAdapterHost; + private languageService; + private cancellationToken; + currentCaretPosition: number; + selectionEnd: number; + lastKnownMarker: string; + activeFile: FourSlashFile; + enableFormatting: boolean; + formatCodeSettings: ts.FormatCodeSettings; + private inputFiles; + private static getDisplayPartsJson; + private addMatchedInputFile; + private getLanguageServiceAdapter; + constructor(basePath: string, testType: FourSlashTestType, testData: FourSlashData); + private getFileContent; + goToMarker(name?: string | Marker): void; + goToEachMarker(markers: ReadonlyArray, action: (marker: Marker, index: number) => void): void; + goToEachRange(action: () => void): void; + markerName(m: Marker): string; + goToPosition(pos: number): void; + select(startMarker: string, endMarker: string): void; + selectRange(range: Range): void; + moveCaretRight(count?: number): void; + openFile(indexOrName: number | string, content?: string, scriptKindName?: string): void; + verifyErrorExistsBetweenMarkers(startMarkerName: string, endMarkerName: string, shouldExist: boolean): void; + private raiseError; + private messageAtLastKnownMarker; + private assertionMessageAtLastKnownMarker; + private getDiagnostics; + private getAllDiagnostics; + verifyErrorExistsAfterMarker(markerName: string, shouldExist: boolean, after: boolean): void; + private anyErrorInRange; + private printErrorLog; + private formatRange; + private formatLineAndCharacterOfPosition; + private formatPosition; + verifyNoErrors(): void; + verifyNumberOfErrorsInCurrentFile(expected: number): void; + verifyEval(expr: string, value: any): void; + verifyGoToDefinitionIs(endMarker: ArrayOrSingle): void; + verifyGoToDefinition(arg0: any, endMarkerNames?: ArrayOrSingle): void; + private getGoToDefinition; + private getGoToDefinitionAndBoundSpan; + verifyGoToType(arg0: any, endMarkerNames?: ArrayOrSingle): void; + private verifyGoToX; + private verifyGoToXPlain; + verifyGoToDefinitionForMarkers(markerNames: string[]): void; + private verifyGoToXSingle; + private verifyGoToXWorker; + private verifyDefinitionTextSpan; + verifyGetEmitOutputForCurrentFile(expected: string): void; + verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void; + verifyCompletionListCount(expectedCount: number, negative: boolean): void; + verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean): void; + verifyCompletionListStartsWithItemsInOrder(items: string[]): void; + noItemsWithSameNameButDifferentKind(): void; + verifyCompletionListIsEmpty(negative: boolean): void; + verifyCompletionListAllowsNewIdentifier(negative: boolean): void; + verifyCompletionListIsGlobal(expected: boolean): void; + verifyCompletions(options: FourSlashInterface.VerifyCompletionsOptions): void; + private verifyCompletionsWorker; + private verifyCompletionEntry; + private verifyCompletionsAreExactly; + verifyCompletionsAt(markerName: string | ReadonlyArray, expected: ReadonlyArray, options?: FourSlashInterface.CompletionsAtOptions): void; + verifyCompletionListContains(entryId: ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string | { + kind?: string; + kindModifiers?: string; + }, spanIndex?: number, hasAction?: boolean, options?: FourSlashInterface.VerifyCompletionListContainsOptions): void; + /** + * Verify that the completion list does NOT contain the given symbol. + * The symbol is considered matched with the symbol in the list if and only if all given parameters must matched. + * When any parameter is omitted, the parameter is ignored during comparison and assumed that the parameter with + * that property of the symbol in the list. + * @param symbol the name of symbol + * @param expectedText the text associated with the symbol + * @param expectedDocumentation the documentation text associated with the symbol + * @param expectedKind the kind of symbol (see ScriptElementKind) + * @param spanIndex the index of the range that the completion item's replacement text span should match + */ + verifyCompletionListDoesNotContain(entryId: ts.Completions.CompletionEntryIdentifier, expectedText?: string, expectedDocumentation?: string, expectedKind?: string | { + kind?: string; + kindModifiers?: string; + }, spanIndex?: number, options?: FourSlashInterface.CompletionsAtOptions): void; + verifyCompletionEntryDetails(entryName: string, expectedText: string, expectedDocumentation?: string, kind?: string, tags?: ts.JSDocTagInfo[]): void; + /** Use `getProgram` instead of accessing this directly. */ + private _program; + /** Use `getChecker` instead of accessing this directly. */ + private _checker; + private getProgram; + private getChecker; + private getSourceFile; + private getNode; + private goToAndGetNode; + private verifyRange; + private verifySymbol; + verifySymbolAtLocation(startRange: Range, declarationRanges: Range[]): void; + symbolsInScope(range: Range): ts.Symbol[]; + setTypesRegistry(map: ts.MapLike): void; + verifyTypeOfSymbolAtLocation(range: Range, symbol: ts.Symbol, expected: string): void; + private verifyDocumentHighlightsRespectFilesList; + verifyReferenceGroups(starts: ArrayOrSingle | ArrayOrSingle, parts: ReadonlyArray): void; + verifyNoReferences(markerNameOrRange?: string | Range): void; + verifyGetReferencesForServerTest(expected: ReadonlyArray): void; + verifySingleReferenceGroup(definition: FourSlashInterface.ReferenceGroupDefinition, ranges?: Range[]): void; + private assertObjectsEqual; + verifyDisplayPartsOfReferencedSymbol(expected: ts.SymbolDisplayPart[]): void; + private getCompletionListAtCaret; + private getCompletionEntryDetails; + private getReferencesAtCaret; + private findReferencesAtCaret; + getSyntacticDiagnostics(expected: ReadonlyArray): void; + getSemanticDiagnostics(expected: ReadonlyArray): void; + getSuggestionDiagnostics(expected: ReadonlyArray): void; + private testDiagnostics; + verifyQuickInfoAt(markerName: string, expectedText: string, expectedDocumentation?: string): void; + verifyQuickInfos(namesAndTexts: { + [name: string]: string | [string, string]; + }): void; + verifyQuickInfoString(expectedText: string, expectedDocumentation?: string): void; + verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: TextSpan, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[], tags: ts.JSDocTagInfo[]): void; + verifyRangesAreRenameLocations(options?: Range[] | { + findInStrings?: boolean; + findInComments?: boolean; + ranges?: Range[]; + }): void; + verifyRenameLocations(startRanges: ArrayOrSingle, options: Range[] | { + findInStrings?: boolean; + findInComments?: boolean; + ranges: Range[]; + }): void; + verifyQuickInfoExists(negative: boolean): void; + verifyNoSignatureHelp(markers: ReadonlyArray): void; + verifySignatureHelp(optionses: ReadonlyArray): void; + private verifySignatureHelpWorker; + private validate; + verifyRenameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string): void; + verifyRenameInfoFailed(message?: string): void; + private alignmentForExtraInfo; + private spanInfoToString; + private baselineCurrentFileLocations; + getBreakpointStatementLocation(pos: number): ts.TextSpan | undefined; + baselineCurrentFileBreakpointLocations(): void; + baselineGetEmitOutput(insertResultsIntoVfs?: boolean): void; + baselineQuickInfo(): void; + printBreakpointLocation(pos: number): void; + printBreakpointAtCurrentLocation(): void; + printCurrentParameterHelp(): void; + printCurrentQuickInfo(): void; + printErrorList(): void; + printCurrentFileState(showWhitespace: boolean, makeCaretVisible: boolean): void; + printCurrentSignatureHelp(): void; + private getSignatureHelp; + printCompletionListMembers(preferences: ts.UserPreferences | undefined): void; + private printMembersOrCompletions; + printContext(): void; + deleteChar(count?: number): void; + replace(start: number, length: number, text: string): void; + deleteCharBehindMarker(count?: number): void; + type(text: string, highFidelity?: boolean): void; + paste(text: string): void; + private checkPostEditInvariants; + /** + * @returns The number of characters added to the file as a result of the edits. + * May be negative. + */ + private applyEdits; + copyFormatOptions(): ts.FormatCodeSettings; + setFormatOptions(formatCodeOptions: ts.FormatCodeOptions | ts.FormatCodeSettings): ts.FormatCodeSettings; + formatDocument(): void; + formatSelection(start: number, end: number): void; + formatOnType(pos: number, key: string): void; + private editScriptAndUpdateMarkers; + private removeWhitespace; + goToBOF(): void; + goToEOF(): void; + goToRangeStart({ fileName, pos }: Range): void; + goToTypeDefinition(definitionIndex: number): void; + verifyTypeDefinitionsCount(negative: boolean, expectedCount: number): void; + verifyImplementationListIsEmpty(negative: boolean): void; + verifyGoToDefinitionName(expectedName: string, expectedContainerName: string): void; + goToImplementation(): void; + verifyRangesInImplementationList(markerName: string): void; + getMarkers(): Marker[]; + getMarkerNames(): string[]; + getRanges(): Range[]; + rangesByText(): ts.Map; + private rangeText; + verifyCaretAtMarker(markerName?: string): void; + private getIndentation; + verifyIndentationAtCurrentPosition(numberOfSpaces: number, indentStyle?: ts.IndentStyle, baseIndentSize?: number): void; + verifyIndentationAtPosition(fileName: string, position: number, numberOfSpaces: number, indentStyle?: ts.IndentStyle, baseIndentSize?: number): void; + verifyCurrentLineContent(text: string): void; + verifyCurrentFileContent(text: string): void; + private verifyFileContent; + verifyTextAtCaretIs(text: string): void; + verifyCurrentNameOrDottedNameSpanText(text: string): undefined; + private getNameOrDottedNameSpan; + baselineCurrentFileNameOrDottedNameSpans(): void; + printNameOrDottedNameSpans(pos: number): void; + private verifyClassifications; + verifyProjectInfo(expected: string[]): void; + verifySemanticClassifications(expected: { + classificationType: string; + text: string; + }[]): void; + verifySyntacticClassifications(expected: { + classificationType: string; + text: string; + }[]): void; + printOutliningSpans(): void; + verifyOutliningSpans(spans: Range[], kind?: "comment" | "region" | "code" | "imports"): void; + verifyTodoComments(descriptors: string[], spans: Range[]): void; + /** + * Finds and applies a code action corresponding to the supplied parameters. + * If index is undefined, applies the unique code action available. + * @param errorCode The error code that generated the code action. + * @param index The nth (0-index-based) codeaction available generated by errorCode. + */ + getAndApplyCodeActions(errorCode?: number, index?: number): void; + applyCodeActionFromCompletion(markerName: string, options: FourSlashInterface.VerifyCompletionActionOptions): void; + verifyRangeIs(expectedText: string, includeWhiteSpace?: boolean): void; + /** + * Compares expected text to the text that would be in the sole range + * (ie: [|...|]) in the file after applying the codefix sole codefix + * in the source file. + */ + verifyRangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void; + verifyCodeFixAll({ fixId, fixAllDescription, newFileContent, commands: expectedCommands }: FourSlashInterface.VerifyCodeFixAllOptions): void; + /** + * Applies fixes for the errors in fileName and compares the results to + * expectedContents after all fixes have been applied. + * + * Note: applying one codefix may generate another (eg: remove duplicate implements + * may generate an extends -> interface conversion fix). + * @param expectedContents The contents of the file after the fixes are applied. + * @param fileName The file to check. If not supplied, the current open file is used. + */ + verifyFileAfterCodeFix(expectedContents: string, fileName?: string): void; + verifyCodeFix(options: FourSlashInterface.VerifyCodeFixOptions): void; + private verifyNewContent; + /** + * Rerieves a codefix satisfying the parameters, or undefined if no such codefix is found. + * @param fileName Path to file where error should be retrieved from. + */ + private getCodeFixes; + private applyCodeActions; + private applyChanges; + verifyImportFixAtPosition(expectedTextArray: string[], errorCode: number | undefined, preferences: ts.UserPreferences | undefined): void; + verifyDocCommentTemplate(expected: ts.TextInsertion | undefined): void; + verifyBraceCompletionAtPosition(negative: boolean, openingBrace: string): void; + verifyJsxClosingTag(map: { + [markerName: string]: ts.JsxClosingTagInfo | undefined; + }): void; + verifyMatchingBracePosition(bracePosition: number, expectedMatchPosition: number): void; + verifyNoMatchingBracePosition(bracePosition: number): void; + verifySpanOfEnclosingComment(negative: boolean, onlyMultiLineDiverges?: boolean): void; + verifyNavigationItemsCount(expected: number, searchValue: string, matchKind?: string, fileName?: string): void; + verifyNavigationItemsListContains(name: string, kind: string, searchValue: string, matchKind: string, fileName?: string, parentName?: string): void; + verifyNavigationBar(json: any, options: { + checkSpans?: boolean; + } | undefined): void; + verifyNavigationTree(json: any, options: { + checkSpans?: boolean; + } | undefined): void; + private verifyNavigationTreeOrBar; + printNavigationItems(searchValue: string): void; + printNavigationBar(): void; + private getOccurrencesAtCurrentPosition; + verifyOccurrencesAtPositionListContains(fileName: string, start: number, end: number, isWriteAccess?: boolean): undefined; + verifyOccurrencesAtPositionListCount(expectedCount: number): void; + private getDocumentHighlightsAtCurrentPosition; + verifyRangesAreOccurrences(isWriteAccess?: boolean): void; + verifyRangesWithSameTextAreRenameLocations(): void; + verifyRangesWithSameTextAreDocumentHighlights(): void; + verifyDocumentHighlightsOf(startRange: Range, ranges: Range[], options: FourSlashInterface.VerifyDocumentHighlightsOptions | undefined): void; + verifyRangesAreDocumentHighlights(ranges: Range[] | undefined, options: FourSlashInterface.VerifyDocumentHighlightsOptions | undefined): void; + verifyNoDocumentHighlights(startRange: Range): void; + private verifyDocumentHighlights; + verifyCodeFixAvailable(negative: boolean, expected: FourSlashInterface.VerifyCodeFixAvailableOptions[] | undefined): void; + verifyApplicableRefactorAvailableAtMarker(negative: boolean, markerName: string): void; + private getSelection; + verifyRefactorAvailable(negative: boolean, name: string, actionName?: string): void; + verifyRefactor({ name, actionName, refactors }: FourSlashInterface.VerifyRefactorOptions): void; + verifyApplicableRefactorAvailableForRange(negative: boolean): void; + applyRefactor({ refactorName, actionName, actionDescription, newContent: newContentWithRenameMarker }: FourSlashInterface.ApplyRefactorOptions): void; + noMoveToNewFile(): void; + moveToNewFile(options: FourSlashInterface.MoveToNewFileOptions): void; + private testNewFileContents; + verifyFileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, actionName: string, formattingOptions?: ts.FormatCodeSettings): void; + printAvailableCodeFixes(): void; + private getCurrentLineContent; + private assertItemInCompletionList; + private findFile; + private getLineColStringAtPosition; + private getTextSpanForRangeAtIndex; + getMarkerByName(markerName: string): Marker; + setCancelled(numberOfCalls: number): void; + resetCancelled(): void; + private static textSpansEqual; + getEditsForFileRename(options: FourSlashInterface.GetEditsForFileRenameOptions): void; + private getApplicableRefactors; + } + function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string): void; + function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): void; +} +declare namespace FourSlashInterface { + class Test { + private state; + constructor(state: FourSlash.TestState); + markers(): FourSlash.Marker[]; + markerNames(): string[]; + marker(name: string): FourSlash.Marker; + markerName(m: FourSlash.Marker): string; + ranges(): FourSlash.Range[]; + spans(): ts.TextSpan[]; + rangesByText(): ts.Map; + markerByName(s: string): FourSlash.Marker; + symbolsInScope(range: FourSlash.Range): ts.Symbol[]; + setTypesRegistry(map: ts.MapLike): void; + } + class GoTo { + private state; + constructor(state: FourSlash.TestState); + marker(name?: string | FourSlash.Marker): void; + eachMarker(markers: ReadonlyArray, action: (marker: FourSlash.Marker, index: number) => void): void; + eachMarker(action: (marker: FourSlash.Marker, index: number) => void): void; + rangeStart(range: FourSlash.Range): void; + eachRange(action: () => void): void; + bof(): void; + eof(): void; + implementation(): void; + position(position: number, fileNameOrIndex?: string | number): void; + file(indexOrName: number | string, content?: string, scriptKindName?: string): void; + select(startMarker: string, endMarker: string): void; + selectRange(range: FourSlash.Range): void; + } + class VerifyNegatable { + protected state: FourSlash.TestState; + private negative; + not: VerifyNegatable; + allowedClassElementKeywords: string[]; + allowedConstructorParameterKeywords: string[]; + constructor(state: FourSlash.TestState, negative?: boolean); + completionListCount(expectedCount: number): void; + completionListContains(entryId: string | ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string | { + kind?: string; + kindModifiers?: string; + }, spanIndex?: number, hasAction?: boolean, options?: VerifyCompletionListContainsOptions): void; + completionListItemsCountIsGreaterThan(count: number): void; + assertHasRanges(ranges: FourSlash.Range[]): void; + completionListIsEmpty(): void; + completionListContainsClassElementKeywords(): void; + completionListContainsConstructorParameterKeywords(): void; + completionListIsGlobal(expected: boolean): void; + completionListAllowsNewIdentifier(): void; + noSignatureHelp(...markers: string[]): void; + signatureHelp(...options: VerifySignatureHelpOptions[]): void; + errorExistsBetweenMarkers(startMarker: string, endMarker: string): void; + errorExistsAfterMarker(markerName?: string): void; + errorExistsBeforeMarker(markerName?: string): void; + quickInfoExists(): void; + typeDefinitionCountIs(expectedCount: number): void; + implementationListIsEmpty(): void; + isValidBraceCompletionAtPosition(openingBrace: string): void; + jsxClosingTag(map: { + [markerName: string]: ts.JsxClosingTagInfo | undefined; + }): void; + isInCommentAtPosition(onlyMultiLineDiverges?: boolean): void; + codeFix(options: VerifyCodeFixOptions): void; + codeFixAvailable(options?: VerifyCodeFixAvailableOptions[]): void; + applicableRefactorAvailableAtMarker(markerName: string): void; + applicableRefactorAvailableForRange(): void; + refactor(options: VerifyRefactorOptions): void; + refactorAvailable(name: string, actionName?: string): void; + } + class Verify extends VerifyNegatable { + constructor(state: FourSlash.TestState); + completionsAt(markerName: ArrayOrSingle, completions: ReadonlyArray, options?: CompletionsAtOptions): void; + completions(...optionsArray: VerifyCompletionsOptions[]): void; + quickInfoIs(expectedText: string, expectedDocumentation?: string): void; + quickInfoAt(markerName: string, expectedText: string, expectedDocumentation?: string): void; + quickInfos(namesAndTexts: { + [name: string]: string; + }): void; + caretAtMarker(markerName?: string): void; + indentationIs(numberOfSpaces: number): void; + indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number, indentStyle?: ts.IndentStyle, baseIndentSize?: number): void; + textAtCaretIs(text: string): void; + /** + * Compiles the current file and evaluates 'expr' in a context containing + * the emitted output, then compares (using ===) the result of that expression + * to 'value'. Do not use this function with external modules as it is not supported. + */ + eval(expr: string, value: any): void; + currentLineContentIs(text: string): void; + currentFileContentIs(text: string): void; + goToDefinitionIs(endMarkers: ArrayOrSingle): void; + goToDefinition(startMarkerName: ArrayOrSingle, endMarkerName: ArrayOrSingle, range?: FourSlash.Range): void; + goToDefinition(startsAndEnds: [ArrayOrSingle, ArrayOrSingle][] | { + [startMarkerName: string]: ArrayOrSingle; + }): void; + goToType(startMarkerName: ArrayOrSingle, endMarkerName: ArrayOrSingle): void; + goToType(startsAndEnds: [ArrayOrSingle, ArrayOrSingle][] | { + [startMarkerName: string]: ArrayOrSingle; + }): void; + goToDefinitionForMarkers(...markerNames: string[]): void; + goToDefinitionName(name: string, containerName: string): void; + verifyGetEmitOutputForCurrentFile(expected: string): void; + verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void; + symbolAtLocation(startRange: FourSlash.Range, ...declarationRanges: FourSlash.Range[]): void; + typeOfSymbolAtLocation(range: FourSlash.Range, symbol: ts.Symbol, expected: string): void; + referenceGroups(starts: ArrayOrSingle | ArrayOrSingle, parts: ReferenceGroup[]): void; + noReferences(markerNameOrRange?: string | FourSlash.Range): void; + getReferencesForServerTest(expected: ReadonlyArray): void; + singleReferenceGroup(definition: ReferenceGroupDefinition, ranges?: FourSlash.Range[]): void; + findReferencesDefinitionDisplayPartsAtCaretAre(expected: ts.SymbolDisplayPart[]): void; + noErrors(): void; + numberOfErrorsInCurrentFile(expected: number): void; + baselineCurrentFileBreakpointLocations(): void; + baselineCurrentFileNameOrDottedNameSpans(): void; + baselineGetEmitOutput(insertResultsIntoVfs?: boolean): void; + baselineQuickInfo(): void; + nameOrDottedNameSpanTextIs(text: string): void; + outliningSpansInCurrentFile(spans: FourSlash.Range[], kind?: "comment" | "region" | "code" | "imports"): void; + todoCommentsInCurrentFile(descriptors: string[]): void; + matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number): void; + noMatchingBracePositionInCurrentFile(bracePosition: number): void; + docCommentTemplateAt(marker: string | FourSlash.Marker, expectedOffset: number, expectedText: string): void; + noDocCommentTemplateAt(marker: string | FourSlash.Marker): void; + rangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void; + codeFixAll(options: VerifyCodeFixAllOptions): void; + fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, actionName: string, formattingOptions?: ts.FormatCodeSettings): void; + rangeIs(expectedText: string, includeWhiteSpace?: boolean): void; + getAndApplyCodeFix(errorCode?: number, index?: number): void; + applyCodeActionFromCompletion(markerName: string, options: VerifyCompletionActionOptions): void; + importFixAtPosition(expectedTextArray: string[], errorCode?: number, preferences?: ts.UserPreferences): void; + navigationBar(json: any, options?: { + checkSpans?: boolean; + }): void; + navigationTree(json: any, options?: { + checkSpans?: boolean; + }): void; + navigationItemsListCount(count: number, searchValue: string, matchKind?: string, fileName?: string): void; + navigationItemsListContains(name: string, kind: string, searchValue: string, matchKind: string, fileName?: string, parentName?: string): void; + occurrencesAtPositionContains(range: FourSlash.Range, isWriteAccess?: boolean): void; + occurrencesAtPositionCount(expectedCount: number): void; + rangesAreOccurrences(isWriteAccess?: boolean): void; + rangesWithSameTextAreRenameLocations(): void; + rangesAreRenameLocations(options?: FourSlash.Range[] | { + findInStrings?: boolean; + findInComments?: boolean; + ranges?: FourSlash.Range[]; + }): void; + rangesAreDocumentHighlights(ranges?: FourSlash.Range[], options?: VerifyDocumentHighlightsOptions): void; + rangesWithSameTextAreDocumentHighlights(): void; + documentHighlightsOf(startRange: FourSlash.Range, ranges: FourSlash.Range[], options?: VerifyDocumentHighlightsOptions): void; + noDocumentHighlights(startRange: FourSlash.Range): void; + completionEntryDetailIs(entryName: string, text: string, documentation?: string, kind?: string, tags?: ts.JSDocTagInfo[]): void; + /** + * This method *requires* a contiguous, complete, and ordered stream of classifications for a file. + */ + syntacticClassificationsAre(...classifications: { + classificationType: string; + text: string; + }[]): void; + /** + * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended. + */ + semanticClassificationsAre(...classifications: Classification[]): void; + renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string): void; + renameInfoFailed(message?: string): void; + renameLocations(startRanges: ArrayOrSingle, options: FourSlash.Range[] | { + findInStrings?: boolean; + findInComments?: boolean; + ranges: FourSlash.Range[]; + }): void; + verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: FourSlash.TextSpan, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[], tags: ts.JSDocTagInfo[]): void; + getSyntacticDiagnostics(expected: ReadonlyArray): void; + getSemanticDiagnostics(expected: ReadonlyArray): void; + getSuggestionDiagnostics(expected: ReadonlyArray): void; + ProjectInfo(expected: string[]): void; + allRangesAppearInImplementationList(markerName: string): void; + getEditsForFileRename(options: GetEditsForFileRenameOptions): void; + moveToNewFile(options: MoveToNewFileOptions): void; + noMoveToNewFile(): void; + } + class Edit { + private state; + constructor(state: FourSlash.TestState); + backspace(count?: number): void; + deleteAtCaret(times?: number): void; + replace(start: number, length: number, text: string): void; + paste(text: string): void; + insert(text: string): void; + insertLine(text: string): void; + insertLines(...lines: string[]): void; + moveRight(count?: number): void; + moveLeft(count?: number): void; + enableFormatting(): void; + disableFormatting(): void; + applyRefactor(options: ApplyRefactorOptions): void; + } + class Debug { + private state; + constructor(state: FourSlash.TestState); + printCurrentParameterHelp(): void; + printCurrentFileState(): void; + printCurrentFileStateWithWhitespace(): void; + printCurrentFileStateWithoutCaret(): void; + printCurrentQuickInfo(): void; + printCurrentSignatureHelp(): void; + printCompletionListMembers(options: ts.UserPreferences | undefined): void; + printAvailableCodeFixes(): void; + printBreakpointLocation(pos: number): void; + printBreakpointAtCurrentLocation(): void; + printNameOrDottedNameSpans(pos: number): void; + printErrorList(): void; + printNavigationItems(searchValue?: string): void; + printNavigationBar(): void; + printContext(): void; + printOutliningSpans(): void; + } + class Format { + private state; + constructor(state: FourSlash.TestState); + document(): void; + copyFormatOptions(): ts.FormatCodeSettings; + setFormatOptions(options: ts.FormatCodeOptions): ts.FormatCodeSettings; + selection(startMarker: string, endMarker: string): void; + onType(posMarker: string, key: string): void; + setOption(name: keyof ts.FormatCodeSettings, value: number | string | boolean): void; + } + class Cancellation { + private state; + constructor(state: FourSlash.TestState); + resetCancelled(): void; + setCancelled(numberOfCalls?: number): void; + } + interface Classification { + classificationType: ts.ClassificationTypeNames; + text: string; + textSpan?: FourSlash.TextSpan; + } + namespace Classification { + function comment(text: string, position?: number): Classification; + function identifier(text: string, position?: number): Classification; + function keyword(text: string, position?: number): Classification; + function numericLiteral(text: string, position?: number): Classification; + function operator(text: string, position?: number): Classification; + function stringLiteral(text: string, position?: number): Classification; + function whiteSpace(text: string, position?: number): Classification; + function text(text: string, position?: number): Classification; + function punctuation(text: string, position?: number): Classification; + function docCommentTagName(text: string, position?: number): Classification; + function className(text: string, position?: number): Classification; + function enumName(text: string, position?: number): Classification; + function interfaceName(text: string, position?: number): Classification; + function moduleName(text: string, position?: number): Classification; + function typeParameterName(text: string, position?: number): Classification; + function parameterName(text: string, position?: number): Classification; + function typeAliasName(text: string, position?: number): Classification; + function jsxOpenTagName(text: string, position?: number): Classification; + function jsxCloseTagName(text: string, position?: number): Classification; + function jsxSelfClosingTagName(text: string, position?: number): Classification; + function jsxAttribute(text: string, position?: number): Classification; + function jsxText(text: string, position?: number): Classification; + function jsxAttributeStringLiteralValue(text: string, position?: number): Classification; + } + interface ReferenceGroup { + definition: ReferenceGroupDefinition; + ranges: FourSlash.Range[]; + } + type ReferenceGroupDefinition = string | { + text: string; + range: FourSlash.Range; + }; + interface ApplyRefactorOptions { + refactorName: string; + actionName: string; + actionDescription: string; + newContent: string; + } + type ExpectedCompletionEntry = string | { + readonly name: string; + readonly insertText?: string; + readonly replacementSpan?: FourSlash.Range; + readonly hasAction?: boolean; + readonly isRecommended?: boolean; + readonly kind?: string; + readonly text: string; + readonly documentation: string; + readonly sourceDisplay?: string; + }; + interface CompletionsAtOptions extends Partial { + triggerCharacter?: ts.CompletionsTriggerCharacter; + isNewIdentifierLocation?: boolean; + } + interface VerifyCompletionsOptions { + readonly marker?: ArrayOrSingle; + readonly isNewIdentifierLocation?: boolean; + readonly exact?: ArrayOrSingle; + readonly includes?: ArrayOrSingle; + readonly excludes?: ArrayOrSingle; + readonly preferences?: ts.UserPreferences; + readonly triggerCharacter?: ts.CompletionsTriggerCharacter; + } + interface VerifySignatureHelpOptions { + readonly marker?: ArrayOrSingle; + /** @default 1 */ + readonly overloadsCount?: number; + /** @default undefined */ + readonly docComment?: string; + readonly text?: string; + readonly parameterName?: string; + readonly parameterSpan?: string; + /** @default undefined */ + readonly parameterDocComment?: string; + readonly parameterCount?: number; + readonly argumentCount?: number; + /** @default false */ + readonly isVariadic?: boolean; + /** @default ts.emptyArray */ + readonly tags?: ReadonlyArray; + } + type ArrayOrSingle = T | ReadonlyArray; + interface VerifyCompletionListContainsOptions extends ts.UserPreferences { + triggerCharacter?: ts.CompletionsTriggerCharacter; + sourceDisplay: string; + isRecommended?: true; + insertText?: string; + replacementSpan?: FourSlash.Range; + } + interface VerifyDocumentHighlightsOptions { + filesToSearch?: ReadonlyArray; + } + interface NewContentOptions { + newFileContent?: string | { + readonly [filename: string]: string; + }; + newRangeContent?: string; + } + interface VerifyCodeFixOptions extends NewContentOptions { + description: string; + errorCode?: number; + index?: number; + preferences?: ts.UserPreferences; + } + interface VerifyCodeFixAvailableOptions { + description: string; + commands?: ts.CodeActionCommand[]; + } + interface VerifyCodeFixAllOptions { + fixId: string; + fixAllDescription: string; + newFileContent: string; + commands: ReadonlyArray<{}>; + } + interface VerifyRefactorOptions { + name: string; + actionName: string; + refactors: ts.ApplicableRefactorInfo[]; + } + interface VerifyCompletionActionOptions extends NewContentOptions { + name: string; + source?: string; + description: string; + preferences?: ts.UserPreferences; + } + interface Diagnostic { + message: string; + range?: FourSlash.Range; + code: number; + reportsUnnecessary?: true; + } + interface GetEditsForFileRenameOptions { + readonly oldPath: string; + readonly newPath: string; + readonly newFileContents: { + readonly [fileName: string]: string; + }; + } + interface MoveToNewFileOptions { + readonly newFileContents: { + readonly [fileName: string]: string; + }; + readonly preferences?: ts.UserPreferences; + } +} +interface TypeWriterTypeResult { + line: number; + syntaxKind: number; + sourceText: string; + type: string; +} +interface TypeWriterSymbolResult { + line: number; + syntaxKind: number; + sourceText: string; + symbol: string; +} +interface TypeWriterResult { + line: number; + syntaxKind: number; + sourceText: string; + symbol?: string; + type?: string; +} +declare class TypeWriterWalker { + private program; + currentSourceFile: ts.SourceFile; + private checker; + constructor(program: ts.Program, fullTypeCheck: boolean); + getSymbols(fileName: string): IterableIterator; + getTypes(fileName: string): IterableIterator; + private visitNode; + private writeTypeOrSymbol; +} +interface FileInformation { + contents?: string; + contentsPath?: string; + codepage: number; + bom?: string; +} +interface FindFileResult { +} +interface IoLogFile { + path: string; + codepage: number; + result?: FileInformation; +} +interface IoLog { + timestamp: string; + arguments: string[]; + executingPath: string; + currentDirectory: string; + useCustomLibraryFile?: boolean; + filesRead: IoLogFile[]; + filesWritten: { + path: string; + contents?: string; + contentsPath?: string; + bom: boolean; + }[]; + filesDeleted: string[]; + filesAppended: { + path: string; + contents?: string; + contentsPath?: string; + }[]; + fileExists: { + path: string; + result?: boolean; + }[]; + filesFound: { + path: string; + pattern: string; + result?: FindFileResult; + }[]; + dirs: { + path: string; + re: string; + re_m: boolean; + re_g: boolean; + re_i: boolean; + opts: { + recursive?: boolean; + }; + result?: string[]; + }[]; + dirExists: { + path: string; + result?: boolean; + }[]; + dirsCreated: string[]; + pathsResolved: { + path: string; + result?: string; + }[]; + directoriesRead: { + path: string; + extensions: ReadonlyArray | undefined; + exclude: ReadonlyArray | undefined; + include: ReadonlyArray | undefined; + depth: number | undefined; + result: ReadonlyArray; + }[]; + useCaseSensitiveFileNames?: boolean; +} +interface PlaybackControl { + startReplayFromFile(logFileName: string): void; + startReplayFromString(logContents: string): void; + startReplayFromData(log: IoLog): void; + endReplay(): void; + startRecord(logFileName: string): void; + endRecord(): void; +} +declare namespace Playback { + interface PlaybackIO extends Harness.IO, PlaybackControl { + } + interface PlaybackSystem extends ts.System, PlaybackControl { + } + function newStyleLogIntoOldStyleLog(log: IoLog, host: ts.System | Harness.IO, baseName: string): IoLog; + function oldStyleLogIntoNewStyleLog(log: IoLog, writeFile: typeof Harness.IO.writeFile, baseTestName: string): IoLog; + function wrapIO(underlying: Harness.IO): PlaybackIO; + function wrapSystem(underlying: ts.System): PlaybackSystem; +} diff --git a/src/built/local/harness.js b/src/built/local/harness.js new file mode 100644 index 00000000000..d1db38a129e --- /dev/null +++ b/src/built/local/harness.js @@ -0,0 +1,11641 @@ +"use strict"; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function (o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +}; +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var collections; +(function (collections) { + var SortedMap = /** @class */ (function () { + function SortedMap(comparer, iterable) { + this._keys = []; + this._values = []; + this._version = 0; + this._copyOnWrite = false; + this._comparer = typeof comparer === "object" ? comparer.comparer : comparer; + this._order = typeof comparer === "object" && comparer.sort === "insertion" ? [] : undefined; + if (iterable) { + var iterator = getIterator(iterable); + try { + for (var i = nextResult(iterator); i; i = nextResult(iterator)) { + var _a = i.value, key = _a[0], value = _a[1]; + this.set(key, value); + } + } + finally { + closeIterator(iterator); + } + } + } + Object.defineProperty(SortedMap.prototype, "size", { + get: function () { + return this._keys.length; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SortedMap.prototype, "comparer", { + get: function () { + return this._comparer; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SortedMap.prototype, Symbol.toStringTag, { + get: function () { + return "SortedMap"; + }, + enumerable: true, + configurable: true + }); + SortedMap.prototype.has = function (key) { + return ts.binarySearch(this._keys, key, ts.identity, this._comparer) >= 0; + }; + SortedMap.prototype.get = function (key) { + var index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + return index >= 0 ? this._values[index] : undefined; + }; + SortedMap.prototype.set = function (key, value) { + var index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + if (index >= 0) { + this._values[index] = value; + } + else { + this.writePreamble(); + insertAt(this._keys, ~index, key); + insertAt(this._values, ~index, value); + if (this._order) + insertAt(this._order, ~index, this._version); + this.writePostScript(); + } + return this; + }; + SortedMap.prototype.delete = function (key) { + var index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + if (index >= 0) { + this.writePreamble(); + ts.orderedRemoveItemAt(this._keys, index); + ts.orderedRemoveItemAt(this._values, index); + if (this._order) + ts.orderedRemoveItemAt(this._order, index); + this.writePostScript(); + return true; + } + return false; + }; + SortedMap.prototype.clear = function () { + if (this.size > 0) { + this.writePreamble(); + this._keys.length = 0; + this._values.length = 0; + if (this._order) + this._order.length = 0; + this.writePostScript(); + } + }; + SortedMap.prototype.forEach = function (callback, thisArg) { + var keys = this._keys; + var values = this._values; + var indices = this.getIterationOrder(); + var version = this._version; + this._copyOnWrite = true; + try { + if (indices) { + for (var _i = 0, indices_1 = indices; _i < indices_1.length; _i++) { + var i = indices_1[_i]; + callback.call(thisArg, values[i], keys[i], this); + } + } + else { + for (var i = 0; i < keys.length; i++) { + callback.call(thisArg, values[i], keys[i], this); + } + } + } + finally { + if (version === this._version) { + this._copyOnWrite = false; + } + } + }; + SortedMap.prototype.keys = function () { + var keys, indices, version, _i, indices_2, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + keys = this._keys; + indices = this.getIterationOrder(); + version = this._version; + this._copyOnWrite = true; + _a.label = 1; + case 1: + _a.trys.push([1, , 9, 10]); + if (!indices) return [3 /*break*/, 6]; + _i = 0, indices_2 = indices; + _a.label = 2; + case 2: + if (!(_i < indices_2.length)) return [3 /*break*/, 5]; + i = indices_2[_i]; + return [4 /*yield*/, keys[i]]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + _i++; + return [3 /*break*/, 2]; + case 5: return [3 /*break*/, 8]; + case 6: return [5 /*yield**/, __values(keys)]; + case 7: + _a.sent(); + _a.label = 8; + case 8: return [3 /*break*/, 10]; + case 9: + if (version === this._version) { + this._copyOnWrite = false; + } + return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }; + SortedMap.prototype.values = function () { + var values, indices, version, _i, indices_3, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + values = this._values; + indices = this.getIterationOrder(); + version = this._version; + this._copyOnWrite = true; + _a.label = 1; + case 1: + _a.trys.push([1, , 9, 10]); + if (!indices) return [3 /*break*/, 6]; + _i = 0, indices_3 = indices; + _a.label = 2; + case 2: + if (!(_i < indices_3.length)) return [3 /*break*/, 5]; + i = indices_3[_i]; + return [4 /*yield*/, values[i]]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + _i++; + return [3 /*break*/, 2]; + case 5: return [3 /*break*/, 8]; + case 6: return [5 /*yield**/, __values(values)]; + case 7: + _a.sent(); + _a.label = 8; + case 8: return [3 /*break*/, 10]; + case 9: + if (version === this._version) { + this._copyOnWrite = false; + } + return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }; + SortedMap.prototype.entries = function () { + var keys, values, indices, version, _i, indices_4, i, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + keys = this._keys; + values = this._values; + indices = this.getIterationOrder(); + version = this._version; + this._copyOnWrite = true; + _a.label = 1; + case 1: + _a.trys.push([1, , 11, 12]); + if (!indices) return [3 /*break*/, 6]; + _i = 0, indices_4 = indices; + _a.label = 2; + case 2: + if (!(_i < indices_4.length)) return [3 /*break*/, 5]; + i = indices_4[_i]; + return [4 /*yield*/, [keys[i], values[i]]]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + _i++; + return [3 /*break*/, 2]; + case 5: return [3 /*break*/, 10]; + case 6: + i = 0; + _a.label = 7; + case 7: + if (!(i < keys.length)) return [3 /*break*/, 10]; + return [4 /*yield*/, [keys[i], values[i]]]; + case 8: + _a.sent(); + _a.label = 9; + case 9: + i++; + return [3 /*break*/, 7]; + case 10: return [3 /*break*/, 12]; + case 11: + if (version === this._version) { + this._copyOnWrite = false; + } + return [7 /*endfinally*/]; + case 12: return [2 /*return*/]; + } + }); + }; + SortedMap.prototype[Symbol.iterator] = function () { + return this.entries(); + }; + SortedMap.prototype.writePreamble = function () { + if (this._copyOnWrite) { + this._keys = this._keys.slice(); + this._values = this._values.slice(); + if (this._order) + this._order = this._order.slice(); + this._copyOnWrite = false; + } + }; + SortedMap.prototype.writePostScript = function () { + this._version++; + }; + SortedMap.prototype.getIterationOrder = function () { + if (this._order) { + var order_1 = this._order; + return this._order + .map(function (_, i) { return i; }) + .sort(function (x, y) { return order_1[x] - order_1[y]; }); + } + return undefined; + }; + return SortedMap; + }()); + collections.SortedMap = SortedMap; + function insertAt(array, index, value) { + if (index === 0) { + array.unshift(value); + } + else if (index === array.length) { + array.push(value); + } + else { + for (var i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + } + collections.insertAt = insertAt; + function getIterator(iterable) { + return iterable[Symbol.iterator](); + } + collections.getIterator = getIterator; + function nextResult(iterator) { + var result = iterator.next(); + return result.done ? undefined : result; + } + collections.nextResult = nextResult; + function closeIterator(iterator) { + var fn = iterator.return; + if (typeof fn === "function") + fn.call(iterator); + } + collections.closeIterator = closeIterator; + /** + * A collection of metadata that supports inheritance. + */ + var Metadata = /** @class */ (function () { + function Metadata(parent) { + this._version = 0; + this._size = -1; + this._parent = parent; + this._map = Object.create(parent ? parent._map : null); // tslint:disable-line:no-null-keyword + } + Object.defineProperty(Metadata.prototype, "size", { + get: function () { + if (this._size === -1 || (this._parent && this._parent._version !== this._parentVersion)) { + var size = 0; + for (var _ in this._map) + size++; + this._size = size; + if (this._parent) { + this._parentVersion = this._parent._version; + } + } + return this._size; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Metadata.prototype, "parent", { + get: function () { + return this._parent; + }, + enumerable: true, + configurable: true + }); + Metadata.prototype.has = function (key) { + return this._map[Metadata._escapeKey(key)] !== undefined; + }; + Metadata.prototype.get = function (key) { + var value = this._map[Metadata._escapeKey(key)]; + return value === Metadata._undefinedValue ? undefined : value; + }; + Metadata.prototype.set = function (key, value) { + this._map[Metadata._escapeKey(key)] = value === undefined ? Metadata._undefinedValue : value; + this._size = -1; + this._version++; + return this; + }; + Metadata.prototype.delete = function (key) { + var escapedKey = Metadata._escapeKey(key); + if (this._map[escapedKey] !== undefined) { + delete this._map[escapedKey]; + this._size = -1; + this._version++; + return true; + } + return false; + }; + Metadata.prototype.clear = function () { + this._map = Object.create(this._parent ? this._parent._map : null); // tslint:disable-line:no-null-keyword + this._size = -1; + this._version++; + }; + Metadata.prototype.forEach = function (callback) { + for (var key in this._map) { + callback(this._map[key], Metadata._unescapeKey(key), this); + } + }; + Metadata._escapeKey = function (text) { + return (text.length >= 2 && text.charAt(0) === "_" && text.charAt(1) === "_" ? "_" + text : text); + }; + Metadata._unescapeKey = function (text) { + return (text.length >= 3 && text.charAt(0) === "_" && text.charAt(1) === "_" && text.charAt(2) === "_" ? text.slice(1) : text); + }; + Metadata._undefinedValue = {}; + return Metadata; + }()); + collections.Metadata = Metadata; +})(collections || (collections = {})); +/** + * Common utilities + */ +var utils; +(function (utils) { + var testPathPrefixRegExp = /(?:(file:\/{3})|\/)\.(ts|lib|src)\//g; + function removeTestPathPrefixes(text, retainTrailingDirectorySeparator) { + return text !== undefined ? text.replace(testPathPrefixRegExp, function (_, scheme) { return scheme || (retainTrailingDirectorySeparator ? "/" : ""); }) : undefined; // TODO: GH#18217 + } + utils.removeTestPathPrefixes = removeTestPathPrefixes; + /** + * Removes leading indentation from a template literal string. + */ + function dedent(array) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var text = array[0]; + for (var i = 0; i < args.length; i++) { + text += args[i]; + text += array[i + 1]; + } + var lineTerminatorRegExp = /\r\n?|\n/g; + var lines = []; + var lineTerminators = []; + var match; + var lineStart = 0; + while (match = lineTerminatorRegExp.exec(text)) { + if (lineStart !== match.index || lines.length > 0) { + lines.push(text.slice(lineStart, match.index)); + lineTerminators.push(match[0]); + } + lineStart = match.index + match[0].length; + } + if (lineStart < text.length) { + lines.push(text.slice(lineStart)); + } + var indentation = guessIndentation(lines); + var result = ""; + for (var i = 0; i < lines.length; i++) { + var lineText = lines[i]; + var line = indentation ? lineText.slice(indentation) : lineText; + result += line; + if (i < lineTerminators.length) { + result += lineTerminators[i]; + } + } + return result; + } + utils.dedent = dedent; + function guessIndentation(lines) { + var indentation; + for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) { + var line = lines_1[_i]; + for (var i = 0; i < line.length && (indentation === undefined || i < indentation); i++) { + if (!ts.isWhiteSpaceLike(line.charCodeAt(i))) { + if (indentation === undefined || i < indentation) { + indentation = i; + break; + } + } + } + } + return indentation; + } + function toUtf8(text) { + return new Buffer(text).toString("utf8"); + } + utils.toUtf8 = toUtf8; + function getByteOrderMarkLength(text) { + if (text.length >= 1) { + var ch0 = text.charCodeAt(0); + if (ch0 === 0xfeff) + return 1; + if (ch0 === 0xfe) + return text.length >= 2 && text.charCodeAt(1) === 0xff ? 2 : 0; + if (ch0 === 0xff) + return text.length >= 2 && text.charCodeAt(1) === 0xfe ? 2 : 0; + if (ch0 === 0xef) + return text.length >= 3 && text.charCodeAt(1) === 0xbb && text.charCodeAt(2) === 0xbf ? 3 : 0; + } + return 0; + } + utils.getByteOrderMarkLength = getByteOrderMarkLength; + function removeByteOrderMark(text) { + var length = getByteOrderMarkLength(text); + return length ? text.slice(length) : text; + } + utils.removeByteOrderMark = removeByteOrderMark; + function addUTF8ByteOrderMark(text) { + return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; + } + utils.addUTF8ByteOrderMark = addUTF8ByteOrderMark; +})(utils || (utils = {})); +// NOTE: The contents of this file are all exported from the namespace 'documents'. This is to +// support the eventual conversion of harness into a modular system. +var documents; +(function (documents) { + var TextDocument = /** @class */ (function () { + function TextDocument(file, text, meta) { + this.file = file; + this.text = text; + this.meta = meta || new Map(); + } + Object.defineProperty(TextDocument.prototype, "lineStarts", { + get: function () { + return this._lineStarts || (this._lineStarts = ts.computeLineStarts(this.text)); + }, + enumerable: true, + configurable: true + }); + TextDocument.fromTestFile = function (file) { + return new TextDocument(file.unitName, file.content, file.fileOptions && Object.keys(file.fileOptions) + .reduce(function (meta, key) { return meta.set(key, file.fileOptions[key]); }, new Map())); + }; + TextDocument.prototype.asTestFile = function () { + return this._testFile || (this._testFile = { + unitName: this.file, + content: this.text, + fileOptions: Array.from(this.meta) + .reduce(function (obj, _a) { + var key = _a[0], value = _a[1]; + return (obj[key] = value, obj); + }, {}) + }); + }; + return TextDocument; + }()); + documents.TextDocument = TextDocument; + var SourceMap = /** @class */ (function () { + function SourceMap(mapFile, data) { + this.sources = []; + this.mappings = []; + this._emittedLineMappings = []; + this._sourceLineMappings = []; + this.raw = typeof data === "string" ? JSON.parse(data) : data; + this.mapFile = mapFile; + this.version = this.raw.version; + this.file = this.raw.file; + this.sourceRoot = this.raw.sourceRoot; + this.sources = this.raw.sources; + this.sourcesContent = this.raw.sourcesContent; + this.names = this.raw.names; + // populate mappings + var mappings = []; + var emittedLine = 0; + var emittedColumn = 0; + var sourceIndex = 0; + var sourceLine = 0; + var sourceColumn = 0; + var nameIndex = 0; + var match; + while (match = SourceMap._mappingRegExp.exec(this.raw.mappings)) { + if (match[1]) { + var segment = SourceMap._decodeVLQ(match[1]); + if (segment.length !== 1 && segment.length !== 4 && segment.length !== 5) { + throw new Error("Invalid VLQ"); + } + emittedColumn += segment[0]; + if (segment.length >= 4) { + sourceIndex += segment[1]; + sourceLine += segment[2]; + sourceColumn += segment[3]; + } + var mapping = { mappingIndex: mappings.length, emittedLine: emittedLine, emittedColumn: emittedColumn, sourceIndex: sourceIndex, sourceLine: sourceLine, sourceColumn: sourceColumn }; + if (segment.length === 5) { + nameIndex += segment[4]; + mapping.nameIndex = nameIndex; + } + mappings.push(mapping); + var mappingsForEmittedLine = this._emittedLineMappings[mapping.emittedLine] || (this._emittedLineMappings[mapping.emittedLine] = []); + mappingsForEmittedLine.push(mapping); + var mappingsForSource = this._sourceLineMappings[mapping.sourceIndex] || (this._sourceLineMappings[mapping.sourceIndex] = []); + var mappingsForSourceLine = mappingsForSource[mapping.sourceLine] || (mappingsForSource[mapping.sourceLine] = []); + mappingsForSourceLine.push(mapping); + } + else if (match[2]) { + emittedLine++; + emittedColumn = 0; + } + else { + throw new Error("Unrecognized character '" + match[0] + "'."); + } + } + this.mappings = mappings; + } + SourceMap.getUrl = function (text) { + var match; + var lastMatch; + while (match = SourceMap._sourceMappingURLRegExp.exec(text)) { + lastMatch = match; + } + return lastMatch ? lastMatch[1] : undefined; + }; + SourceMap.fromUrl = function (url) { + var match = SourceMap._dataURLRegExp.exec(url); + return match ? new SourceMap(/*mapFile*/ undefined, new Buffer(match[1], "base64").toString("utf8")) : undefined; + }; + SourceMap.fromSource = function (text) { + var url = this.getUrl(text); + return url === undefined ? undefined : this.fromUrl(url); + }; + SourceMap.prototype.getMappingsForEmittedLine = function (emittedLine) { + return this._emittedLineMappings[emittedLine]; + }; + SourceMap.prototype.getMappingsForSourceLine = function (sourceIndex, sourceLine) { + var mappingsForSource = this._sourceLineMappings[sourceIndex]; + return mappingsForSource && mappingsForSource[sourceLine]; + }; + SourceMap._decodeVLQ = function (text) { + var vlq = []; + var shift = 0; + var value = 0; + for (var i = 0; i < text.length; i++) { + var currentByte = SourceMap._base64Chars.indexOf(text.charAt(i)); + value += (currentByte & 31) << shift; + if ((currentByte & 32) === 0) { + vlq.push(value & 1 ? -(value >>> 1) : value >>> 1); + shift = 0; + value = 0; + } + else { + shift += 5; + } + } + return vlq; + }; + SourceMap._mappingRegExp = /([A-Za-z0-9+/]+),?|(;)|./g; + SourceMap._sourceMappingURLRegExp = /^\/\/[#@]\s*sourceMappingURL\s*=\s*(.*?)\s*$/mig; + SourceMap._dataURLRegExp = /^data:application\/json;base64,([a-z0-9+/=]+)$/i; + SourceMap._base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + return SourceMap; + }()); + documents.SourceMap = SourceMap; +})(documents || (documents = {})); +var vpath; +(function (vpath) { + vpath.sep = ts.directorySeparator; + vpath.normalizeSeparators = ts.normalizeSlashes; + vpath.isAbsolute = ts.isRootedDiskPath; + vpath.isRoot = ts.isDiskPathRoot; + vpath.hasTrailingSeparator = ts.hasTrailingDirectorySeparator; + vpath.addTrailingSeparator = ts.ensureTrailingDirectorySeparator; + vpath.removeTrailingSeparator = ts.removeTrailingDirectorySeparator; + vpath.normalize = ts.normalizePath; + vpath.combine = ts.combinePaths; + vpath.parse = ts.getPathComponents; + vpath.reduce = ts.reducePathComponents; + vpath.format = ts.getPathFromPathComponents; + vpath.resolve = ts.resolvePath; + vpath.compare = ts.comparePaths; + vpath.compareCaseSensitive = ts.comparePathsCaseSensitive; + vpath.compareCaseInsensitive = ts.comparePathsCaseInsensitive; + vpath.dirname = ts.getDirectoryPath; + vpath.basename = ts.getBaseFileName; + vpath.extname = ts.getAnyExtensionFromPath; + vpath.relative = ts.getRelativePathFromDirectory; + vpath.beneath = ts.containsPath; + vpath.changeExtension = ts.changeAnyExtension; + vpath.isTypeScript = ts.hasTypeScriptFileExtension; + vpath.isJavaScript = ts.hasJavaScriptFileExtension; + var invalidRootComponentRegExp = /^(?!(\/|\/\/\w+\/|[a-zA-Z]:\/?|)$)/; + var invalidNavigableComponentRegExp = /[:*?"<>|]/; + var invalidNavigableComponentWithWildcardsRegExp = /[:"<>|]/; + var invalidNonNavigableComponentRegExp = /^\.{1,2}$|[:*?"<>|]/; + var invalidNonNavigableComponentWithWildcardsRegExp = /^\.{1,2}$|[:"<>|]/; + var extRegExp = /\.\w+$/; + var ValidationFlags; + (function (ValidationFlags) { + ValidationFlags[ValidationFlags["None"] = 0] = "None"; + ValidationFlags[ValidationFlags["RequireRoot"] = 1] = "RequireRoot"; + ValidationFlags[ValidationFlags["RequireDirname"] = 2] = "RequireDirname"; + ValidationFlags[ValidationFlags["RequireBasename"] = 4] = "RequireBasename"; + ValidationFlags[ValidationFlags["RequireExtname"] = 8] = "RequireExtname"; + ValidationFlags[ValidationFlags["RequireTrailingSeparator"] = 16] = "RequireTrailingSeparator"; + ValidationFlags[ValidationFlags["AllowRoot"] = 32] = "AllowRoot"; + ValidationFlags[ValidationFlags["AllowDirname"] = 64] = "AllowDirname"; + ValidationFlags[ValidationFlags["AllowBasename"] = 128] = "AllowBasename"; + ValidationFlags[ValidationFlags["AllowExtname"] = 256] = "AllowExtname"; + ValidationFlags[ValidationFlags["AllowTrailingSeparator"] = 512] = "AllowTrailingSeparator"; + ValidationFlags[ValidationFlags["AllowNavigation"] = 1024] = "AllowNavigation"; + ValidationFlags[ValidationFlags["AllowWildcard"] = 2048] = "AllowWildcard"; + /** Path must be a valid directory root */ + ValidationFlags[ValidationFlags["Root"] = 545] = "Root"; + /** Path must be a absolute */ + ValidationFlags[ValidationFlags["Absolute"] = 2017] = "Absolute"; + /** Path may be relative or absolute */ + ValidationFlags[ValidationFlags["RelativeOrAbsolute"] = 2016] = "RelativeOrAbsolute"; + /** Path may only be a filename */ + ValidationFlags[ValidationFlags["Basename"] = 260] = "Basename"; + })(ValidationFlags = vpath.ValidationFlags || (vpath.ValidationFlags = {})); + function validateComponents(components, flags, hasTrailingSeparator) { + var hasRoot = !!components[0]; + var hasDirname = components.length > 2; + var hasBasename = components.length > 1; + var hasExtname = hasBasename && extRegExp.test(components[components.length - 1]); + var invalidComponentRegExp = flags & 1024 /* AllowNavigation */ + ? flags & 2048 /* AllowWildcard */ ? invalidNavigableComponentWithWildcardsRegExp : invalidNavigableComponentRegExp + : flags & 2048 /* AllowWildcard */ ? invalidNonNavigableComponentWithWildcardsRegExp : invalidNonNavigableComponentRegExp; + // Validate required components + if (flags & 1 /* RequireRoot */ && !hasRoot) + return false; + if (flags & 2 /* RequireDirname */ && !hasDirname) + return false; + if (flags & 4 /* RequireBasename */ && !hasBasename) + return false; + if (flags & 8 /* RequireExtname */ && !hasExtname) + return false; + if (flags & 16 /* RequireTrailingSeparator */ && !hasTrailingSeparator) + return false; + // Required components indicate allowed components + if (flags & 1 /* RequireRoot */) + flags |= 32 /* AllowRoot */; + if (flags & 2 /* RequireDirname */) + flags |= 64 /* AllowDirname */; + if (flags & 4 /* RequireBasename */) + flags |= 128 /* AllowBasename */; + if (flags & 8 /* RequireExtname */) + flags |= 256 /* AllowExtname */; + if (flags & 16 /* RequireTrailingSeparator */) + flags |= 512 /* AllowTrailingSeparator */; + // Validate disallowed components + if (~flags & 32 /* AllowRoot */ && hasRoot) + return false; + if (~flags & 64 /* AllowDirname */ && hasDirname) + return false; + if (~flags & 128 /* AllowBasename */ && hasBasename) + return false; + if (~flags & 256 /* AllowExtname */ && hasExtname) + return false; + if (~flags & 512 /* AllowTrailingSeparator */ && hasTrailingSeparator) + return false; + // Validate component strings + if (invalidRootComponentRegExp.test(components[0])) + return false; + for (var i = 1; i < components.length; i++) { + if (invalidComponentRegExp.test(components[i])) + return false; + } + return true; + } + function validate(path, flags) { + if (flags === void 0) { flags = 2016 /* RelativeOrAbsolute */; } + var components = vpath.parse(path); + var trailing = vpath.hasTrailingSeparator(path); + if (!validateComponents(components, flags, trailing)) + throw vfs.createIOError("ENOENT"); + return components.length > 1 && trailing ? vpath.format(vpath.reduce(components)) + vpath.sep : vpath.format(vpath.reduce(components)); + } + vpath.validate = validate; + function isDeclaration(path) { + return vpath.extname(path, ".d.ts", /*ignoreCase*/ false).length > 0; + } + vpath.isDeclaration = isDeclaration; + function isSourceMap(path) { + return vpath.extname(path, ".map", /*ignoreCase*/ false).length > 0; + } + vpath.isSourceMap = isSourceMap; + var javaScriptSourceMapExtensions = [".js.map", ".jsx.map"]; + function isJavaScriptSourceMap(path) { + return vpath.extname(path, javaScriptSourceMapExtensions, /*ignoreCase*/ false).length > 0; + } + vpath.isJavaScriptSourceMap = isJavaScriptSourceMap; + function isJson(path) { + return vpath.extname(path, ".json", /*ignoreCase*/ false).length > 0; + } + vpath.isJson = isJson; + function isDefaultLibrary(path) { + return isDeclaration(path) + && vpath.basename(path).startsWith("lib."); + } + vpath.isDefaultLibrary = isDefaultLibrary; + function isTsConfigFile(path) { + return path.indexOf("tsconfig") !== -1 && path.indexOf("json") !== -1; + } + vpath.isTsConfigFile = isTsConfigFile; +})(vpath || (vpath = {})); +// tslint:disable:no-null-keyword +var vfs; +(function (vfs) { + /** + * Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.) + */ + vfs.builtFolder = "/.ts"; + /** + * Posix-style path to additional mountable folders (./tests/projects in this repo) + */ + vfs.projectsFolder = "/.projects"; + /** + * Posix-style path to additional test libraries + */ + vfs.testLibFolder = "/.lib"; + /** + * Posix-style path to sources under test + */ + vfs.srcFolder = "/.src"; + // file type + var S_IFMT = 61440; // file type + var S_IFSOCK = 49152; // socket + var S_IFLNK = 40960; // symbolic link + var S_IFREG = 32768; // regular file + var S_IFBLK = 24576; // block device + var S_IFDIR = 16384; // directory + var S_IFCHR = 8192; // character device + var S_IFIFO = 4096; // FIFO + var devCount = 0; // A monotonically increasing count of device ids + var inoCount = 0; // A monotonically increasing count of inodes + /** + * Represents a virtual POSIX-like file system. + */ + var FileSystem = /** @class */ (function () { + function FileSystem(ignoreCase, options) { + if (options === void 0) { options = {}; } + // lazy-initialized state that should be mutable even if the FileSystem is frozen. + this._lazy = {}; + var _a = options.time, time = _a === void 0 ? -1 : _a, files = options.files, meta = options.meta; + this.ignoreCase = ignoreCase; + this.stringComparer = this.ignoreCase ? vpath.compareCaseInsensitive : vpath.compareCaseSensitive; + this._time = time; + if (meta) { + for (var _i = 0, _b = Object.keys(meta); _i < _b.length; _i++) { + var key = _b[_i]; + this.meta.set(key, meta[key]); + } + } + if (files) { + this._applyFiles(files, /*dirname*/ ""); + } + var cwd = options.cwd; + if ((!cwd || !vpath.isRoot(cwd)) && this._lazy.links) { + var iterator = collections.getIterator(this._lazy.links.keys()); + try { + for (var i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + var name = i.value; + cwd = cwd ? vpath.resolve(name, cwd) : name; + break; + } + } + finally { + collections.closeIterator(iterator); + } + } + if (cwd) { + vpath.validate(cwd, 2017 /* Absolute */); + this.mkdirpSync(cwd); + } + this._cwd = cwd || ""; + } + Object.defineProperty(FileSystem.prototype, "meta", { + /** + * Gets metadata for this `FileSystem`. + */ + get: function () { + if (!this._lazy.meta) { + this._lazy.meta = new collections.Metadata(this._shadowRoot ? this._shadowRoot.meta : undefined); + } + return this._lazy.meta; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FileSystem.prototype, "isReadonly", { + /** + * Gets a value indicating whether the file system is read-only. + */ + get: function () { + return Object.isFrozen(this); + }, + enumerable: true, + configurable: true + }); + /** + * Makes the file system read-only. + */ + FileSystem.prototype.makeReadonly = function () { + Object.freeze(this); + return this; + }; + Object.defineProperty(FileSystem.prototype, "shadowRoot", { + /** + * Gets the file system shadowed by this file system. + */ + get: function () { + return this._shadowRoot; + }, + enumerable: true, + configurable: true + }); + /** + * Gets a shadow copy of this file system. Changes to the shadow copy do not affect the + * original, allowing multiple copies of the same core file system without multiple copies + * of the same data. + */ + FileSystem.prototype.shadow = function (ignoreCase) { + if (ignoreCase === void 0) { ignoreCase = this.ignoreCase; } + if (!this.isReadonly) + throw new Error("Cannot shadow a mutable file system."); + if (ignoreCase && !this.ignoreCase) + throw new Error("Cannot create a case-insensitive file system from a case-sensitive one."); + var fs = new FileSystem(ignoreCase, { time: this._time }); + fs._shadowRoot = this; + fs._cwd = this._cwd; + return fs; + }; + /** + * Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html + */ + FileSystem.prototype.time = function (value) { + if (value !== undefined && this.isReadonly) + throw createIOError("EPERM"); + var result = this._time; + if (typeof result === "function") + result = result(); + if (typeof result === "object") + result = result.getTime(); + if (result === -1) + result = Date.now(); + if (value !== undefined) { + this._time = value; + } + return result; + }; + /** + * Gets the metadata object for a path. + * @param path + */ + FileSystem.prototype.filemeta = function (path) { + var node = this._walk(this._resolve(path)).node; + if (!node) + throw createIOError("ENOENT"); + return this._filemeta(node); + }; + FileSystem.prototype._filemeta = function (node) { + if (!node.meta) { + var parentMeta = node.shadowRoot && this._shadowRoot && this._shadowRoot._filemeta(node.shadowRoot); + node.meta = new collections.Metadata(parentMeta); + } + return node.meta; + }; + /** + * Get the pathname of the current working directory. + * + * @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html + */ + FileSystem.prototype.cwd = function () { + if (!this._cwd) + throw new Error("The current working directory has not been set."); + var node = this._walk(this._cwd).node; + if (!node) + throw createIOError("ENOENT"); + if (!isDirectory(node)) + throw createIOError("ENOTDIR"); + return this._cwd; + }; + /** + * Changes the current working directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html + */ + FileSystem.prototype.chdir = function (path) { + if (this.isReadonly) + throw createIOError("EPERM"); + path = this._resolve(path); + var node = this._walk(path).node; + if (!node) + throw createIOError("ENOENT"); + if (!isDirectory(node)) + throw createIOError("ENOTDIR"); + this._cwd = path; + }; + /** + * Pushes the current directory onto the directory stack and changes the current working directory to the supplied path. + */ + FileSystem.prototype.pushd = function (path) { + if (this.isReadonly) + throw createIOError("EPERM"); + if (path) + path = this._resolve(path); + if (this._cwd) { + if (!this._dirStack) + this._dirStack = []; + this._dirStack.push(this._cwd); + } + if (path && path !== this._cwd) { + this.chdir(path); + } + }; + /** + * Pops the previous directory from the location stack and changes the current directory to that directory. + */ + FileSystem.prototype.popd = function () { + if (this.isReadonly) + throw createIOError("EPERM"); + var path = this._dirStack && this._dirStack.pop(); + if (path) { + this.chdir(path); + } + }; + /** + * Update the file system with a set of files. + */ + FileSystem.prototype.apply = function (files) { + this._applyFiles(files, this._cwd); + }; + /** + * Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + FileSystem.prototype.scanSync = function (path, axis, traversal) { + path = this._resolve(path); + var results = []; + this._scan(path, this._stat(this._walk(path)), axis, traversal, /*noFollow*/ false, results); + return results; + }; + /** + * Scan file system entries along a path. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + FileSystem.prototype.lscanSync = function (path, axis, traversal) { + path = this._resolve(path); + var results = []; + this._scan(path, this._stat(this._walk(path, /*noFollow*/ true)), axis, traversal, /*noFollow*/ true, results); + return results; + }; + FileSystem.prototype._scan = function (path, stats, axis, traversal, noFollow, results) { + if (axis === "ancestors-or-self" || axis === "self" || axis === "descendants-or-self") { + if (!traversal.accept || traversal.accept(path, stats)) { + results.push(path); + } + } + if (axis === "ancestors-or-self" || axis === "ancestors") { + var dirname = vpath.dirname(path); + if (dirname !== path) { + try { + var stats_1 = this._stat(this._walk(dirname, noFollow)); + if (!traversal.traverse || traversal.traverse(dirname, stats_1)) { + this._scan(dirname, stats_1, "ancestors-or-self", traversal, noFollow, results); + } + } + catch ( /*ignored*/_a) { /*ignored*/ } + } + } + if (axis === "descendants-or-self" || axis === "descendants") { + if (stats.isDirectory() && (!traversal.traverse || traversal.traverse(path, stats))) { + for (var _i = 0, _b = this.readdirSync(path); _i < _b.length; _i++) { + var file = _b[_i]; + try { + var childpath = vpath.combine(path, file); + var stats_2 = this._stat(this._walk(childpath, noFollow)); + this._scan(childpath, stats_2, "descendants-or-self", traversal, noFollow, results); + } + catch ( /*ignored*/_c) { /*ignored*/ } + } + } + } + }; + /** + * Mounts a physical or virtual file system at a location in this virtual file system. + * + * @param source The path in the physical (or other virtual) file system. + * @param target The path in this virtual file system. + * @param resolver An object used to resolve files in `source`. + */ + FileSystem.prototype.mountSync = function (source, target, resolver) { + if (this.isReadonly) + throw createIOError("EROFS"); + source = vpath.validate(source, 2017 /* Absolute */); + var _a = this._walk(this._resolve(target), /*noFollow*/ true), parent = _a.parent, links = _a.links, existingNode = _a.node, basename = _a.basename; + if (existingNode) + throw createIOError("EEXIST"); + var time = this.time(); + var node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 511, time); + node.source = source; + node.resolver = resolver; + this._addLink(parent, links, basename, node, time); + }; + /** + * Recursively remove all files and directories underneath the provided path. + */ + FileSystem.prototype.rimrafSync = function (path) { + try { + var stats = this.lstatSync(path); + if (stats.isFile() || stats.isSymbolicLink()) { + this.unlinkSync(path); + } + else if (stats.isDirectory()) { + for (var _i = 0, _a = this.readdirSync(path); _i < _a.length; _i++) { + var file = _a[_i]; + this.rimrafSync(vpath.combine(path, file)); + } + this.rmdirSync(path); + } + } + catch (e) { + if (e.code === "ENOENT") + return; + throw e; + } + }; + /** + * Make a directory and all of its parent paths (if they don't exist). + */ + FileSystem.prototype.mkdirpSync = function (path) { + var _this = this; + path = this._resolve(path); + var result = this._walk(path, /*noFollow*/ true, function (error, result) { + if (error.code === "ENOENT") { + _this._mkdir(result); + return "retry"; + } + return "throw"; + }); + if (!result.node) + this._mkdir(result); + }; + FileSystem.prototype.getFileListing = function () { + var _this = this; + var result = ""; + var printLinks = function (dirname, links) { + var iterator = collections.getIterator(links); + try { + for (var i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + var _a = i.value, name = _a[0], node = _a[1]; + var path = dirname ? vpath.combine(dirname, name) : name; + var marker = vpath.compare(_this._cwd, path, _this.ignoreCase) === 0 ? "*" : " "; + if (result) + result += "\n"; + result += marker; + if (isDirectory(node)) { + result += vpath.addTrailingSeparator(path); + printLinks(path, _this._getLinks(node)); + } + else if (isFile(node)) { + result += path; + } + else if (isSymlink(node)) { + result += path + " -> " + node.symlink; + } + } + } + finally { + collections.closeIterator(iterator); + } + }; + printLinks(/*dirname*/ undefined, this._getRootLinks()); + return result; + }; + /** + * Print diagnostic information about the structure of the file system to the console. + */ + FileSystem.prototype.debugPrint = function () { + console.log(this.getFileListing()); + }; + // POSIX API (aligns with NodeJS "fs" module API) + /** + * Determines whether a path exists. + */ + FileSystem.prototype.existsSync = function (path) { + var result = this._walk(this._resolve(path), /*noFollow*/ true, function () { return "stop"; }); + return result !== undefined && result.node !== undefined; + }; + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.statSync = function (path) { + return this._stat(this._walk(this._resolve(path))); + }; + /** + * Change file access times + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.utimesSync = function (path, atime, mtime) { + if (this.isReadonly) + throw createIOError("EROFS"); + if (!isFinite(+atime) || !isFinite(+mtime)) + throw createIOError("EINVAL"); + var entry = this._walk(this._resolve(path)); + if (!entry || !entry.node) { + throw createIOError("ENOENT"); + } + entry.node.atimeMs = +atime; + entry.node.mtimeMs = +mtime; + entry.node.ctimeMs = this.time(); + }; + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.lstatSync = function (path) { + return this._stat(this._walk(this._resolve(path), /*noFollow*/ true)); + }; + FileSystem.prototype._stat = function (entry) { + var node = entry.node; + if (!node) + throw createIOError("ENOENT", entry.realpath); + return new Stats(node.dev, node.ino, node.mode, node.nlink, + /*rdev*/ 0, + /*size*/ isFile(node) ? this._getSize(node) : isSymlink(node) ? node.symlink.length : 0, + /*blksize*/ 4096, + /*blocks*/ 0, node.atimeMs, node.mtimeMs, node.ctimeMs, node.birthtimeMs); + }; + /** + * Read a directory. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.readdirSync = function (path) { + var node = this._walk(this._resolve(path)).node; + if (!node) + throw createIOError("ENOENT"); + if (!isDirectory(node)) + throw createIOError("ENOTDIR"); + return Array.from(this._getLinks(node).keys()); + }; + /** + * Make a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.mkdirSync = function (path) { + if (this.isReadonly) + throw createIOError("EROFS"); + this._mkdir(this._walk(this._resolve(path), /*noFollow*/ true)); + }; + FileSystem.prototype._mkdir = function (_a) { + var parent = _a.parent, links = _a.links, existingNode = _a.node, basename = _a.basename; + if (existingNode) + throw createIOError("EEXIST"); + var time = this.time(); + var node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 511, time); + this._addLink(parent, links, basename, node, time); + }; + /** + * Remove a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.rmdirSync = function (path) { + if (this.isReadonly) + throw createIOError("EROFS"); + path = this._resolve(path); + var _a = this._walk(path, /*noFollow*/ true), parent = _a.parent, links = _a.links, node = _a.node, basename = _a.basename; + if (!parent) + throw createIOError("EPERM"); + if (!isDirectory(node)) + throw createIOError("ENOTDIR"); + if (this._getLinks(node).size !== 0) + throw createIOError("ENOTEMPTY"); + this._removeLink(parent, links, basename, node); + }; + /** + * Link one file to another file (also known as a "hard link"). + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.linkSync = function (oldpath, newpath) { + if (this.isReadonly) + throw createIOError("EROFS"); + var node = this._walk(this._resolve(oldpath)).node; + if (!node) + throw createIOError("ENOENT"); + if (isDirectory(node)) + throw createIOError("EPERM"); + var _a = this._walk(this._resolve(newpath), /*noFollow*/ true), parent = _a.parent, links = _a.links, basename = _a.basename, existingNode = _a.node; + if (!parent) + throw createIOError("EPERM"); + if (existingNode) + throw createIOError("EEXIST"); + this._addLink(parent, links, basename, node); + }; + /** + * Remove a directory entry. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.unlinkSync = function (path) { + if (this.isReadonly) + throw createIOError("EROFS"); + var _a = this._walk(this._resolve(path), /*noFollow*/ true), parent = _a.parent, links = _a.links, node = _a.node, basename = _a.basename; + if (!parent) + throw createIOError("EPERM"); + if (!node) + throw createIOError("ENOENT"); + if (isDirectory(node)) + throw createIOError("EISDIR"); + this._removeLink(parent, links, basename, node); + }; + /** + * Rename a file. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.renameSync = function (oldpath, newpath) { + if (this.isReadonly) + throw createIOError("EROFS"); + var _a = this._walk(this._resolve(oldpath), /*noFollow*/ true), oldParent = _a.parent, oldParentLinks = _a.links, node = _a.node, oldBasename = _a.basename; + if (!oldParent) + throw createIOError("EPERM"); + if (!node) + throw createIOError("ENOENT"); + var _b = this._walk(this._resolve(newpath), /*noFollow*/ true), newParent = _b.parent, newParentLinks = _b.links, existingNode = _b.node, newBasename = _b.basename; + if (!newParent) + throw createIOError("EPERM"); + var time = this.time(); + if (existingNode) { + if (isDirectory(node)) { + if (!isDirectory(existingNode)) + throw createIOError("ENOTDIR"); + if (this._getLinks(existingNode).size > 0) + throw createIOError("ENOTEMPTY"); + } + else { + if (isDirectory(existingNode)) + throw createIOError("EISDIR"); + } + this._removeLink(newParent, newParentLinks, newBasename, existingNode, time); + } + this._replaceLink(oldParent, oldParentLinks, oldBasename, newParent, newParentLinks, newBasename, node, time); + }; + /** + * Make a symbolic link. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.symlinkSync = function (target, linkpath) { + if (this.isReadonly) + throw createIOError("EROFS"); + var _a = this._walk(this._resolve(linkpath), /*noFollow*/ true), parent = _a.parent, links = _a.links, existingNode = _a.node, basename = _a.basename; + if (!parent) + throw createIOError("EPERM"); + if (existingNode) + throw createIOError("EEXIST"); + var time = this.time(); + var node = this._mknod(parent.dev, S_IFLNK, /*mode*/ 438, time); + node.symlink = vpath.validate(target, 2016 /* RelativeOrAbsolute */); + this._addLink(parent, links, basename, node, time); + }; + /** + * Resolve a pathname. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.realpathSync = function (path) { + var realpath = this._walk(this._resolve(path)).realpath; + return realpath; + }; + FileSystem.prototype.readFileSync = function (path, encoding) { + if (encoding === void 0) { encoding = null; } + var node = this._walk(this._resolve(path)).node; + if (!node) + throw createIOError("ENOENT"); + if (isDirectory(node)) + throw createIOError("EISDIR"); + if (!isFile(node)) + throw createIOError("EBADF"); + var buffer = this._getBuffer(node).slice(); + return encoding ? buffer.toString(encoding) : buffer; + }; + /** + * Write to a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + FileSystem.prototype.writeFileSync = function (path, data, encoding) { + if (encoding === void 0) { encoding = null; } + if (this.isReadonly) + throw createIOError("EROFS"); + var _a = this._walk(this._resolve(path), /*noFollow*/ false), parent = _a.parent, links = _a.links, existingNode = _a.node, basename = _a.basename; + if (!parent) + throw createIOError("EPERM"); + var time = this.time(); + var node = existingNode; + if (!node) { + node = this._mknod(parent.dev, S_IFREG, 438, time); + this._addLink(parent, links, basename, node, time); + } + if (isDirectory(node)) + throw createIOError("EISDIR"); + if (!isFile(node)) + throw createIOError("EBADF"); + node.buffer = Buffer.isBuffer(data) ? data.slice() : Buffer.from("" + data, encoding || "utf8"); + node.size = node.buffer.byteLength; + node.mtimeMs = time; + node.ctimeMs = time; + }; + FileSystem.prototype._mknod = function (dev, type, mode, time) { + if (time === void 0) { time = this.time(); } + return { + dev: dev, + ino: ++inoCount, + mode: (mode & ~S_IFMT & ~18 & 4095) | (type & S_IFMT), + atimeMs: time, + mtimeMs: time, + ctimeMs: time, + birthtimeMs: time, + nlink: 0 + }; + }; + FileSystem.prototype._addLink = function (parent, links, name, node, time) { + if (time === void 0) { time = this.time(); } + links.set(name, node); + node.nlink++; + node.ctimeMs = time; + if (parent) + parent.mtimeMs = time; + if (!parent && !this._cwd) + this._cwd = name; + }; + FileSystem.prototype._removeLink = function (parent, links, name, node, time) { + if (time === void 0) { time = this.time(); } + links.delete(name); + node.nlink--; + node.ctimeMs = time; + if (parent) + parent.mtimeMs = time; + }; + FileSystem.prototype._replaceLink = function (oldParent, oldLinks, oldName, newParent, newLinks, newName, node, time) { + if (oldParent !== newParent) { + this._removeLink(oldParent, oldLinks, oldName, node, time); + this._addLink(newParent, newLinks, newName, node, time); + } + else { + oldLinks.delete(oldName); + oldLinks.set(newName, node); + oldParent.mtimeMs = time; + newParent.mtimeMs = time; + } + }; + FileSystem.prototype._getRootLinks = function () { + if (!this._lazy.links) { + this._lazy.links = new collections.SortedMap(this.stringComparer); + if (this._shadowRoot) { + this._copyShadowLinks(this._shadowRoot._getRootLinks(), this._lazy.links); + } + this._lazy.links = this._lazy.links; + } + return this._lazy.links; + }; + FileSystem.prototype._getLinks = function (node) { + if (!node.links) { + var links = new collections.SortedMap(this.stringComparer); + var source = node.source, resolver = node.resolver; + if (source && resolver) { + node.source = undefined; + node.resolver = undefined; + for (var _i = 0, _a = resolver.readdirSync(source); _i < _a.length; _i++) { + var name = _a[_i]; + var path = vpath.combine(source, name); + var stats = resolver.statSync(path); + switch (stats.mode & S_IFMT) { + case S_IFDIR: + var dir = this._mknod(node.dev, S_IFDIR, 511); + dir.source = vpath.combine(source, name); + dir.resolver = resolver; + this._addLink(node, links, name, dir); + break; + case S_IFREG: + var file = this._mknod(node.dev, S_IFREG, 438); + file.source = vpath.combine(source, name); + file.resolver = resolver; + file.size = stats.size; + this._addLink(node, links, name, file); + break; + } + } + } + else if (this._shadowRoot && node.shadowRoot) { + this._copyShadowLinks(this._shadowRoot._getLinks(node.shadowRoot), links); + } + node.links = links; + } + return node.links; + }; + FileSystem.prototype._getShadow = function (root) { + var shadows = this._lazy.shadows || (this._lazy.shadows = new Map()); + var shadow = shadows.get(root.ino); + if (!shadow) { + shadow = { + dev: root.dev, + ino: root.ino, + mode: root.mode, + atimeMs: root.atimeMs, + mtimeMs: root.mtimeMs, + ctimeMs: root.ctimeMs, + birthtimeMs: root.birthtimeMs, + nlink: root.nlink, + shadowRoot: root + }; + if (isSymlink(root)) + shadow.symlink = root.symlink; + shadows.set(shadow.ino, shadow); + } + return shadow; + }; + FileSystem.prototype._copyShadowLinks = function (source, target) { + var iterator = collections.getIterator(source); + try { + for (var i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + var _a = i.value, name = _a[0], root = _a[1]; + target.set(name, this._getShadow(root)); + } + } + finally { + collections.closeIterator(iterator); + } + }; + FileSystem.prototype._getSize = function (node) { + if (node.buffer) + return node.buffer.byteLength; + if (node.size !== undefined) + return node.size; + if (node.source && node.resolver) + return node.size = node.resolver.statSync(node.source).size; + if (this._shadowRoot && node.shadowRoot) + return node.size = this._shadowRoot._getSize(node.shadowRoot); + return 0; + }; + FileSystem.prototype._getBuffer = function (node) { + if (!node.buffer) { + var source = node.source, resolver = node.resolver; + if (source && resolver) { + node.source = undefined; + node.resolver = undefined; + node.size = undefined; + node.buffer = resolver.readFileSync(source); + } + else if (this._shadowRoot && node.shadowRoot) { + node.buffer = this._shadowRoot._getBuffer(node.shadowRoot); + } + else { + node.buffer = Buffer.allocUnsafe(0); + } + } + return node.buffer; + }; + FileSystem.prototype._walk = function (path, noFollow, onError) { + var links = this._getRootLinks(); + var parent; + var components = vpath.parse(path); + var step = 0; + var depth = 0; + var retry = false; + while (true) { + if (depth >= 40) + throw createIOError("ELOOP"); + var lastStep = step === components.length - 1; + var basename = components[step]; + var node = links.get(basename); + if (lastStep && (noFollow || !isSymlink(node))) { + return { realpath: vpath.format(components), basename: basename, parent: parent, links: links, node: node }; + } + if (node === undefined) { + if (trapError(createIOError("ENOENT"), node)) + continue; + return undefined; + } + if (isSymlink(node)) { + var dirname = vpath.format(components.slice(0, step)); + var symlink = vpath.resolve(dirname, node.symlink); + links = this._getRootLinks(); + parent = undefined; + components = vpath.parse(symlink).concat(components.slice(step + 1)); + step = 0; + depth++; + retry = false; + continue; + } + if (isDirectory(node)) { + links = this._getLinks(node); + parent = node; + step++; + retry = false; + continue; + } + if (trapError(createIOError("ENOTDIR"), node)) + continue; + return undefined; + } + function trapError(error, node) { + var realpath = vpath.format(components.slice(0, step + 1)); + var basename = components[step]; + var result = !retry && onError ? onError(error, { realpath: realpath, basename: basename, parent: parent, links: links, node: node }) : "throw"; + if (result === "stop") + return false; + if (result === "retry") { + retry = true; + return true; + } + throw error; + } + }; + /** + * Resolve a path relative to the current working directory. + */ + FileSystem.prototype._resolve = function (path) { + return this._cwd + ? vpath.resolve(this._cwd, vpath.validate(path, 2016 /* RelativeOrAbsolute */ | 2048 /* AllowWildcard */)) + : vpath.validate(path, 2017 /* Absolute */ | 2048 /* AllowWildcard */); + }; + FileSystem.prototype._applyFiles = function (files, dirname) { + var deferred = []; + this._applyFilesWorker(files, dirname, deferred); + for (var _i = 0, deferred_1 = deferred; _i < deferred_1.length; _i++) { + var _a = deferred_1[_i], entry = _a[0], path = _a[1]; + this.mkdirpSync(vpath.dirname(path)); + this.pushd(vpath.dirname(path)); + if (entry instanceof Symlink) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be symbolic links."); + } + this.symlinkSync(entry.symlink, path); + this._applyFileExtendedOptions(path, entry); + } + else if (entry instanceof Link) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be hard links."); + } + this.linkSync(entry.path, path); + } + else { + this.mountSync(entry.source, path, entry.resolver); + this._applyFileExtendedOptions(path, entry); + } + this.popd(); + } + }; + FileSystem.prototype._applyFileExtendedOptions = function (path, entry) { + var meta = entry.meta; + if (meta !== undefined) { + var filemeta = this.filemeta(path); + for (var _i = 0, _a = Object.keys(meta); _i < _a.length; _i++) { + var key = _a[_i]; + filemeta.set(key, meta[key]); + } + } + }; + FileSystem.prototype._applyFilesWorker = function (files, dirname, deferred) { + for (var _i = 0, _a = Object.keys(files); _i < _a.length; _i++) { + var key = _a[_i]; + var value = this._normalizeFileSetEntry(files[key]); + var path = dirname ? vpath.resolve(dirname, key) : key; + vpath.validate(path, 2017 /* Absolute */); + if (value === null || value === undefined) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be deleted."); + } + this.rimrafSync(path); + } + else if (value instanceof File) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be files."); + } + this.mkdirpSync(vpath.dirname(path)); + this.writeFileSync(path, value.data, value.encoding); + this._applyFileExtendedOptions(path, value); + } + else if (value instanceof Directory) { + this.mkdirpSync(path); + this._applyFileExtendedOptions(path, value); + this._applyFilesWorker(value.files, path, deferred); + } + else { + deferred.push([value, path]); + } + } + }; + FileSystem.prototype._normalizeFileSetEntry = function (value) { + if (value === undefined || + value === null || + value instanceof Directory || + value instanceof File || + value instanceof Link || + value instanceof Symlink || + value instanceof Mount) { + return value; + } + return typeof value === "string" || Buffer.isBuffer(value) ? new File(value) : new Directory(value); + }; + return FileSystem; + }()); + vfs.FileSystem = FileSystem; + function createResolver(host) { + return { + readdirSync: function (path) { + var _a = host.getAccessibleFileSystemEntries(path), files = _a.files, directories = _a.directories; + return directories.concat(files); + }, + statSync: function (path) { + if (host.directoryExists(path)) { + return { mode: S_IFDIR | 511, size: 0 }; + } + else if (host.fileExists(path)) { + return { mode: S_IFREG | 438, size: host.getFileSize(path) }; + } + else { + throw new Error("ENOENT: path does not exist"); + } + }, + readFileSync: function (path) { + return Buffer.from(host.readFile(path), "utf8"); // TODO: GH#18217 + } + }; + } + vfs.createResolver = createResolver; + /** + * Create a virtual file system from a physical file system using the following path mappings: + * + * - `/.ts` is a directory mapped to `${workspaceRoot}/built/local` + * - `/.lib` is a directory mapped to `${workspaceRoot}/tests/lib` + * - `/.src` is a virtual directory to be used for tests. + * + * Unless overridden, `/.src` will be the current working directory for the virtual file system. + */ + function createFromFileSystem(host, ignoreCase, _a) { + var _b = _a === void 0 ? {} : _a, documents = _b.documents, cwd = _b.cwd; + var fs = getBuiltLocal(host, ignoreCase).shadow(); + if (cwd) { + fs.mkdirpSync(cwd); + fs.chdir(cwd); + } + if (documents) { + for (var _i = 0, documents_1 = documents; _i < documents_1.length; _i++) { + var document = documents_1[_i]; + fs.mkdirpSync(vpath.dirname(document.file)); + fs.writeFileSync(document.file, document.text, "utf8"); + fs.filemeta(document.file).set("document", document); + // Add symlinks + var symlink = document.meta.get("symlink"); + if (symlink) { + for (var _c = 0, _d = symlink.split(",").map(function (link) { return link.trim(); }); _c < _d.length; _c++) { + var link = _d[_c]; + fs.mkdirpSync(vpath.dirname(link)); + fs.symlinkSync(document.file, link); + fs.filemeta(link).set("document", document); + } + } + } + } + return fs; + } + vfs.createFromFileSystem = createFromFileSystem; + var Stats = /** @class */ (function () { + function Stats(dev, ino, mode, nlink, rdev, size, blksize, blocks, atimeMs, mtimeMs, ctimeMs, birthtimeMs) { + if (dev === void 0) { dev = 0; } + if (ino === void 0) { ino = 0; } + if (mode === void 0) { mode = 0; } + if (nlink === void 0) { nlink = 0; } + if (rdev === void 0) { rdev = 0; } + if (size === void 0) { size = 0; } + if (blksize === void 0) { blksize = 0; } + if (blocks === void 0) { blocks = 0; } + if (atimeMs === void 0) { atimeMs = 0; } + if (mtimeMs === void 0) { mtimeMs = 0; } + if (ctimeMs === void 0) { ctimeMs = 0; } + if (birthtimeMs === void 0) { birthtimeMs = 0; } + this.dev = dev; + this.ino = ino; + this.mode = mode; + this.nlink = nlink; + this.uid = 0; + this.gid = 0; + this.rdev = rdev; + this.size = size; + this.blksize = blksize; + this.blocks = blocks; + this.atimeMs = atimeMs; + this.mtimeMs = mtimeMs; + this.ctimeMs = ctimeMs; + this.birthtimeMs = birthtimeMs; + this.atime = new Date(this.atimeMs); + this.mtime = new Date(this.mtimeMs); + this.ctime = new Date(this.ctimeMs); + this.birthtime = new Date(this.birthtimeMs); + } + Stats.prototype.isFile = function () { return (this.mode & S_IFMT) === S_IFREG; }; + Stats.prototype.isDirectory = function () { return (this.mode & S_IFMT) === S_IFDIR; }; + Stats.prototype.isSymbolicLink = function () { return (this.mode & S_IFMT) === S_IFLNK; }; + Stats.prototype.isBlockDevice = function () { return (this.mode & S_IFMT) === S_IFBLK; }; + Stats.prototype.isCharacterDevice = function () { return (this.mode & S_IFMT) === S_IFCHR; }; + Stats.prototype.isFIFO = function () { return (this.mode & S_IFMT) === S_IFIFO; }; + Stats.prototype.isSocket = function () { return (this.mode & S_IFMT) === S_IFSOCK; }; + return Stats; + }()); + vfs.Stats = Stats; + // tslint:disable-next-line:variable-name + vfs.IOErrorMessages = Object.freeze({ + EACCES: "access denied", + EIO: "an I/O error occurred", + ENOENT: "no such file or directory", + EEXIST: "file already exists", + ELOOP: "too many symbolic links encountered", + ENOTDIR: "no such directory", + EISDIR: "path is a directory", + EBADF: "invalid file descriptor", + EINVAL: "invalid value", + ENOTEMPTY: "directory not empty", + EPERM: "operation not permitted", + EROFS: "file system is read-only" + }); + function createIOError(code, details) { + if (details === void 0) { details = ""; } + var err = new Error(code + ": " + vfs.IOErrorMessages[code] + " " + details); + err.code = code; + if (Error.captureStackTrace) + Error.captureStackTrace(err, createIOError); + return err; + } + vfs.createIOError = createIOError; + /** Extended options for a directory in a `FileSet` */ + var Directory = /** @class */ (function () { + function Directory(files, _a) { + var meta = (_a === void 0 ? {} : _a).meta; + this.files = files; + this.meta = meta; + } + return Directory; + }()); + vfs.Directory = Directory; + /** Extended options for a file in a `FileSet` */ + var File = /** @class */ (function () { + function File(data, _a) { + var _b = _a === void 0 ? {} : _a, meta = _b.meta, encoding = _b.encoding; + this.data = data; + this.encoding = encoding; + this.meta = meta; + } + return File; + }()); + vfs.File = File; + /** Extended options for a hard link in a `FileSet` */ + var Link = /** @class */ (function () { + function Link(path) { + this.path = path; + } + return Link; + }()); + vfs.Link = Link; + /** Extended options for a symbolic link in a `FileSet` */ + var Symlink = /** @class */ (function () { + function Symlink(symlink, _a) { + var meta = (_a === void 0 ? {} : _a).meta; + this.symlink = symlink; + this.meta = meta; + } + return Symlink; + }()); + vfs.Symlink = Symlink; + /** Extended options for mounting a virtual copy of an external file system via a `FileSet` */ + var Mount = /** @class */ (function () { + function Mount(source, resolver, _a) { + var meta = (_a === void 0 ? {} : _a).meta; + this.source = source; + this.resolver = resolver; + this.meta = meta; + } + return Mount; + }()); + vfs.Mount = Mount; + function isFile(node) { + return node !== undefined && (node.mode & S_IFMT) === S_IFREG; + } + function isDirectory(node) { + return node !== undefined && (node.mode & S_IFMT) === S_IFDIR; + } + function isSymlink(node) { + return node !== undefined && (node.mode & S_IFMT) === S_IFLNK; + } + var builtLocalHost; + var builtLocalCI; + var builtLocalCS; + function getBuiltLocal(host, ignoreCase) { + var _a; + if (builtLocalHost !== host) { + builtLocalCI = undefined; + builtLocalCS = undefined; + builtLocalHost = host; + } + if (!builtLocalCI) { + var resolver = createResolver(host); + builtLocalCI = new FileSystem(/*ignoreCase*/ true, { + files: (_a = {}, + _a[vfs.builtFolder] = new Mount(vpath.resolve(host.getWorkspaceRoot(), "built/local"), resolver), + _a[vfs.testLibFolder] = new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/lib"), resolver), + _a[vfs.projectsFolder] = new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/projects"), resolver), + _a[vfs.srcFolder] = {}, + _a), + cwd: vfs.srcFolder, + meta: { defaultLibLocation: vfs.builtFolder } + }); + builtLocalCI.makeReadonly(); + } + if (ignoreCase) + return builtLocalCI; + if (!builtLocalCS) { + builtLocalCS = builtLocalCI.shadow(/*ignoreCase*/ false); + builtLocalCS.makeReadonly(); + } + return builtLocalCS; + } +})(vfs || (vfs = {})); +// tslint:enable:no-null-keyword +/** + * Test harness compiler functionality. + */ +var compiler; +(function (compiler) { + function readProject(host, project, existingOptions) { + if (project) { + project = vpath.isTsConfigFile(project) ? project : vpath.combine(project, "tsconfig.json"); + } + else { + project = host.vfs.scanSync(".", "ancestors-or-self", { + accept: function (path, stats) { return stats.isFile() && host.vfs.stringComparer(vpath.basename(path), "tsconfig.json") === 0; } + })[0]; + } + if (project) { + // TODO(rbuckton): Do we need to resolve this? Resolving breaks projects tests. + // project = vpath.resolve(host.vfs.currentDirectory, project); + // read the config file + var readResult = ts.readConfigFile(project, function (path) { return host.readFile(path); }); + if (readResult.error) { + return { file: project, errors: [readResult.error] }; + } + // parse the config file + var config = ts.parseJsonConfigFileContent(readResult.config, host, vpath.dirname(project), existingOptions); + return { file: project, errors: config.errors, config: config }; + } + } + compiler.readProject = readProject; + var CompilationResult = /** @class */ (function () { + function CompilationResult(host, options, program, result, diagnostics) { + this._inputs = []; + this.host = host; + this.program = program; + this.result = result; + this.diagnostics = diagnostics; + this.options = program ? program.getCompilerOptions() : options; + // collect outputs + var js = this.js = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + var dts = this.dts = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + var maps = this.maps = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + for (var _i = 0, _a = this.host.outputs; _i < _a.length; _i++) { + var document = _a[_i]; + if (vpath.isJavaScript(document.file) || ts.fileExtensionIs(document.file, ".json" /* Json */)) { + js.set(document.file, document); + } + else if (vpath.isDeclaration(document.file)) { + dts.set(document.file, document); + } + else if (vpath.isSourceMap(document.file)) { + maps.set(document.file, document); + } + } + // correlate inputs and outputs + this._inputsAndOutputs = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + if (program) { + if (this.options.out || this.options.outFile) { + var outFile = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); + var inputs = []; + for (var _b = 0, _c = program.getSourceFiles(); _b < _c.length; _b++) { + var sourceFile = _c[_b]; + if (sourceFile) { + var input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); + this._inputs.push(input); + if (!vpath.isDeclaration(sourceFile.fileName)) { + inputs.push(input); + } + } + } + var outputs = { + inputs: inputs, + js: js.get(outFile), + dts: dts.get(vpath.changeExtension(outFile, ".d.ts")), + map: maps.get(outFile + ".map") + }; + if (outputs.js) + this._inputsAndOutputs.set(outputs.js.file, outputs); + if (outputs.dts) + this._inputsAndOutputs.set(outputs.dts.file, outputs); + if (outputs.map) + this._inputsAndOutputs.set(outputs.map.file, outputs); + for (var _d = 0, inputs_1 = inputs; _d < inputs_1.length; _d++) { + var input = inputs_1[_d]; + this._inputsAndOutputs.set(input.file, outputs); + } + } + else { + for (var _e = 0, _f = program.getSourceFiles(); _e < _f.length; _e++) { + var sourceFile = _f[_e]; + if (sourceFile) { + var input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); + this._inputs.push(input); + if (!vpath.isDeclaration(sourceFile.fileName)) { + var extname = ts.getOutputExtension(sourceFile, this.options); + var outputs = { + inputs: [input], + js: js.get(this.getOutputPath(sourceFile.fileName, extname)), + dts: dts.get(this.getOutputPath(sourceFile.fileName, ".d.ts")), + map: maps.get(this.getOutputPath(sourceFile.fileName, extname + ".map")) + }; + this._inputsAndOutputs.set(sourceFile.fileName, outputs); + if (outputs.js) + this._inputsAndOutputs.set(outputs.js.file, outputs); + if (outputs.dts) + this._inputsAndOutputs.set(outputs.dts.file, outputs); + if (outputs.map) + this._inputsAndOutputs.set(outputs.map.file, outputs); + } + } + } + } + } + this.diagnostics = diagnostics; + } + Object.defineProperty(CompilationResult.prototype, "vfs", { + get: function () { + return this.host.vfs; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "inputs", { + get: function () { + return this._inputs; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "outputs", { + get: function () { + return this.host.outputs; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "traces", { + get: function () { + return this.host.traces; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "emitSkipped", { + get: function () { + return this.result && this.result.emitSkipped || false; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "singleFile", { + get: function () { + return !!this.options.outFile || !!this.options.out; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilationResult.prototype, "commonSourceDirectory", { + get: function () { + var common = this.program && this.program.getCommonSourceDirectory() || ""; + return common && vpath.combine(this.vfs.cwd(), common); + }, + enumerable: true, + configurable: true + }); + CompilationResult.prototype.getInputsAndOutputs = function (path) { + return this._inputsAndOutputs.get(vpath.resolve(this.vfs.cwd(), path)); + }; + CompilationResult.prototype.getInputs = function (path) { + var outputs = this.getInputsAndOutputs(path); + return outputs && outputs.inputs; + }; + CompilationResult.prototype.getOutput = function (path, kind) { + var outputs = this.getInputsAndOutputs(path); + return outputs && outputs[kind]; + }; + CompilationResult.prototype.getSourceMapRecord = function () { + if (this.result.sourceMaps && this.result.sourceMaps.length > 0) { + return Harness.SourceMapRecorder.getSourceMapRecord(this.result.sourceMaps, this.program, Array.from(this.js.values()).filter(function (d) { return !ts.fileExtensionIs(d.file, ".json" /* Json */); }), Array.from(this.dts.values())); + } + }; + CompilationResult.prototype.getSourceMap = function (path) { + if (this.options.noEmit || vpath.isDeclaration(path)) + return undefined; + if (this.options.inlineSourceMap) { + var document = this.getOutput(path, "js"); + return document && documents.SourceMap.fromSource(document.text); + } + if (this.options.sourceMap) { + var document = this.getOutput(path, "map"); + return document && new documents.SourceMap(document.file, document.text); + } + }; + CompilationResult.prototype.getOutputPath = function (path, ext) { + if (this.options.outFile || this.options.out) { + path = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); + } + else { + path = vpath.resolve(this.vfs.cwd(), path); + var outDir = ext === ".d.ts" ? this.options.declarationDir || this.options.outDir : this.options.outDir; + if (outDir) { + var common = this.commonSourceDirectory; + if (common) { + path = vpath.relative(common, path, this.vfs.ignoreCase); + path = vpath.combine(vpath.resolve(this.vfs.cwd(), this.options.outDir), path); + } + } + } + return vpath.changeExtension(path, ext); + }; + CompilationResult.prototype.getNumberOfJsFiles = function () { + var count = this.js.size; + this.js.forEach(function (document) { + if (ts.fileExtensionIs(document.file, ".json" /* Json */)) { + count--; + } + }); + return count; + }; + return CompilationResult; + }()); + compiler.CompilationResult = CompilationResult; + function compileFiles(host, rootFiles, compilerOptions) { + if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { + var project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); + if (project) { + if (project.errors && project.errors.length > 0) { + return new CompilationResult(host, compilerOptions, /*program*/ undefined, /*result*/ undefined, project.errors); + } + if (project.config) { + rootFiles = project.config.fileNames; + compilerOptions = project.config.options; + } + } + delete compilerOptions.project; + } + // establish defaults (aligns with old harness) + if (compilerOptions.target === undefined) + compilerOptions.target = 0 /* ES3 */; + if (compilerOptions.newLine === undefined) + compilerOptions.newLine = 0 /* CarriageReturnLineFeed */; + if (compilerOptions.skipDefaultLibCheck === undefined) + compilerOptions.skipDefaultLibCheck = true; + if (compilerOptions.noErrorTruncation === undefined) + compilerOptions.noErrorTruncation = true; + var program = ts.createProgram(rootFiles || [], compilerOptions, host); + var emitResult = program.emit(); + var errors = ts.getPreEmitDiagnostics(program); + return new CompilationResult(host, compilerOptions, program, emitResult, errors); + } + compiler.compileFiles = compileFiles; +})(compiler || (compiler = {})); +var evaluator; +(function (evaluator) { + var sourceFile = vpath.combine(vfs.srcFolder, "source.ts"); + function compile(sourceText, options) { + var fs = vfs.createFromFileSystem(Harness.IO, /*ignoreCase*/ false); + fs.writeFileSync(sourceFile, sourceText); + var compilerOptions = __assign({ target: 1 /* ES5 */, module: ts.ModuleKind.CommonJS, lib: ["lib.esnext.d.ts", "lib.dom.d.ts"] }, options); + var host = new fakes.CompilerHost(fs, compilerOptions); + return compiler.compileFiles(host, [sourceFile], compilerOptions); + } + function noRequire(id) { + throw new Error("Module '" + id + "' could not be found."); + } + // Define a custom "Symbol" constructor to attach missing built-in symbols without + // modifying the global "Symbol" constructor + // tslint:disable-next-line:variable-name + var FakeSymbol = (function (description) { return Symbol(description); }); + FakeSymbol.prototype = Symbol.prototype; + for (var _i = 0, _a = Object.getOwnPropertyNames(Symbol); _i < _a.length; _i++) { + var key = _a[_i]; + Object.defineProperty(FakeSymbol, key, Object.getOwnPropertyDescriptor(Symbol, key)); + } + // Add "asyncIterator" if missing + if (!ts.hasProperty(FakeSymbol, "asyncIterator")) + Object.defineProperty(FakeSymbol, "asyncIterator", { value: Symbol.for("Symbol.asyncIterator"), configurable: true }); + function evaluate(result, globals) { + globals = __assign({ Symbol: FakeSymbol }, globals); + if (ts.some(result.diagnostics)) { + assert.ok(/*value*/ false, "Syntax error in evaluation source text:\n" + ts.formatDiagnostics(result.diagnostics, { + getCanonicalFileName: function (file) { return file; }, + getCurrentDirectory: function () { return ""; }, + getNewLine: function () { return "\n"; } + })); + } + var output = result.getOutput(sourceFile, "js"); + assert.isDefined(output); + var globalNames = []; + var globalArgs = []; + for (var name in globals) { + if (ts.hasProperty(globals, name)) { + globalNames.push(name); + globalArgs.push(globals[name]); + } + } + var evaluateText = "(function (module, exports, require, __dirname, __filename, " + globalNames.join(", ") + ") { " + output.text + " })"; + var evaluateThunk = eval(evaluateText); + var module = { exports: {} }; + evaluateThunk.call.apply(evaluateThunk, [globals, module, module.exports, noRequire, vpath.dirname(output.file), output.file, FakeSymbol].concat(globalArgs)); + return module.exports; + } + function evaluateTypeScript(sourceText, options, globals) { + return evaluate(compile(sourceText, options), globals); + } + evaluator.evaluateTypeScript = evaluateTypeScript; +})(evaluator || (evaluator = {})); +/** + * Fake implementations of various compiler dependencies. + */ +var fakes; +(function (fakes) { + var processExitSentinel = new Error("System exit"); + /** + * A fake `ts.System` that leverages a virtual file system. + */ + var System = /** @class */ (function () { + function System(vfs, _a) { + var _b = _a === void 0 ? {} : _a, executingFilePath = _b.executingFilePath, _c = _b.newLine, newLine = _c === void 0 ? "\r\n" : _c, env = _b.env; + this.args = []; + this.output = []; + this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; + this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; + this.newLine = newLine; + this._executingFilePath = executingFilePath; + this._env = env; + } + System.prototype.write = function (message) { + this.output.push(message); + }; + System.prototype.readFile = function (path) { + try { + var content = this.vfs.readFileSync(path, "utf8"); + return content === undefined ? undefined : utils.removeByteOrderMark(content); + } + catch (_a) { + return undefined; + } + }; + System.prototype.writeFile = function (path, data, writeByteOrderMark) { + this.vfs.mkdirpSync(vpath.dirname(path)); + this.vfs.writeFileSync(path, writeByteOrderMark ? utils.addUTF8ByteOrderMark(data) : data); + }; + System.prototype.deleteFile = function (path) { + this.vfs.unlinkSync(path); + }; + System.prototype.fileExists = function (path) { + var stats = this._getStats(path); + return stats ? stats.isFile() : false; + }; + System.prototype.directoryExists = function (path) { + var stats = this._getStats(path); + return stats ? stats.isDirectory() : false; + }; + System.prototype.createDirectory = function (path) { + this.vfs.mkdirpSync(path); + }; + System.prototype.getCurrentDirectory = function () { + return this.vfs.cwd(); + }; + System.prototype.getDirectories = function (path) { + var result = []; + try { + for (var _i = 0, _a = this.vfs.readdirSync(path); _i < _a.length; _i++) { + var file = _a[_i]; + if (this.vfs.statSync(vpath.combine(path, file)).isDirectory()) { + result.push(file); + } + } + } + catch ( /*ignore*/_b) { /*ignore*/ } + return result; + }; + System.prototype.readDirectory = function (path, extensions, exclude, include, depth) { + var _this = this; + return ts.matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, function (path) { return _this.getAccessibleFileSystemEntries(path); }); + }; + System.prototype.getAccessibleFileSystemEntries = function (path) { + var files = []; + var directories = []; + try { + for (var _i = 0, _a = this.vfs.readdirSync(path); _i < _a.length; _i++) { + var file = _a[_i]; + try { + var stats = this.vfs.statSync(vpath.combine(path, file)); + if (stats.isFile()) { + files.push(file); + } + else if (stats.isDirectory()) { + directories.push(file); + } + } + catch ( /*ignored*/_b) { /*ignored*/ } + } + } + catch ( /*ignored*/_c) { /*ignored*/ } + return { files: files, directories: directories }; + }; + System.prototype.exit = function (exitCode) { + this.exitCode = exitCode; + throw processExitSentinel; + }; + System.prototype.getFileSize = function (path) { + var stats = this._getStats(path); + return stats && stats.isFile() ? stats.size : 0; + }; + System.prototype.resolvePath = function (path) { + return vpath.resolve(this.vfs.cwd(), path); + }; + System.prototype.getExecutingFilePath = function () { + if (this._executingFilePath === undefined) + return ts.notImplemented(); + return this._executingFilePath; + }; + System.prototype.getModifiedTime = function (path) { + var stats = this._getStats(path); + return stats ? stats.mtime : undefined; // TODO: GH#18217 + }; + System.prototype.setModifiedTime = function (path, time) { + this.vfs.utimesSync(path, time, time); + }; + System.prototype.createHash = function (data) { + return data; + }; + System.prototype.realpath = function (path) { + try { + return this.vfs.realpathSync(path); + } + catch (_a) { + return path; + } + }; + System.prototype.getEnvironmentVariable = function (name) { + return (this._env && this._env[name]); // TODO: GH#18217 + }; + System.prototype._getStats = function (path) { + try { + return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; + } + catch (_a) { + return undefined; + } + }; + return System; + }()); + fakes.System = System; + /** + * A fake `ts.ParseConfigHost` that leverages a virtual file system. + */ + var ParseConfigHost = /** @class */ (function () { + function ParseConfigHost(sys) { + if (sys instanceof vfs.FileSystem) + sys = new System(sys); + this.sys = sys; + } + Object.defineProperty(ParseConfigHost.prototype, "vfs", { + get: function () { + return this.sys.vfs; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParseConfigHost.prototype, "useCaseSensitiveFileNames", { + get: function () { + return this.sys.useCaseSensitiveFileNames; + }, + enumerable: true, + configurable: true + }); + ParseConfigHost.prototype.fileExists = function (fileName) { + return this.sys.fileExists(fileName); + }; + ParseConfigHost.prototype.directoryExists = function (directoryName) { + return this.sys.directoryExists(directoryName); + }; + ParseConfigHost.prototype.readFile = function (path) { + return this.sys.readFile(path); + }; + ParseConfigHost.prototype.readDirectory = function (path, extensions, excludes, includes, depth) { + return this.sys.readDirectory(path, extensions, excludes, includes, depth); + }; + return ParseConfigHost; + }()); + fakes.ParseConfigHost = ParseConfigHost; + /** + * A fake `ts.CompilerHost` that leverages a virtual file system. + */ + var CompilerHost = /** @class */ (function () { + function CompilerHost(sys, options, setParentNodes) { + if (options === void 0) { options = ts.getDefaultCompilerOptions(); } + if (setParentNodes === void 0) { setParentNodes = false; } + var _this = this; + this.outputs = []; + this.traces = []; + this.shouldAssertInvariants = !Harness.lightMode; + if (sys instanceof vfs.FileSystem) + sys = new System(sys); + this.sys = sys; + this.defaultLibLocation = sys.vfs.meta.get("defaultLibLocation") || ""; + this._newLine = ts.getNewLineCharacter(options, function () { return _this.sys.newLine; }); + this._sourceFiles = new collections.SortedMap({ comparer: sys.vfs.stringComparer, sort: "insertion" }); + this._setParentNodes = setParentNodes; + this._outputsMap = new collections.SortedMap(this.vfs.stringComparer); + } + Object.defineProperty(CompilerHost.prototype, "vfs", { + get: function () { + return this.sys.vfs; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CompilerHost.prototype, "parseConfigHost", { + get: function () { + return this._parseConfigHost || (this._parseConfigHost = new ParseConfigHost(this.sys)); + }, + enumerable: true, + configurable: true + }); + CompilerHost.prototype.getCurrentDirectory = function () { + return this.sys.getCurrentDirectory(); + }; + CompilerHost.prototype.useCaseSensitiveFileNames = function () { + return this.sys.useCaseSensitiveFileNames; + }; + CompilerHost.prototype.getNewLine = function () { + return this._newLine; + }; + CompilerHost.prototype.getCanonicalFileName = function (fileName) { + return this.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + }; + CompilerHost.prototype.deleteFile = function (fileName) { + this.sys.deleteFile(fileName); + }; + CompilerHost.prototype.fileExists = function (fileName) { + return this.sys.fileExists(fileName); + }; + CompilerHost.prototype.directoryExists = function (directoryName) { + return this.sys.directoryExists(directoryName); + }; + CompilerHost.prototype.getModifiedTime = function (fileName) { + return this.sys.getModifiedTime(fileName); + }; + CompilerHost.prototype.setModifiedTime = function (fileName, time) { + return this.sys.setModifiedTime(fileName, time); + }; + CompilerHost.prototype.getDirectories = function (path) { + return this.sys.getDirectories(path); + }; + CompilerHost.prototype.readDirectory = function (path, extensions, exclude, include, depth) { + return this.sys.readDirectory(path, extensions, exclude, include, depth); + }; + CompilerHost.prototype.readFile = function (path) { + return this.sys.readFile(path); + }; + CompilerHost.prototype.writeFile = function (fileName, content, writeByteOrderMark) { + if (writeByteOrderMark) + content = utils.addUTF8ByteOrderMark(content); + this.sys.writeFile(fileName, content); + var document = new documents.TextDocument(fileName, content); + document.meta.set("fileName", fileName); + this.vfs.filemeta(fileName).set("document", document); + if (!this._outputsMap.has(document.file)) { + this._outputsMap.set(document.file, this.outputs.length); + this.outputs.push(document); + } + this.outputs[this._outputsMap.get(document.file)] = document; + }; + CompilerHost.prototype.trace = function (s) { + this.traces.push(s); + }; + CompilerHost.prototype.realpath = function (path) { + return this.sys.realpath(path); + }; + CompilerHost.prototype.getDefaultLibLocation = function () { + return vpath.resolve(this.getCurrentDirectory(), this.defaultLibLocation); + }; + CompilerHost.prototype.getDefaultLibFileName = function (options) { + return vpath.resolve(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options)); + }; + CompilerHost.prototype.getSourceFile = function (fileName, languageVersion) { + var canonicalFileName = this.getCanonicalFileName(vpath.resolve(this.getCurrentDirectory(), fileName)); + var existing = this._sourceFiles.get(canonicalFileName); + if (existing) + return existing; + var content = this.readFile(canonicalFileName); + if (content === undefined) + return undefined; + // A virtual file system may shadow another existing virtual file system. This + // allows us to reuse a common virtual file system structure across multiple + // tests. If a virtual file is a shadow, it is likely that the file will be + // reused across multiple tests. In that case, we cache the SourceFile we parse + // so that it can be reused across multiple tests to avoid the cost of + // repeatedly parsing the same file over and over (such as lib.d.ts). + var cacheKey = this.vfs.shadowRoot && "SourceFile[languageVersion=" + languageVersion + ",setParentNodes=" + this._setParentNodes + "]"; + if (cacheKey) { + var meta = this.vfs.filemeta(canonicalFileName); + var sourceFileFromMetadata = meta.get(cacheKey); + if (sourceFileFromMetadata && sourceFileFromMetadata.getFullText() === content) { + this._sourceFiles.set(canonicalFileName, sourceFileFromMetadata); + return sourceFileFromMetadata; + } + } + var parsed = ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes || this.shouldAssertInvariants); + if (this.shouldAssertInvariants) { + Utils.assertInvariants(parsed, /*parent*/ undefined); + } + this._sourceFiles.set(canonicalFileName, parsed); + if (cacheKey) { + // store the cached source file on the unshadowed file with the same version. + var stats = this.vfs.statSync(canonicalFileName); + var fs = this.vfs; + while (fs.shadowRoot) { + try { + var shadowRootStats = fs.shadowRoot.existsSync(canonicalFileName) ? fs.shadowRoot.statSync(canonicalFileName) : undefined; // TODO: GH#18217 + if (shadowRootStats.dev !== stats.dev || + shadowRootStats.ino !== stats.ino || + shadowRootStats.mtimeMs !== stats.mtimeMs) { + break; + } + fs = fs.shadowRoot; + } + catch (_a) { + break; + } + } + if (fs !== this.vfs) { + fs.filemeta(canonicalFileName).set(cacheKey, parsed); + } + } + return parsed; + }; + return CompilerHost; + }()); + fakes.CompilerHost = CompilerHost; +})(fakes || (fakes = {})); +var ts; +(function (ts) { + var server; + (function (server) { + /* @internal */ + function extractMessage(message) { + // Read the content length + var contentLengthPrefix = "Content-Length: "; + var lines = message.split(/\r?\n/); + ts.Debug.assert(lines.length >= 2, "Malformed response: Expected 3 lines in the response."); + var contentLengthText = lines[0]; + ts.Debug.assert(contentLengthText.indexOf(contentLengthPrefix) === 0, "Malformed response: Response text did not contain content-length header."); + var contentLength = parseInt(contentLengthText.substring(contentLengthPrefix.length)); + // Read the body + var responseBody = lines[2]; + // Verify content length + ts.Debug.assert(responseBody.length + 1 === contentLength, "Malformed response: Content length did not match the response's body length."); + return responseBody; + } + server.extractMessage = extractMessage; + var SessionClient = /** @class */ (function () { + function SessionClient(host) { + this.host = host; + this.sequence = 0; + this.lineMaps = ts.createMap(); + this.messages = []; + this.getCombinedCodeFix = ts.notImplemented; + this.applyCodeActionCommand = ts.notImplemented; + } + SessionClient.prototype.onMessage = function (message) { + this.messages.push(message); + }; + SessionClient.prototype.writeMessage = function (message) { + this.host.writeMessage(message); + }; + SessionClient.prototype.getLineMap = function (fileName) { + var lineMap = this.lineMaps.get(fileName); + if (!lineMap) { + lineMap = ts.computeLineStarts(ts.getSnapshotText(this.host.getScriptSnapshot(fileName))); + this.lineMaps.set(fileName, lineMap); + } + return lineMap; + }; + SessionClient.prototype.lineOffsetToPosition = function (fileName, lineOffset, lineMap) { + lineMap = lineMap || this.getLineMap(fileName); + return ts.computePositionOfLineAndCharacter(lineMap, lineOffset.line - 1, lineOffset.offset - 1); + }; + SessionClient.prototype.positionToOneBasedLineOffset = function (fileName, position) { + var lineOffset = ts.computeLineAndCharacterOfPosition(this.getLineMap(fileName), position); + return { + line: lineOffset.line + 1, + offset: lineOffset.character + 1 + }; + }; + SessionClient.prototype.convertCodeEditsToTextChange = function (fileName, codeEdit) { + return { span: this.decodeSpan(codeEdit, fileName), newText: codeEdit.newText }; + }; + SessionClient.prototype.processRequest = function (command, args) { + var request = { + seq: this.sequence, + type: "request", + arguments: args, + command: command + }; + this.sequence++; + this.writeMessage(JSON.stringify(request)); + return request; + }; + SessionClient.prototype.processResponse = function (request) { + var foundResponseMessage = false; + var response; + while (!foundResponseMessage) { + var lastMessage = this.messages.shift(); + ts.Debug.assert(!!lastMessage, "Did not receive any responses."); + var responseBody = extractMessage(lastMessage); + try { + response = JSON.parse(responseBody); + // the server may emit events before emitting the response. We + // want to ignore these events for testing purpose. + if (response.type === "response") { + foundResponseMessage = true; + } + } + catch (e) { + throw new Error("Malformed response: Failed to parse server response: " + lastMessage + ". \r\n Error details: " + e.message); + } + } + // verify the sequence numbers + ts.Debug.assert(response.request_seq === request.seq, "Malformed response: response sequence number did not match request sequence number."); + // unmarshal errors + if (!response.success) { + throw new Error("Error " + response.message); + } + ts.Debug.assert(!!response.body, "Malformed response: Unexpected empty response body."); + return response; + }; + SessionClient.prototype.openFile = function (file, fileContent, scriptKindName) { + var args = { file: file, fileContent: fileContent, scriptKindName: scriptKindName }; + this.processRequest(server.CommandNames.Open, args); + }; + SessionClient.prototype.closeFile = function (file) { + var args = { file: file }; + this.processRequest(server.CommandNames.Close, args); + }; + SessionClient.prototype.changeFile = function (fileName, start, end, insertString) { + // clear the line map after an edit + this.lineMaps.set(fileName, undefined); // TODO: GH#18217 + var args = __assign({}, this.createFileLocationRequestArgsWithEndLineAndOffset(fileName, start, end), { insertString: insertString }); + this.processRequest(server.CommandNames.Change, args); + }; + SessionClient.prototype.toLineColumnOffset = function (fileName, position) { + var _a = this.positionToOneBasedLineOffset(fileName, position), line = _a.line, offset = _a.offset; + return { line: line, character: offset }; + }; + SessionClient.prototype.getQuickInfoAtPosition = function (fileName, position) { + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Quickinfo, args); + var response = this.processResponse(request); + var body = response.body; // TODO: GH#18217 + return { + kind: body.kind, + kindModifiers: body.kindModifiers, + textSpan: this.decodeSpan(body, fileName), + displayParts: [{ kind: "text", text: body.displayString }], + documentation: [{ kind: "text", text: body.documentation }], + tags: body.tags + }; + }; + SessionClient.prototype.getProjectInfo = function (file, needFileNameList) { + var args = { file: file, needFileNameList: needFileNameList }; + var request = this.processRequest(server.CommandNames.ProjectInfo, args); + var response = this.processResponse(request); + return { + configFileName: response.body.configFileName, + fileNames: response.body.fileNames + }; + }; + SessionClient.prototype.getCompletionsAtPosition = function (fileName, position, _preferences) { + var _this = this; + // Not passing along 'preferences' because server should already have those from the 'configure' command + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Completions, args); + var response = this.processResponse(request); + return { + isGlobalCompletion: false, + isMemberCompletion: false, + isNewIdentifierLocation: false, + entries: response.body.map(function (entry) { + if (entry.replacementSpan !== undefined) { + var name = entry.name, kind = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, replacementSpan = entry.replacementSpan, hasAction = entry.hasAction, source = entry.source, isRecommended = entry.isRecommended; + // TODO: GH#241 + var res = { name: name, kind: kind, kindModifiers: kindModifiers, sortText: sortText, replacementSpan: _this.decodeSpan(replacementSpan, fileName), hasAction: hasAction, source: source, isRecommended: isRecommended }; + return res; + } + return entry; // TODO: GH#18217 + }) + }; + }; + SessionClient.prototype.getCompletionEntryDetails = function (fileName, position, entryName, _options, source) { + var _this = this; + var args = __assign({}, this.createFileLocationRequestArgs(fileName, position), { entryNames: [{ name: entryName, source: source }] }); + var request = this.processRequest(server.CommandNames.CompletionDetails, args); + var response = this.processResponse(request); + ts.Debug.assert(response.body.length === 1, "Unexpected length of completion details response body."); + var convertedCodeActions = ts.map(response.body[0].codeActions, function (_a) { + var description = _a.description, changes = _a.changes; + return ({ description: description, changes: _this.convertChanges(changes, fileName) }); + }); + return __assign({}, response.body[0], { codeActions: convertedCodeActions }); + }; + SessionClient.prototype.getCompletionEntrySymbol = function (_fileName, _position, _entryName) { + return ts.notImplemented(); + }; + SessionClient.prototype.getNavigateToItems = function (searchValue) { + var _this = this; + var args = { + searchValue: searchValue, + file: this.host.getScriptFileNames()[0] + }; + var request = this.processRequest(server.CommandNames.Navto, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return ({ + name: entry.name, + containerName: entry.containerName || "", + containerKind: entry.containerKind || "" /* unknown */, + kind: entry.kind, + kindModifiers: entry.kindModifiers, + matchKind: entry.matchKind, + isCaseSensitive: entry.isCaseSensitive, + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + }); }); + }; + SessionClient.prototype.getFormattingEditsForRange = function (file, start, end, _options) { + var _this = this; + var args = this.createFileLocationRequestArgsWithEndLineAndOffset(file, start, end); + // TODO: handle FormatCodeOptions + var request = this.processRequest(server.CommandNames.Format, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return _this.convertCodeEditsToTextChange(file, entry); }); // TODO: GH#18217 + }; + SessionClient.prototype.getFormattingEditsForDocument = function (fileName, options) { + return this.getFormattingEditsForRange(fileName, 0, this.host.getScriptSnapshot(fileName).getLength(), options); + }; + SessionClient.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, _options) { + var _this = this; + var args = __assign({}, this.createFileLocationRequestArgs(fileName, position), { key: key }); + // TODO: handle FormatCodeOptions + var request = this.processRequest(server.CommandNames.Formatonkey, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return _this.convertCodeEditsToTextChange(fileName, entry); }); // TODO: GH#18217 + }; + SessionClient.prototype.getDefinitionAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Definition, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return ({ + containerKind: "" /* unknown */, + containerName: "", + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + kind: "" /* unknown */, + name: "" + }); }); + }; + SessionClient.prototype.getDefinitionAndBoundSpan = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.DefinitionAndBoundSpan, args); + var response = this.processResponse(request); + return { + definitions: response.body.definitions.map(function (entry) { return ({ + containerKind: "" /* unknown */, + containerName: "", + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + kind: "" /* unknown */, + name: "" + }); }), + textSpan: this.decodeSpan(response.body.textSpan, request.arguments.file) + }; + }; + SessionClient.prototype.getTypeDefinitionAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.TypeDefinition, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return ({ + containerKind: "" /* unknown */, + containerName: "", + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + kind: "" /* unknown */, + name: "" + }); }); + }; + SessionClient.prototype.getImplementationAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Implementation, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return ({ + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + kind: "" /* unknown */, + displayParts: [] + }); }); + }; + SessionClient.prototype.findReferences = function (_fileName, _position) { + // Not yet implemented. + return []; + }; + SessionClient.prototype.getReferencesAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.References, args); + var response = this.processResponse(request); + return response.body.refs.map(function (entry) { return ({ + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + isWriteAccess: entry.isWriteAccess, + isDefinition: entry.isDefinition, + }); }); + }; + SessionClient.prototype.getEmitOutput = function (_fileName) { + return ts.notImplemented(); + }; + SessionClient.prototype.getSyntacticDiagnostics = function (file) { + return this.getDiagnostics(file, server.CommandNames.SyntacticDiagnosticsSync); + }; + SessionClient.prototype.getSemanticDiagnostics = function (file) { + return this.getDiagnostics(file, server.CommandNames.SemanticDiagnosticsSync); + }; + SessionClient.prototype.getSuggestionDiagnostics = function (file) { + return this.getDiagnostics(file, server.CommandNames.SuggestionDiagnosticsSync); + }; + SessionClient.prototype.getDiagnostics = function (file, command) { + var request = this.processRequest(command, { file: file, includeLinePosition: true }); + var response = this.processResponse(request); + return response.body.map(function (entry) { + var category = ts.firstDefined(Object.keys(ts.DiagnosticCategory), function (id) { + return ts.isString(id) && entry.category === id.toLowerCase() ? ts.DiagnosticCategory[id] : undefined; + }); + return { + file: undefined, + start: entry.start, + length: entry.length, + messageText: entry.message, + category: ts.Debug.assertDefined(category, "convertDiagnostic: category should not be undefined"), + code: entry.code, + reportsUnnecessary: entry.reportsUnnecessary, + }; + }); + }; + SessionClient.prototype.getCompilerOptionsDiagnostics = function () { + return ts.notImplemented(); + }; + SessionClient.prototype.getRenameInfo = function (fileName, position, findInStrings, findInComments) { + var args = __assign({}, this.createFileLocationRequestArgs(fileName, position), { findInStrings: findInStrings, findInComments: findInComments }); + var request = this.processRequest(server.CommandNames.Rename, args); + var response = this.processResponse(request); + var body = response.body; // TODO: GH#18217 + var locations = []; + for (var _i = 0, _a = body.locs; _i < _a.length; _i++) { + var entry = _a[_i]; + var fileName_1 = entry.file; + for (var _b = 0, _c = entry.locs; _b < _c.length; _b++) { + var loc = _c[_b]; + locations.push({ textSpan: this.decodeSpan(loc, fileName_1), fileName: fileName_1 }); + } + } + return this.lastRenameEntry = { + canRename: body.info.canRename, + displayName: body.info.displayName, + fullDisplayName: body.info.fullDisplayName, + kind: body.info.kind, + kindModifiers: body.info.kindModifiers, + localizedErrorMessage: body.info.localizedErrorMessage, + triggerSpan: ts.createTextSpanFromBounds(position, position), + fileName: fileName, + position: position, + findInStrings: !!findInStrings, + findInComments: !!findInComments, + locations: locations, + }; + }; + SessionClient.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) { + if (!this.lastRenameEntry || + this.lastRenameEntry.fileName !== fileName || + this.lastRenameEntry.position !== position || + this.lastRenameEntry.findInStrings !== findInStrings || + this.lastRenameEntry.findInComments !== findInComments) { + this.getRenameInfo(fileName, position, findInStrings, findInComments); + } + return this.lastRenameEntry.locations; + }; + SessionClient.prototype.decodeNavigationBarItems = function (items, fileName, lineMap) { + var _this = this; + if (!items) { + return []; + } + return items.map(function (item) { return ({ + text: item.text, + kind: item.kind, + kindModifiers: item.kindModifiers || "", + spans: item.spans.map(function (span) { return _this.decodeSpan(span, fileName, lineMap); }), + childItems: _this.decodeNavigationBarItems(item.childItems, fileName, lineMap), + indent: item.indent, + bolded: false, + grayed: false + }); }); + }; + SessionClient.prototype.getNavigationBarItems = function (file) { + var request = this.processRequest(server.CommandNames.NavBar, { file: file }); + var response = this.processResponse(request); + var lineMap = this.getLineMap(file); + return this.decodeNavigationBarItems(response.body, file, lineMap); + }; + SessionClient.prototype.decodeNavigationTree = function (tree, fileName, lineMap) { + var _this = this; + return { + text: tree.text, + kind: tree.kind, + kindModifiers: tree.kindModifiers, + spans: tree.spans.map(function (span) { return _this.decodeSpan(span, fileName, lineMap); }), + nameSpan: tree.nameSpan && this.decodeSpan(tree.nameSpan, fileName, lineMap), + childItems: ts.map(tree.childItems, function (item) { return _this.decodeNavigationTree(item, fileName, lineMap); }) + }; + }; + SessionClient.prototype.getNavigationTree = function (file) { + var request = this.processRequest(server.CommandNames.NavTree, { file: file }); + var response = this.processResponse(request); + var lineMap = this.getLineMap(file); + return this.decodeNavigationTree(response.body, file, lineMap); // TODO: GH#18217 + }; + SessionClient.prototype.decodeSpan = function (span, fileName, lineMap) { + fileName = fileName || span.file; + lineMap = lineMap || this.getLineMap(fileName); + return ts.createTextSpanFromBounds(this.lineOffsetToPosition(fileName, span.start, lineMap), this.lineOffsetToPosition(fileName, span.end, lineMap)); + }; + SessionClient.prototype.getNameOrDottedNameSpan = function (_fileName, _startPos, _endPos) { + return ts.notImplemented(); + }; + SessionClient.prototype.getBreakpointStatementAtPosition = function (_fileName, _position) { + return ts.notImplemented(); + }; + SessionClient.prototype.getSignatureHelpItems = function (fileName, position) { + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.SignatureHelp, args); + var response = this.processResponse(request); + if (!response.body) { + return undefined; // TODO: GH#18217 + } + var _a = response.body, items = _a.items, encodedApplicableSpan = _a.applicableSpan, selectedItemIndex = _a.selectedItemIndex, argumentIndex = _a.argumentIndex, argumentCount = _a.argumentCount; + var applicableSpan = this.decodeSpan(encodedApplicableSpan, fileName); + return { items: items, applicableSpan: applicableSpan, selectedItemIndex: selectedItemIndex, argumentIndex: argumentIndex, argumentCount: argumentCount }; + }; + SessionClient.prototype.getOccurrencesAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Occurrences, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return ({ + fileName: entry.file, + textSpan: _this.decodeSpan(entry), + isWriteAccess: entry.isWriteAccess, + isDefinition: false + }); }); + }; + SessionClient.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) { + var _this = this; + var args = __assign({}, this.createFileLocationRequestArgs(fileName, position), { filesToSearch: filesToSearch }); + var request = this.processRequest(server.CommandNames.DocumentHighlights, args); + var response = this.processResponse(request); + return response.body.map(function (item) { return ({ + fileName: item.file, + highlightSpans: item.highlightSpans.map(function (span) { return ({ + textSpan: _this.decodeSpan(span, item.file), + kind: span.kind + }); }), + }); }); + }; + SessionClient.prototype.getOutliningSpans = function (file) { + var _this = this; + var request = this.processRequest(server.CommandNames.GetOutliningSpans, { file: file }); + var response = this.processResponse(request); + return response.body.map(function (item) { return ({ + textSpan: _this.decodeSpan(item.textSpan, file), + hintSpan: _this.decodeSpan(item.hintSpan, file), + bannerText: item.bannerText, + autoCollapse: item.autoCollapse, + kind: item.kind + }); }); + }; + SessionClient.prototype.getTodoComments = function (_fileName, _descriptors) { + return ts.notImplemented(); + }; + SessionClient.prototype.getDocCommentTemplateAtPosition = function (_fileName, _position) { + return ts.notImplemented(); + }; + SessionClient.prototype.isValidBraceCompletionAtPosition = function (_fileName, _position, _openingBrace) { + return ts.notImplemented(); + }; + SessionClient.prototype.getJsxClosingTagAtPosition = function (_fileName, _position) { + return ts.notImplemented(); + }; + SessionClient.prototype.getSpanOfEnclosingComment = function (_fileName, _position, _onlyMultiLine) { + return ts.notImplemented(); + }; + SessionClient.prototype.getCodeFixesAtPosition = function (file, start, end, errorCodes) { + var _this = this; + var args = __assign({}, this.createFileRangeRequestArgs(file, start, end), { errorCodes: errorCodes }); + var request = this.processRequest(server.CommandNames.GetCodeFixes, args); + var response = this.processResponse(request); + return response.body.map(function (_a) { + var fixName = _a.fixName, description = _a.description, changes = _a.changes, commands = _a.commands, fixId = _a.fixId, fixAllDescription = _a.fixAllDescription; + return ({ fixName: fixName, description: description, changes: _this.convertChanges(changes, file), commands: commands, fixId: fixId, fixAllDescription: fixAllDescription }); + }); + }; + SessionClient.prototype.createFileLocationOrRangeRequestArgs = function (positionOrRange, fileName) { + return typeof positionOrRange === "number" + ? this.createFileLocationRequestArgs(fileName, positionOrRange) + : this.createFileRangeRequestArgs(fileName, positionOrRange.pos, positionOrRange.end); + }; + SessionClient.prototype.createFileLocationRequestArgs = function (file, position) { + var _a = this.positionToOneBasedLineOffset(file, position), line = _a.line, offset = _a.offset; + return { file: file, line: line, offset: offset }; + }; + SessionClient.prototype.createFileRangeRequestArgs = function (file, start, end) { + var _a = this.positionToOneBasedLineOffset(file, start), startLine = _a.line, startOffset = _a.offset; + var _b = this.positionToOneBasedLineOffset(file, end), endLine = _b.line, endOffset = _b.offset; + return { file: file, startLine: startLine, startOffset: startOffset, endLine: endLine, endOffset: endOffset }; + }; + SessionClient.prototype.createFileLocationRequestArgsWithEndLineAndOffset = function (file, start, end) { + var _a = this.positionToOneBasedLineOffset(file, start), line = _a.line, offset = _a.offset; + var _b = this.positionToOneBasedLineOffset(file, end), endLine = _b.line, endOffset = _b.offset; + return { file: file, line: line, offset: offset, endLine: endLine, endOffset: endOffset }; + }; + SessionClient.prototype.getApplicableRefactors = function (fileName, positionOrRange) { + var args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName); + var request = this.processRequest(server.CommandNames.GetApplicableRefactors, args); + var response = this.processResponse(request); + return response.body; // TODO: GH#18217 + }; + SessionClient.prototype.getEditsForRefactor = function (fileName, _formatOptions, positionOrRange, refactorName, actionName) { + var args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName); + args.refactor = refactorName; + args.action = actionName; + var request = this.processRequest(server.CommandNames.GetEditsForRefactor, args); + var response = this.processResponse(request); + if (!response.body) { + return { edits: [], renameFilename: undefined, renameLocation: undefined }; + } + var edits = this.convertCodeEditsToTextChanges(response.body.edits); + var renameFilename = response.body.renameFilename; + var renameLocation; + if (renameFilename !== undefined) { + renameLocation = this.lineOffsetToPosition(renameFilename, response.body.renameLocation); // TODO: GH#18217 + } + return { + edits: edits, + renameFilename: renameFilename, + renameLocation: renameLocation + }; + }; + SessionClient.prototype.organizeImports = function (_scope, _formatOptions) { + return ts.notImplemented(); + }; + SessionClient.prototype.getEditsForFileRename = function () { + return ts.notImplemented(); + }; + SessionClient.prototype.convertCodeEditsToTextChanges = function (edits) { + var _this = this; + return edits.map(function (edit) { + var fileName = edit.fileName; + return { + fileName: fileName, + textChanges: edit.textChanges.map(function (t) { return _this.convertTextChangeToCodeEdit(t, fileName); }) + }; + }); + }; + SessionClient.prototype.convertChanges = function (changes, fileName) { + var _this = this; + return changes.map(function (change) { return ({ + fileName: change.fileName, + textChanges: change.textChanges.map(function (textChange) { return _this.convertTextChangeToCodeEdit(textChange, fileName); }) + }); }); + }; + SessionClient.prototype.convertTextChangeToCodeEdit = function (change, fileName) { + return { + span: this.decodeSpan(change, fileName), + newText: change.newText ? change.newText : "" + }; + }; + SessionClient.prototype.getBraceMatchingAtPosition = function (fileName, position) { + var _this = this; + var args = this.createFileLocationRequestArgs(fileName, position); + var request = this.processRequest(server.CommandNames.Brace, args); + var response = this.processResponse(request); + return response.body.map(function (entry) { return _this.decodeSpan(entry, fileName); }); // TODO: GH#18217 + }; + SessionClient.prototype.getIndentationAtPosition = function (_fileName, _position, _options) { + return ts.notImplemented(); + }; + SessionClient.prototype.getSyntacticClassifications = function (_fileName, _span) { + return ts.notImplemented(); + }; + SessionClient.prototype.getSemanticClassifications = function (_fileName, _span) { + return ts.notImplemented(); + }; + SessionClient.prototype.getEncodedSyntacticClassifications = function (_fileName, _span) { + return ts.notImplemented(); + }; + SessionClient.prototype.getEncodedSemanticClassifications = function (_fileName, _span) { + return ts.notImplemented(); + }; + SessionClient.prototype.getProgram = function () { + throw new Error("SourceFile objects are not serializable through the server protocol."); + }; + SessionClient.prototype.getNonBoundSourceFile = function (_fileName) { + throw new Error("SourceFile objects are not serializable through the server protocol."); + }; + SessionClient.prototype.getSourceFile = function (_fileName) { + throw new Error("SourceFile objects are not serializable through the server protocol."); + }; + SessionClient.prototype.cleanupSemanticCache = function () { + throw new Error("cleanupSemanticCache is not available through the server layer."); + }; + SessionClient.prototype.dispose = function () { + throw new Error("dispose is not available through the server layer."); + }; + return SessionClient; + }()); + server.SessionClient = SessionClient; + })(server = ts.server || (ts.server = {})); +})(ts || (ts = {})); +var RunnerBase = /** @class */ (function () { + function RunnerBase() { + // contains the tests to run + this.tests = []; + /** The working directory where tests are found. Needed for batch testing where the input path will differ from the output path inside baselines */ + this.workingDirectory = ""; + } + /** Add a source file to the runner's list of tests that need to be initialized with initializeTests */ + RunnerBase.prototype.addTest = function (fileName) { + this.tests.push(fileName); + }; + RunnerBase.prototype.enumerateFiles = function (folder, regex, options) { + return ts.map(Harness.IO.listFiles(Harness.userSpecifiedRoot + folder, regex, { recursive: (options ? options.recursive : false) }), ts.normalizeSlashes); + }; + /** Replaces instances of full paths with fileNames only */ + RunnerBase.removeFullPaths = function (path) { + // If its a full path (starts with "C:" or "/") replace with just the filename + var fixedPath = /^(\w:|\/)/.test(path) ? ts.getBaseFileName(path) : path; + // when running in the browser the 'full path' is the host name, shows up in error baselines + var localHost = /http:\/localhost:\d+/g; + fixedPath = fixedPath.replace(localHost, ""); + return fixedPath; + }; + return RunnerBase; +}()); +var Harness; +(function (Harness) { + var SourceMapRecorder; + (function (SourceMapRecorder) { + var SourceMapDecoder; + (function (SourceMapDecoder) { + var sourceMapMappings; + var sourceMapNames; + var decodingIndex; + var prevNameIndex; + var decodeOfEncodedMapping; + var errorDecodeOfEncodedMapping; + function initializeSourceMapDecoding(sourceMapData) { + sourceMapMappings = sourceMapData.sourceMapMappings; + sourceMapNames = sourceMapData.sourceMapNames; + decodingIndex = 0; + prevNameIndex = 0; + decodeOfEncodedMapping = { + emittedLine: 1, + emittedColumn: 1, + sourceLine: 1, + sourceColumn: 1, + sourceIndex: 0, + }; + errorDecodeOfEncodedMapping = undefined; + } + SourceMapDecoder.initializeSourceMapDecoding = initializeSourceMapDecoding; + function isSourceMappingSegmentEnd() { + if (decodingIndex === sourceMapMappings.length) { + return true; + } + if (sourceMapMappings.charAt(decodingIndex) === ",") { + return true; + } + if (sourceMapMappings.charAt(decodingIndex) === ";") { + return true; + } + return false; + } + function decodeNextEncodedSourceMapSpan() { + errorDecodeOfEncodedMapping = undefined; + function createErrorIfCondition(condition, errormsg) { + if (errorDecodeOfEncodedMapping) { + // there was existing error: + return true; + } + if (condition) { + errorDecodeOfEncodedMapping = errormsg; + } + return condition; + } + function base64VLQFormatDecode() { + function base64FormatDecode() { + return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(sourceMapMappings.charAt(decodingIndex)); + } + var moreDigits = true; + var shiftCount = 0; + var value = 0; + for (; moreDigits; decodingIndex++) { + if (createErrorIfCondition(decodingIndex >= sourceMapMappings.length, "Error in decoding base64VLQFormatDecode, past the mapping string")) { + return undefined; // TODO: GH#18217 + } + // 6 digit number + var currentByte = base64FormatDecode(); + // If msb is set, we still have more bits to continue + moreDigits = (currentByte & 32) !== 0; + // least significant 5 bits are the next msbs in the final value. + value = value | ((currentByte & 31) << shiftCount); + shiftCount += 5; + } + // Least significant bit if 1 represents negative and rest of the msb is actual absolute value + if ((value & 1) === 0) { + // + number + value = value >> 1; + } + else { + // - number + value = value >> 1; + value = -value; + } + return value; + } + while (decodingIndex < sourceMapMappings.length) { + if (sourceMapMappings.charAt(decodingIndex) === ";") { + // New line + decodeOfEncodedMapping.emittedLine++; + decodeOfEncodedMapping.emittedColumn = 1; + decodingIndex++; + continue; + } + if (sourceMapMappings.charAt(decodingIndex) === ",") { + // Next entry is on same line - no action needed + decodingIndex++; + continue; + } + // Read the current span + // 1. Column offset from prev read jsColumn + decodeOfEncodedMapping.emittedColumn += base64VLQFormatDecode(); + // Incorrect emittedColumn dont support this map + if (createErrorIfCondition(decodeOfEncodedMapping.emittedColumn < 1, "Invalid emittedColumn found")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // Dont support reading mappings that dont have information about original source and its line numbers + if (createErrorIfCondition(isSourceMappingSegmentEnd(), "Unsupported Error Format: No entries after emitted column")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // 2. Relative sourceIndex + decodeOfEncodedMapping.sourceIndex += base64VLQFormatDecode(); + // Incorrect sourceIndex dont support this map + if (createErrorIfCondition(decodeOfEncodedMapping.sourceIndex < 0, "Invalid sourceIndex found")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // Dont support reading mappings that dont have information about original source span + if (createErrorIfCondition(isSourceMappingSegmentEnd(), "Unsupported Error Format: No entries after sourceIndex")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // 3. Relative sourceLine 0 based + decodeOfEncodedMapping.sourceLine += base64VLQFormatDecode(); + // Incorrect sourceLine dont support this map + if (createErrorIfCondition(decodeOfEncodedMapping.sourceLine < 1, "Invalid sourceLine found")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // Dont support reading mappings that dont have information about original source and its line numbers + if (createErrorIfCondition(isSourceMappingSegmentEnd(), "Unsupported Error Format: No entries after emitted Line")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // 4. Relative sourceColumn 0 based + decodeOfEncodedMapping.sourceColumn += base64VLQFormatDecode(); + // Incorrect sourceColumn dont support this map + if (createErrorIfCondition(decodeOfEncodedMapping.sourceColumn < 1, "Invalid sourceLine found")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // 5. Check if there is name: + if (!isSourceMappingSegmentEnd()) { + prevNameIndex += base64VLQFormatDecode(); + decodeOfEncodedMapping.nameIndex = prevNameIndex; + // Incorrect nameIndex dont support this map + if (createErrorIfCondition(decodeOfEncodedMapping.nameIndex < 0 || decodeOfEncodedMapping.nameIndex >= sourceMapNames.length, "Invalid name index for the source map entry")) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + } + // Dont support reading mappings that dont have information about original source and its line numbers + if (createErrorIfCondition(!isSourceMappingSegmentEnd(), "Unsupported Error Format: There are more entries after " + (decodeOfEncodedMapping.nameIndex === -1 ? "sourceColumn" : "nameIndex"))) { + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + // Populated the entry + return { error: errorDecodeOfEncodedMapping, sourceMapSpan: decodeOfEncodedMapping }; + } + createErrorIfCondition(/*condition*/ true, "No encoded entry found"); + return undefined; // TODO: GH#18217 + } + SourceMapDecoder.decodeNextEncodedSourceMapSpan = decodeNextEncodedSourceMapSpan; + function hasCompletedDecoding() { + return decodingIndex === sourceMapMappings.length; + } + SourceMapDecoder.hasCompletedDecoding = hasCompletedDecoding; + function getRemainingDecodeString() { + return sourceMapMappings.substr(decodingIndex); + } + SourceMapDecoder.getRemainingDecodeString = getRemainingDecodeString; + })(SourceMapDecoder || (SourceMapDecoder = {})); + var SourceMapSpanWriter; + (function (SourceMapSpanWriter) { + var sourceMapRecorder; + var sourceMapSources; + var sourceMapNames; + var jsFile; + var jsLineMap; + var tsCode; + var tsLineMap; + var spansOnSingleLine; + var prevWrittenSourcePos; + var prevWrittenJsLine; + var spanMarkerContinues; + function initializeSourceMapSpanWriter(sourceMapRecordWriter, sourceMapData, currentJsFile) { + sourceMapRecorder = sourceMapRecordWriter; + sourceMapSources = sourceMapData.sourceMapSources; + sourceMapNames = sourceMapData.sourceMapNames; + jsFile = currentJsFile; + jsLineMap = jsFile.lineStarts; + spansOnSingleLine = []; + prevWrittenSourcePos = 0; + prevWrittenJsLine = 0; + spanMarkerContinues = false; + SourceMapDecoder.initializeSourceMapDecoding(sourceMapData); + sourceMapRecorder.WriteLine("==================================================================="); + sourceMapRecorder.WriteLine("JsFile: " + sourceMapData.sourceMapFile); + sourceMapRecorder.WriteLine("mapUrl: " + sourceMapData.jsSourceMappingURL); + sourceMapRecorder.WriteLine("sourceRoot: " + sourceMapData.sourceMapSourceRoot); + sourceMapRecorder.WriteLine("sources: " + sourceMapData.sourceMapSources); + if (sourceMapData.sourceMapSourcesContent) { + sourceMapRecorder.WriteLine("sourcesContent: " + JSON.stringify(sourceMapData.sourceMapSourcesContent)); + } + sourceMapRecorder.WriteLine("==================================================================="); + } + SourceMapSpanWriter.initializeSourceMapSpanWriter = initializeSourceMapSpanWriter; + function getSourceMapSpanString(mapEntry, getAbsentNameIndex) { + var mapString = "Emitted(" + mapEntry.emittedLine + ", " + mapEntry.emittedColumn + ") Source(" + mapEntry.sourceLine + ", " + mapEntry.sourceColumn + ") + SourceIndex(" + mapEntry.sourceIndex + ")"; + if (mapEntry.nameIndex >= 0 && mapEntry.nameIndex < sourceMapNames.length) { + mapString += " name (" + sourceMapNames[mapEntry.nameIndex] + ")"; + } + else { + if ((mapEntry.nameIndex && mapEntry.nameIndex !== -1) || getAbsentNameIndex) { + mapString += " nameIndex (" + mapEntry.nameIndex + ")"; + } + } + return mapString; + } + function recordSourceMapSpan(sourceMapSpan) { + // verify the decoded span is same as the new span + var decodeResult = SourceMapDecoder.decodeNextEncodedSourceMapSpan(); + var decodeErrors; + if (decodeResult.error + || decodeResult.sourceMapSpan.emittedLine !== sourceMapSpan.emittedLine + || decodeResult.sourceMapSpan.emittedColumn !== sourceMapSpan.emittedColumn + || decodeResult.sourceMapSpan.sourceLine !== sourceMapSpan.sourceLine + || decodeResult.sourceMapSpan.sourceColumn !== sourceMapSpan.sourceColumn + || decodeResult.sourceMapSpan.sourceIndex !== sourceMapSpan.sourceIndex + || decodeResult.sourceMapSpan.nameIndex !== sourceMapSpan.nameIndex) { + if (decodeResult.error) { + decodeErrors = ["!!^^ !!^^ There was decoding error in the sourcemap at this location: " + decodeResult.error]; + } + else { + decodeErrors = ["!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:"]; + } + decodeErrors.push("!!^^ !!^^ Decoded span from sourcemap's mappings entry: " + getSourceMapSpanString(decodeResult.sourceMapSpan, /*getAbsentNameIndex*/ true) + " Span encoded by the emitter:" + getSourceMapSpanString(sourceMapSpan, /*getAbsentNameIndex*/ true)); + } + if (spansOnSingleLine.length && spansOnSingleLine[0].sourceMapSpan.emittedLine !== sourceMapSpan.emittedLine) { + // On different line from the one that we have been recording till now, + writeRecordedSpans(); + spansOnSingleLine = []; + } + spansOnSingleLine.push({ sourceMapSpan: sourceMapSpan, decodeErrors: decodeErrors }); + } + SourceMapSpanWriter.recordSourceMapSpan = recordSourceMapSpan; + function recordNewSourceFileSpan(sourceMapSpan, newSourceFileCode) { + assert.isTrue(spansOnSingleLine.length === 0 || spansOnSingleLine[0].sourceMapSpan.emittedLine !== sourceMapSpan.emittedLine, "new file source map span should be on new line. We currently handle only that scenario"); + recordSourceMapSpan(sourceMapSpan); + assert.isTrue(spansOnSingleLine.length === 1); + sourceMapRecorder.WriteLine("-------------------------------------------------------------------"); + sourceMapRecorder.WriteLine("emittedFile:" + jsFile.file); + sourceMapRecorder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]); + sourceMapRecorder.WriteLine("-------------------------------------------------------------------"); + tsLineMap = ts.computeLineStarts(newSourceFileCode); + tsCode = newSourceFileCode; + prevWrittenSourcePos = 0; + } + SourceMapSpanWriter.recordNewSourceFileSpan = recordNewSourceFileSpan; + function close() { + // Write the lines pending on the single line + writeRecordedSpans(); + if (!SourceMapDecoder.hasCompletedDecoding()) { + sourceMapRecorder.WriteLine("!!!! **** There are more source map entries in the sourceMap's mapping than what was encoded"); + sourceMapRecorder.WriteLine("!!!! **** Remaining decoded string: " + SourceMapDecoder.getRemainingDecodeString()); + } + // write remaining js lines + writeJsFileLines(jsLineMap.length); + } + SourceMapSpanWriter.close = close; + function getTextOfLine(line, lineMap, code) { + var startPos = lineMap[line]; + var endPos = lineMap[line + 1]; + var text = code.substring(startPos, endPos); + return line === 0 ? utils.removeByteOrderMark(text) : text; + } + function writeJsFileLines(endJsLine) { + for (; prevWrittenJsLine < endJsLine; prevWrittenJsLine++) { + sourceMapRecorder.Write(">>>" + getTextOfLine(prevWrittenJsLine, jsLineMap, jsFile.text)); + } + } + function writeRecordedSpans() { + var markerIds = []; + function getMarkerId(markerIndex) { + var markerId = ""; + if (spanMarkerContinues) { + assert.isTrue(markerIndex === 0); + markerId = "1->"; + } + else { + markerId = "" + (markerIndex + 1); + if (markerId.length < 2) { + markerId = markerId + " "; + } + markerId += ">"; + } + return markerId; + } + var prevEmittedCol; + function iterateSpans(fn) { + prevEmittedCol = 1; + for (var i = 0; i < spansOnSingleLine.length; i++) { + fn(spansOnSingleLine[i], i); + prevEmittedCol = spansOnSingleLine[i].sourceMapSpan.emittedColumn; + } + } + function writeSourceMapIndent(indentLength, indentPrefix) { + sourceMapRecorder.Write(indentPrefix); + for (var i = 1; i < indentLength; i++) { + sourceMapRecorder.Write(" "); + } + } + function writeSourceMapMarker(currentSpan, index, endColumn, endContinues) { + if (endColumn === void 0) { endColumn = currentSpan.sourceMapSpan.emittedColumn; } + if (endContinues === void 0) { endContinues = false; } + var markerId = getMarkerId(index); + markerIds.push(markerId); + writeSourceMapIndent(prevEmittedCol, markerId); + for (var i = prevEmittedCol; i < endColumn; i++) { + sourceMapRecorder.Write("^"); + } + if (endContinues) { + sourceMapRecorder.Write("->"); + } + sourceMapRecorder.WriteLine(""); + spanMarkerContinues = endContinues; + } + function writeSourceMapSourceText(currentSpan, index) { + var sourcePos = tsLineMap[currentSpan.sourceMapSpan.sourceLine - 1] + (currentSpan.sourceMapSpan.sourceColumn - 1); + var sourceText = ""; + if (prevWrittenSourcePos < sourcePos) { + // Position that goes forward, get text + sourceText = tsCode.substring(prevWrittenSourcePos, sourcePos); + } + if (currentSpan.decodeErrors) { + // If there are decode errors, write + for (var _i = 0, _a = currentSpan.decodeErrors; _i < _a.length; _i++) { + var decodeError = _a[_i]; + writeSourceMapIndent(prevEmittedCol, markerIds[index]); + sourceMapRecorder.WriteLine(decodeError); + } + } + var tsCodeLineMap = ts.computeLineStarts(sourceText); + for (var i = 0; i < tsCodeLineMap.length; i++) { + writeSourceMapIndent(prevEmittedCol, i === 0 ? markerIds[index] : " >"); + sourceMapRecorder.Write(getTextOfLine(i, tsCodeLineMap, sourceText)); + if (i === tsCodeLineMap.length - 1) { + sourceMapRecorder.WriteLine(""); + } + } + prevWrittenSourcePos = sourcePos; + } + function writeSpanDetails(currentSpan, index) { + sourceMapRecorder.WriteLine(markerIds[index] + getSourceMapSpanString(currentSpan.sourceMapSpan)); + } + if (spansOnSingleLine.length) { + var currentJsLine = spansOnSingleLine[0].sourceMapSpan.emittedLine; + // Write js line + writeJsFileLines(currentJsLine); + // Emit markers + iterateSpans(writeSourceMapMarker); + var jsFileText = getTextOfLine(currentJsLine, jsLineMap, jsFile.text); + if (prevEmittedCol < jsFileText.length) { + // There is remaining text on this line that will be part of next source span so write marker that continues + writeSourceMapMarker(/*currentSpan*/ undefined, spansOnSingleLine.length, /*endColumn*/ jsFileText.length, /*endContinues*/ true); // TODO: GH#18217 + } + // Emit Source text + iterateSpans(writeSourceMapSourceText); + // Emit column number etc + iterateSpans(writeSpanDetails); + sourceMapRecorder.WriteLine("---"); + } + } + })(SourceMapSpanWriter || (SourceMapSpanWriter = {})); + function getSourceMapRecord(sourceMapDataList, program, jsFiles, declarationFiles) { + var sourceMapRecorder = new Harness.Compiler.WriterAggregator(); + for (var i = 0; i < sourceMapDataList.length; i++) { + var sourceMapData = sourceMapDataList[i]; + var prevSourceFile = void 0; + var currentFile = void 0; + if (ts.endsWith(sourceMapData.sourceMapFile, ".d.ts" /* Dts */)) { + if (sourceMapDataList.length > jsFiles.length) { + currentFile = declarationFiles[Math.floor(i / 2)]; // When both kinds of source map are present, they alternate js/dts + } + else { + currentFile = declarationFiles[i]; + } + } + else { + if (sourceMapDataList.length > jsFiles.length) { + currentFile = jsFiles[Math.floor(i / 2)]; + } + else { + currentFile = jsFiles[i]; + } + } + SourceMapSpanWriter.initializeSourceMapSpanWriter(sourceMapRecorder, sourceMapData, currentFile); + for (var _i = 0, _a = sourceMapData.sourceMapDecodedMappings; _i < _a.length; _i++) { + var decodedSourceMapping = _a[_i]; + var currentSourceFile = program.getSourceFile(sourceMapData.inputSourceFileNames[decodedSourceMapping.sourceIndex]); + if (currentSourceFile !== prevSourceFile) { + SourceMapSpanWriter.recordNewSourceFileSpan(decodedSourceMapping, currentSourceFile.text); + prevSourceFile = currentSourceFile; + } + else { + SourceMapSpanWriter.recordSourceMapSpan(decodedSourceMapping); + } + } + SourceMapSpanWriter.close(); // If the last spans werent emitted, emit them + } + sourceMapRecorder.Close(); + return sourceMapRecorder.lines.join("\r\n"); + } + SourceMapRecorder.getSourceMapRecord = getSourceMapRecord; + })(SourceMapRecorder = Harness.SourceMapRecorder || (Harness.SourceMapRecorder = {})); +})(Harness || (Harness = {})); +// Block scoped definitions work poorly for global variables, temporarily enable var +/* tslint:disable:no-var-keyword */ +// this will work in the browser via browserify +var _chai = require("chai"); +var assert = _chai.assert; +{ + // chai's builtin `assert.isFalse` is featureful but slow - we don't use those features, + // so we'll just overwrite it as an alterative to migrating a bunch of code off of chai + assert.isFalse = function (expr, msg) { if (expr !== false) + throw new Error(msg); }; + var assertDeepImpl_1 = assert.deepEqual; + assert.deepEqual = function (a, b, msg) { + if (ts.isArray(a) && ts.isArray(b)) { + assertDeepImpl_1(arrayExtraKeysObject(a), arrayExtraKeysObject(b), "Array extra keys differ"); + } + assertDeepImpl_1(a, b, msg); + function arrayExtraKeysObject(a) { + var obj = {}; + for (var key in a) { + if (Number.isNaN(Number(key))) { + obj[key] = a[key]; + } + } + return obj; + } + }; +} +var global = Function("return this").call(undefined); +/* tslint:enable:no-var-keyword prefer-const */ +var Utils; +(function (Utils) { + // Setup some globals based on the current environment + var ExecutionEnvironment; + (function (ExecutionEnvironment) { + ExecutionEnvironment[ExecutionEnvironment["Node"] = 0] = "Node"; + ExecutionEnvironment[ExecutionEnvironment["Browser"] = 1] = "Browser"; + })(ExecutionEnvironment = Utils.ExecutionEnvironment || (Utils.ExecutionEnvironment = {})); + function getExecutionEnvironment() { + if (typeof window !== "undefined") { + return 1 /* Browser */; + } + else { + return 0 /* Node */; + } + } + Utils.getExecutionEnvironment = getExecutionEnvironment; + Utils.currentExecutionEnvironment = getExecutionEnvironment(); + // Thanks to browserify, Buffer is always available nowadays + var Buffer = require("buffer").Buffer; + function encodeString(s) { + return Buffer.from(s).toString("utf8"); + } + Utils.encodeString = encodeString; + function byteLength(s, encoding) { + // stub implementation if Buffer is not available (in-browser case) + return Buffer.byteLength(s, encoding); + } + Utils.byteLength = byteLength; + function evalFile(fileContents, fileName, nodeContext) { + var environment = getExecutionEnvironment(); + switch (environment) { + case 1 /* Browser */: + eval(fileContents); + break; + case 0 /* Node */: + var vm = require("vm"); + if (nodeContext) { + vm.runInNewContext(fileContents, nodeContext, fileName); + } + else { + vm.runInThisContext(fileContents, fileName); + } + break; + default: + throw new Error("Unknown context"); + } + } + Utils.evalFile = evalFile; + /** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ + function splitContentByNewlines(content) { + // Split up the input file by line + // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so + // we have to use string-based splitting instead and try to figure out the delimiting chars + var lines = content.split("\r\n"); + if (lines.length === 1) { + lines = content.split("\n"); + if (lines.length === 1) { + lines = content.split("\r"); + } + } + return lines; + } + Utils.splitContentByNewlines = splitContentByNewlines; + /** Reads a file under /tests */ + function readTestFile(path) { + if (path.indexOf("tests") < 0) { + path = "tests/" + path; + } + var content; + try { + content = Harness.IO.readFile(Harness.userSpecifiedRoot + path); + } + catch (err) { + return undefined; + } + return content; + } + Utils.readTestFile = readTestFile; + function memoize(f, memoKey) { + var cache = ts.createMap(); + return (function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var key = memoKey.apply(void 0, args); + if (cache.has(key)) { + return cache.get(key); + } + else { + var value = f.apply(this, args); + cache.set(key, value); + return value; + } + }); + } + Utils.memoize = memoize; + Utils.canonicalizeForHarness = ts.createGetCanonicalFileName(/*caseSensitive*/ false); // This is done so tests work on windows _and_ linux + function assertInvariants(node, parent) { + if (node) { + assert.isFalse(node.pos < 0, "node.pos < 0"); + assert.isFalse(node.end < 0, "node.end < 0"); + assert.isFalse(node.end < node.pos, "node.end < node.pos"); + assert.equal(node.parent, parent, "node.parent !== parent"); + if (parent) { + // Make sure each child is contained within the parent. + assert.isFalse(node.pos < parent.pos, "node.pos < parent.pos"); + assert.isFalse(node.end > parent.end, "node.end > parent.end"); + } + ts.forEachChild(node, function (child) { + assertInvariants(child, node); + }); + // Make sure each of the children is in order. + var currentPos_1 = 0; + ts.forEachChild(node, function (child) { + assert.isFalse(child.pos < currentPos_1, "child.pos < currentPos"); + currentPos_1 = child.end; + }, function (array) { + assert.isFalse(array.pos < node.pos, "array.pos < node.pos"); + assert.isFalse(array.end > node.end, "array.end > node.end"); + assert.isFalse(array.pos < currentPos_1, "array.pos < currentPos"); + for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { + var item = array_1[_i]; + assert.isFalse(item.pos < currentPos_1, "array[i].pos < currentPos"); + currentPos_1 = item.end; + } + currentPos_1 = array.end; + }); + var childNodesAndArrays_1 = []; + ts.forEachChild(node, function (child) { childNodesAndArrays_1.push(child); }, function (array) { childNodesAndArrays_1.push(array); }); + for (var childName in node) { + if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator" || + // for now ignore jsdoc comments + childName === "jsDocComment" || childName === "checkJsDirective" || childName === "commonJsModuleIndicator") { + continue; + } + var child = node[childName]; + if (isNodeOrArray(child)) { + assert.isFalse(childNodesAndArrays_1.indexOf(child) < 0, "Missing child when forEach'ing over node: " + ts.SyntaxKind[node.kind] + "-" + childName); + } + } + } + } + Utils.assertInvariants = assertInvariants; + function isNodeOrArray(a) { + return a !== undefined && typeof a.pos === "number"; + } + function convertDiagnostics(diagnostics) { + return diagnostics.map(convertDiagnostic); + } + Utils.convertDiagnostics = convertDiagnostics; + function convertDiagnostic(diagnostic) { + return { + start: diagnostic.start, + length: diagnostic.length, + messageText: ts.flattenDiagnosticMessageText(diagnostic.messageText, Harness.IO.newLine()), + category: ts.diagnosticCategoryName(diagnostic, /*lowerCase*/ false), + code: diagnostic.code + }; + } + function sourceFileToJSON(file) { + return JSON.stringify(file, function (_, v) { return isNodeOrArray(v) ? serializeNode(v) : v; }, " "); + function getKindName(k) { + if (ts.isString(k)) { + return k; + } + // For some markers in SyntaxKind, we should print its original syntax name instead of + // the marker name in tests. + if (k === ts.SyntaxKind.FirstJSDocNode || + k === ts.SyntaxKind.LastJSDocNode || + k === ts.SyntaxKind.FirstJSDocTagNode || + k === ts.SyntaxKind.LastJSDocTagNode) { + for (var kindName in ts.SyntaxKind) { + if (ts.SyntaxKind[kindName] === k) { + return kindName; + } + } + } + return ts.SyntaxKind[k]; + } + function getFlagName(flags, f) { + if (f === 0) { + return 0; + } + var result = ""; + ts.forEach(Object.getOwnPropertyNames(flags), function (v) { + if (isFinite(v)) { + v = +v; + if (f === +v) { + result = flags[v]; + return true; + } + else if ((f & v) > 0) { + if (result.length) { + result += " | "; + } + result += flags[v]; + return false; + } + } + }); + return result; + } + function getNodeFlagName(f) { return getFlagName(ts.NodeFlags, f); } + function serializeNode(n) { + var o = { kind: getKindName(n.kind) }; + if (ts.containsParseError(n)) { + o.containsParseError = true; + } + for (var _i = 0, _a = Object.getOwnPropertyNames(n); _i < _a.length; _i++) { + var propertyName = _a[_i]; + switch (propertyName) { + case "parent": + case "symbol": + case "locals": + case "localSymbol": + case "kind": + case "id": + case "nodeCount": + case "symbolCount": + case "identifierCount": + case "scriptSnapshot": + // Blacklist of items we never put in the baseline file. + break; + case "originalKeywordKind": + o[propertyName] = getKindName(n[propertyName]); + break; + case "flags": + // Clear the flags that are produced by aggregating child values. That is ephemeral + // data we don't care about in the dump. We only care what the parser set directly + // on the AST. + var flags = n.flags & ~(65536 /* JavaScriptFile */ | 262144 /* HasAggregatedChildData */); + if (flags) { + o[propertyName] = getNodeFlagName(flags); + } + break; + case "parseDiagnostics": + o[propertyName] = convertDiagnostics(n[propertyName]); + break; + case "nextContainer": + if (n.nextContainer) { + o[propertyName] = { kind: n.nextContainer.kind, pos: n.nextContainer.pos, end: n.nextContainer.end }; + } + break; + case "text": + // Include 'text' field for identifiers/literals, but not for source files. + if (n.kind !== 274 /* SourceFile */) { + o[propertyName] = n[propertyName]; + } + break; + default: + o[propertyName] = n[propertyName]; + } + } + return o; + } + } + Utils.sourceFileToJSON = sourceFileToJSON; + function assertDiagnosticsEquals(array1, array2) { + if (array1 === array2) { + return; + } + assert(array1, "array1"); + assert(array2, "array2"); + assert.equal(array1.length, array2.length, "array1.length !== array2.length"); + for (var i = 0; i < array1.length; i++) { + var d1 = array1[i]; + var d2 = array2[i]; + assert.equal(d1.start, d2.start, "d1.start !== d2.start"); + assert.equal(d1.length, d2.length, "d1.length !== d2.length"); + assert.equal(ts.flattenDiagnosticMessageText(d1.messageText, Harness.IO.newLine()), ts.flattenDiagnosticMessageText(d2.messageText, Harness.IO.newLine()), "d1.messageText !== d2.messageText"); + assert.equal(d1.category, d2.category, "d1.category !== d2.category"); + assert.equal(d1.code, d2.code, "d1.code !== d2.code"); + } + } + Utils.assertDiagnosticsEquals = assertDiagnosticsEquals; + function assertStructuralEquals(node1, node2) { + if (node1 === node2) { + return; + } + assert(node1, "node1"); + assert(node2, "node2"); + assert.equal(node1.pos, node2.pos, "node1.pos !== node2.pos"); + assert.equal(node1.end, node2.end, "node1.end !== node2.end"); + assert.equal(node1.kind, node2.kind, "node1.kind !== node2.kind"); + // call this on both nodes to ensure all propagated flags have been set (and thus can be + // compared). + assert.equal(ts.containsParseError(node1), ts.containsParseError(node2)); + assert.equal(node1.flags & ~1408 /* ReachabilityAndEmitFlags */, node2.flags & ~1408 /* ReachabilityAndEmitFlags */, "node1.flags !== node2.flags"); + ts.forEachChild(node1, function (child1) { + var childName = findChildName(node1, child1); + var child2 = node2[childName]; + assertStructuralEquals(child1, child2); + }, function (array1) { + var childName = findChildName(node1, array1); + var array2 = node2[childName]; + assertArrayStructuralEquals(array1, array2); + }); + } + Utils.assertStructuralEquals = assertStructuralEquals; + function assertArrayStructuralEquals(array1, array2) { + if (array1 === array2) { + return; + } + assert(array1, "array1"); + assert(array2, "array2"); + assert.equal(array1.pos, array2.pos, "array1.pos !== array2.pos"); + assert.equal(array1.end, array2.end, "array1.end !== array2.end"); + assert.equal(array1.length, array2.length, "array1.length !== array2.length"); + for (var i = 0; i < array1.length; i++) { + assertStructuralEquals(array1[i], array2[i]); + } + } + function findChildName(parent, child) { + for (var name in parent) { + if (parent.hasOwnProperty(name) && parent[name] === child) { + return name; + } + } + throw new Error("Could not find child in parent"); + } + var maxHarnessFrames = 1; + function filterStack(error, stackTraceLimit) { + if (stackTraceLimit === void 0) { stackTraceLimit = Infinity; } + var stack = error.stack; + if (stack) { + var lines = stack.split(/\r\n?|\n/g); + var filtered = []; + var frameCount = 0; + var harnessFrameCount = 0; + for (var _i = 0, lines_2 = lines; _i < lines_2.length; _i++) { + var line = lines_2[_i]; + if (isStackFrame(line)) { + if (frameCount >= stackTraceLimit + || isMocha(line) + || isNode(line)) { + continue; + } + if (isHarness(line)) { + if (harnessFrameCount >= maxHarnessFrames) { + continue; + } + harnessFrameCount++; + } + line = line.replace(/\bfile:\/\/\/(.*?)(?=(:\d+)*($|\)))/, function (_, path) { return ts.sys.resolvePath(path); }); + frameCount++; + } + filtered.push(line); + } + error.stack = filtered.join(Harness.IO.newLine()); + } + return error; + } + Utils.filterStack = filterStack; + function isStackFrame(line) { + return /^\s+at\s/.test(line); + } + function isMocha(line) { + return /[\\/](node_modules|components)[\\/]mocha(js)?[\\/]|[\\/]mocha\.js/.test(line); + } + function isNode(line) { + return /\((timers|events|node|module)\.js:/.test(line); + } + function isHarness(line) { + return /[\\/]src[\\/]harness[\\/]|[\\/]run\.js/.test(line); + } +})(Utils || (Utils = {})); +var Harness; +(function (Harness) { + // harness always uses one kind of new line + // But note that `parseTestData` in `fourslash.ts` uses "\n" + Harness.harnessNewLine = "\r\n"; + // Root for file paths that are stored in a virtual file system + Harness.virtualFileSystemRoot = "/"; + function createNodeIO() { + var fs, pathModule; + if (require) { + fs = require("fs"); + pathModule = require("path"); + } + else { + fs = pathModule = {}; + } + function deleteFile(path) { + try { + fs.unlinkSync(path); + } + catch ( /*ignore*/_a) { /*ignore*/ } + } + function directoryName(path) { + var dirPath = pathModule.dirname(path); + // Node will just continue to repeat the root path, rather than return null + return dirPath === path ? undefined : dirPath; + } + function enumerateTestFiles(runner) { + return runner.enumerateTestFiles(); + } + function listFiles(path, spec, options) { + if (options === void 0) { options = {}; } + function filesInFolder(folder) { + var paths = []; + for (var _i = 0, _a = fs.readdirSync(folder); _i < _a.length; _i++) { + var file = _a[_i]; + var pathToFile = pathModule.join(folder, file); + var stat = fs.statSync(pathToFile); + if (options.recursive && stat.isDirectory()) { + paths = paths.concat(filesInFolder(pathToFile)); + } + else if (stat.isFile() && (!spec || file.match(spec))) { + paths.push(pathToFile); + } + } + return paths; + } + return filesInFolder(path); + } + function getAccessibleFileSystemEntries(dirname) { + try { + var entries = fs.readdirSync(dirname || ".").sort(ts.sys.useCaseSensitiveFileNames ? ts.compareStringsCaseSensitive : ts.compareStringsCaseInsensitive); + var files = []; + var directories = []; + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var entry = entries_1[_i]; + if (entry === "." || entry === "..") + continue; + var name = vpath.combine(dirname, entry); + try { + var stat = fs.statSync(name); + if (!stat) + continue; + if (stat.isFile()) { + files.push(entry); + } + else if (stat.isDirectory()) { + directories.push(entry); + } + } + catch ( /*ignore*/_a) { /*ignore*/ } + } + return { files: files, directories: directories }; + } + catch (e) { + return { files: [], directories: [] }; + } + } + function createDirectory(path) { + try { + fs.mkdirSync(path); + } + catch (e) { + if (e.code === "ENOENT") { + createDirectory(vpath.dirname(path)); + createDirectory(path); + } + else if (!ts.sys.directoryExists(path)) { + throw e; + } + } + } + return { + newLine: function () { return Harness.harnessNewLine; }, + getCurrentDirectory: function () { return ts.sys.getCurrentDirectory(); }, + useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; }, + resolvePath: function (path) { return ts.sys.resolvePath(path); }, + getFileSize: function (path) { return ts.sys.getFileSize(path); }, + readFile: function (path) { return ts.sys.readFile(path); }, + writeFile: function (path, content) { return ts.sys.writeFile(path, content); }, + directoryName: directoryName, + getDirectories: function (path) { return ts.sys.getDirectories(path); }, + createDirectory: createDirectory, + fileExists: function (path) { return ts.sys.fileExists(path); }, + directoryExists: function (path) { return ts.sys.directoryExists(path); }, + deleteFile: deleteFile, + listFiles: listFiles, + enumerateTestFiles: enumerateTestFiles, + log: function (s) { return console.log(s); }, + args: function () { return ts.sys.args; }, + getExecutingFilePath: function () { return ts.sys.getExecutingFilePath(); }, + getWorkspaceRoot: function () { return vpath.resolve(__dirname, "../.."); }, + exit: function (exitCode) { return ts.sys.exit(exitCode); }, + readDirectory: function (path, extension, exclude, include, depth) { return ts.sys.readDirectory(path, extension, exclude, include, depth); }, + getAccessibleFileSystemEntries: getAccessibleFileSystemEntries, + tryEnableSourceMapsForHost: function () { return ts.sys.tryEnableSourceMapsForHost && ts.sys.tryEnableSourceMapsForHost(); }, + getMemoryUsage: function () { return ts.sys.getMemoryUsage && ts.sys.getMemoryUsage(); }, + getEnvironmentVariable: function (name) { return ts.sys.getEnvironmentVariable(name); }, + }; + } + function createBrowserIO() { + var serverRoot = new URL("http://localhost:8888/"); + var HttpHeaders = /** @class */ (function (_super) { + __extends(HttpHeaders, _super); + function HttpHeaders(template) { + var _this = _super.call(this, ts.compareStringsCaseInsensitive) || this; + if (template) { + for (var key in template) { + if (ts.hasProperty(template, key)) { + _this.set(key, template[key]); + } + } + } + return _this; + } + HttpHeaders.combine = function (left, right) { + if (!left && !right) + return undefined; + var headers = new HttpHeaders(); + if (left) + left.forEach(function (value, key) { headers.set(key, value); }); + if (right) + right.forEach(function (value, key) { headers.set(key, value); }); + return headers; + }; + HttpHeaders.prototype.has = function (key) { + return _super.prototype.has.call(this, key.toLowerCase()); + }; + HttpHeaders.prototype.get = function (key) { + return _super.prototype.get.call(this, key.toLowerCase()); + }; + HttpHeaders.prototype.set = function (key, value) { + return _super.prototype.set.call(this, key.toLowerCase(), value); + }; + HttpHeaders.prototype.delete = function (key) { + return _super.prototype.delete.call(this, key.toLowerCase()); + }; + HttpHeaders.prototype.writeRequestHeaders = function (xhr) { + this.forEach(function (values, key) { + if (key === "access-control-allow-origin" || key === "content-length") + return; + var value = Array.isArray(values) ? values.join(",") : values; + if (key === "content-type") { + xhr.overrideMimeType(value); + return; + } + xhr.setRequestHeader(key, value); + }); + }; + HttpHeaders.readResponseHeaders = function (xhr) { + var allHeaders = xhr.getAllResponseHeaders(); + var headers = new HttpHeaders(); + for (var _i = 0, _a = allHeaders.split(/\r\n/g); _i < _a.length; _i++) { + var header = _a[_i]; + var colonIndex = header.indexOf(":"); + if (colonIndex >= 0) { + var key = header.slice(0, colonIndex).trim(); + var value = header.slice(colonIndex + 1).trim(); + var values = value.split(","); + headers.set(key, values.length > 1 ? values : value); + } + } + return headers; + }; + return HttpHeaders; + }(collections.SortedMap)); + var HttpContent = /** @class */ (function () { + function HttpContent(headers, content) { + this.headers = headers instanceof HttpHeaders ? headers : new HttpHeaders(headers); + this.content = content; + } + HttpContent.fromMediaType = function (mediaType, content) { + return new HttpContent({ "Content-Type": mediaType }, content); + }; + HttpContent.text = function (content) { + return HttpContent.fromMediaType("text/plain", content); + }; + HttpContent.json = function (content) { + return HttpContent.fromMediaType("application/json", JSON.stringify(content)); + }; + HttpContent.readResponseContent = function (xhr) { + if (typeof xhr.responseText === "string") { + return new HttpContent({ + "Content-Type": xhr.getResponseHeader("Content-Type") || undefined, + "Content-Length": xhr.getResponseHeader("Content-Length") || undefined, + }, xhr.responseText); + } + return undefined; + }; + HttpContent.prototype.writeRequestHeaders = function (xhr) { + this.headers.writeRequestHeaders(xhr); + }; + return HttpContent; + }()); + var HttpRequestMessage = /** @class */ (function () { + function HttpRequestMessage(method, url, headers, content) { + this.method = method; + this.url = typeof url === "string" ? new URL(url) : url; + this.headers = headers instanceof HttpHeaders ? headers : new HttpHeaders(headers); + this.content = content; + } + HttpRequestMessage.options = function (url) { + return new HttpRequestMessage("OPTIONS", url); + }; + HttpRequestMessage.head = function (url) { + return new HttpRequestMessage("HEAD", url); + }; + HttpRequestMessage.get = function (url) { + return new HttpRequestMessage("GET", url); + }; + HttpRequestMessage.delete = function (url) { + return new HttpRequestMessage("DELETE", url); + }; + HttpRequestMessage.put = function (url, content) { + return new HttpRequestMessage("PUT", url, /*headers*/ undefined, content); + }; + HttpRequestMessage.post = function (url, content) { + return new HttpRequestMessage("POST", url, /*headers*/ undefined, content); + }; + HttpRequestMessage.prototype.writeRequestHeaders = function (xhr) { + this.headers.writeRequestHeaders(xhr); + if (this.content) { + this.content.writeRequestHeaders(xhr); + } + }; + return HttpRequestMessage; + }()); + var HttpResponseMessage = /** @class */ (function () { + function HttpResponseMessage(statusCode, statusMessage, headers, content) { + this.statusCode = statusCode; + this.statusMessage = statusMessage; + this.headers = headers instanceof HttpHeaders ? headers : new HttpHeaders(headers); + this.content = content; + } + HttpResponseMessage.notFound = function () { + return new HttpResponseMessage(404, "Not Found"); + }; + HttpResponseMessage.hasSuccessStatusCode = function (response) { + return response.statusCode === 304 || (response.statusCode >= 200 && response.statusCode < 300); + }; + HttpResponseMessage.readResponseMessage = function (xhr) { + return new HttpResponseMessage(xhr.status, xhr.statusText, HttpHeaders.readResponseHeaders(xhr), HttpContent.readResponseContent(xhr)); + }; + return HttpResponseMessage; + }()); + function send(request) { + var xhr = new XMLHttpRequest(); + try { + xhr.open(request.method, request.url.toString(), /*async*/ false); + request.writeRequestHeaders(xhr); + xhr.setRequestHeader("Access-Control-Allow-Origin", "*"); + xhr.send(request.content && request.content.content); + while (xhr.readyState !== 4) + ; // block until ready + return HttpResponseMessage.readResponseMessage(xhr); + } + catch (e) { + return HttpResponseMessage.notFound(); + } + } + var caseSensitivity; + function useCaseSensitiveFileNames() { + if (!caseSensitivity) { + var response = send(HttpRequestMessage.options(new URL("*", serverRoot))); + var xCaseSensitivity = response.headers.get("X-Case-Sensitivity"); + caseSensitivity = xCaseSensitivity === "CS" ? "CS" : "CI"; + } + return caseSensitivity === "CS"; + } + function resolvePath(path) { + var response = send(HttpRequestMessage.post(new URL("/api/resolve", serverRoot), HttpContent.text(path))); + return HttpResponseMessage.hasSuccessStatusCode(response) && response.content ? response.content.content : undefined; + } + function getFileSize(path) { + var response = send(HttpRequestMessage.head(new URL(path, serverRoot))); + return HttpResponseMessage.hasSuccessStatusCode(response) ? +response.headers.get("Content-Length").toString() : 0; + } + function readFile(path) { + var response = send(HttpRequestMessage.get(new URL(path, serverRoot))); + return HttpResponseMessage.hasSuccessStatusCode(response) && response.content ? response.content.content : undefined; + } + function writeFile(path, contents) { + send(HttpRequestMessage.put(new URL(path, serverRoot), HttpContent.text(contents))); + } + function fileExists(path) { + var response = send(HttpRequestMessage.head(new URL(path, serverRoot))); + return HttpResponseMessage.hasSuccessStatusCode(response); + } + function directoryExists(path) { + var response = send(HttpRequestMessage.post(new URL("/api/directoryExists", serverRoot), HttpContent.text(path))); + return hasJsonContent(response) && JSON.parse(response.content.content); + } + function deleteFile(path) { + send(HttpRequestMessage.delete(new URL(path, serverRoot))); + } + function directoryName(path) { + var url = new URL(path, serverRoot); + return ts.getDirectoryPath(ts.normalizeSlashes(url.pathname || "/")); + } + function enumerateTestFiles(runner) { + var response = send(HttpRequestMessage.post(new URL("/api/enumerateTestFiles", serverRoot), HttpContent.text(runner.kind()))); + return hasJsonContent(response) ? JSON.parse(response.content.content) : []; + } + function listFiles(dirname, spec, options) { + if (spec || (options && !options.recursive)) { + var results = Harness.IO.listFiles(dirname); + if (spec) { + results = results.filter(function (file) { return spec.test(file); }); + } + if (options && !options.recursive) { + results = results.filter(function (file) { return ts.getDirectoryPath(ts.normalizeSlashes(file)) === dirname; }); + } + return results; + } + var response = send(HttpRequestMessage.post(new URL("/api/listFiles", serverRoot), HttpContent.text(dirname))); + return hasJsonContent(response) ? JSON.parse(response.content.content) : []; + } + function readDirectory(path, extension, exclude, include, depth) { + return ts.matchFiles(path, extension, exclude, include, useCaseSensitiveFileNames(), "", depth, getAccessibleFileSystemEntries); + } + function getAccessibleFileSystemEntries(dirname) { + var response = send(HttpRequestMessage.post(new URL("/api/getAccessibleFileSystemEntries", serverRoot), HttpContent.text(dirname))); + return hasJsonContent(response) ? JSON.parse(response.content.content) : { files: [], directories: [] }; + } + function hasJsonContent(response) { + return HttpResponseMessage.hasSuccessStatusCode(response) + && !!response.content + && /^application\/json(;.*)$/.test("" + response.content.headers.get("Content-Type")); + } + return { + newLine: function () { return Harness.harnessNewLine; }, + getCurrentDirectory: function () { return ""; }, + useCaseSensitiveFileNames: useCaseSensitiveFileNames, + resolvePath: resolvePath, + getFileSize: getFileSize, + readFile: readFile, + writeFile: writeFile, + directoryName: Utils.memoize(directoryName, function (path) { return path; }), + getDirectories: function () { return []; }, + createDirectory: function () { }, + fileExists: fileExists, + directoryExists: directoryExists, + deleteFile: deleteFile, + listFiles: Utils.memoize(listFiles, function (path, spec, options) { return path + "|" + spec + "|" + (options ? options.recursive === true : true); }), + enumerateTestFiles: Utils.memoize(enumerateTestFiles, function (runner) { return runner.kind(); }), + log: function (s) { return console.log(s); }, + args: function () { return []; }, + getExecutingFilePath: function () { return ""; }, + exit: function () { }, + readDirectory: readDirectory, + getAccessibleFileSystemEntries: getAccessibleFileSystemEntries, + getWorkspaceRoot: function () { return "/"; } + }; + } + function mockHash(s) { + return "hash-" + s; + } + Harness.mockHash = mockHash; + var environment = Utils.getExecutionEnvironment(); + switch (environment) { + case 0 /* Node */: + Harness.IO = createNodeIO(); + break; + case 1 /* Browser */: + Harness.IO = createBrowserIO(); + break; + default: + throw new Error("Unknown value '" + environment + "' for ExecutionEnvironment."); + } +})(Harness || (Harness = {})); +if (Harness.IO.tryEnableSourceMapsForHost && /^development$/i.test(Harness.IO.getEnvironmentVariable("NODE_ENV"))) { + Harness.IO.tryEnableSourceMapsForHost(); +} +(function (Harness) { + Harness.libFolder = "built/local/"; + var tcServicesFileName = ts.combinePaths(Harness.libFolder, Utils.getExecutionEnvironment() === 1 /* Browser */ ? "typescriptServicesInBrowserTest.js" : "typescriptServices.js"); + Harness.tcServicesFile = Harness.IO.readFile(tcServicesFileName) + (Utils.getExecutionEnvironment() !== 1 /* Browser */ + ? Harness.IO.newLine() + ("//# sourceURL=" + Harness.IO.resolvePath(tcServicesFileName)) + : ""); + // Settings + Harness.userSpecifiedRoot = ""; + Harness.lightMode = false; + /** Functionality for compiling TypeScript code */ + var Compiler; + (function (Compiler) { + /** Aggregate various writes into a single array of lines. Useful for passing to the + * TypeScript compiler to fill with source code or errors. + */ + var WriterAggregator = /** @class */ (function () { + function WriterAggregator() { + this.lines = []; + this.currentLine = undefined; + } + WriterAggregator.prototype.Write = function (str) { + // out of memory usage concerns avoid using + or += if we're going to do any manipulation of this string later + this.currentLine = [(this.currentLine || ""), str].join(""); + }; + WriterAggregator.prototype.WriteLine = function (str) { + // out of memory usage concerns avoid using + or += if we're going to do any manipulation of this string later + this.lines.push([(this.currentLine || ""), str].join("")); + this.currentLine = undefined; + }; + WriterAggregator.prototype.Close = function () { + if (this.currentLine !== undefined) { + this.lines.push(this.currentLine); + } + this.currentLine = undefined; + }; + WriterAggregator.prototype.reset = function () { + this.lines = []; + this.currentLine = undefined; + }; + return WriterAggregator; + }()); + Compiler.WriterAggregator = WriterAggregator; + function createSourceFileAndAssertInvariants(fileName, sourceText, languageVersion) { + // We'll only assert invariants outside of light mode. + var shouldAssertInvariants = !Harness.lightMode; + // Only set the parent nodes if we're asserting invariants. We don't need them otherwise. + var result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldAssertInvariants); + if (shouldAssertInvariants) { + Utils.assertInvariants(result, /*parent:*/ undefined); + } + return result; + } + Compiler.createSourceFileAndAssertInvariants = createSourceFileAndAssertInvariants; + Compiler.defaultLibFileName = "lib.d.ts"; + Compiler.es2015DefaultLibFileName = "lib.es2015.d.ts"; + // Cache of lib files from "built/local" + var libFileNameSourceFileMap; + function getDefaultLibrarySourceFile(fileName) { + if (fileName === void 0) { fileName = Compiler.defaultLibFileName; } + var _a; + if (!isDefaultLibraryFile(fileName)) { + return undefined; + } + if (!libFileNameSourceFileMap) { + libFileNameSourceFileMap = ts.createMapFromTemplate((_a = {}, + _a[Compiler.defaultLibFileName] = createSourceFileAndAssertInvariants(Compiler.defaultLibFileName, Harness.IO.readFile(Harness.libFolder + "lib.es5.d.ts"), /*languageVersion*/ 6 /* Latest */), + _a)); + } + var sourceFile = libFileNameSourceFileMap.get(fileName); + if (!sourceFile) { + libFileNameSourceFileMap.set(fileName, sourceFile = createSourceFileAndAssertInvariants(fileName, Harness.IO.readFile(Harness.libFolder + fileName), 6 /* Latest */)); + } + return sourceFile; + } + Compiler.getDefaultLibrarySourceFile = getDefaultLibrarySourceFile; + function getDefaultLibFileName(options) { + switch (options.target) { + case 6 /* ESNext */: + case 4 /* ES2017 */: + return "lib.es2017.d.ts"; + case 3 /* ES2016 */: + return "lib.es2016.d.ts"; + case 2 /* ES2015 */: + return Compiler.es2015DefaultLibFileName; + default: + return Compiler.defaultLibFileName; + } + } + Compiler.getDefaultLibFileName = getDefaultLibFileName; + // Cache these between executions so we don't have to re-parse them for every test + Compiler.fourslashFileName = "fourslash.ts"; + function getCanonicalFileName(fileName) { + return fileName; + } + Compiler.getCanonicalFileName = getCanonicalFileName; + // Additional options not already in ts.optionDeclarations + var harnessOptionDeclarations = [ + { name: "allowNonTsExtensions", type: "boolean" }, + { name: "useCaseSensitiveFileNames", type: "boolean" }, + { name: "baselineFile", type: "string" }, + { name: "includeBuiltFile", type: "string" }, + { name: "fileName", type: "string" }, + { name: "libFiles", type: "string" }, + { name: "noErrorTruncation", type: "boolean" }, + { name: "suppressOutputPathCheck", type: "boolean" }, + { name: "noImplicitReferences", type: "boolean" }, + { name: "currentDirectory", type: "string" }, + { name: "symlink", type: "string" }, + // Emitted js baseline will print full paths for every output file + { name: "fullEmitPaths", type: "boolean" } + ]; + var optionsIndex; + function getCommandLineOption(name) { + if (!optionsIndex) { + optionsIndex = ts.createMap(); + var optionDeclarations = harnessOptionDeclarations.concat(ts.optionDeclarations); + for (var _i = 0, optionDeclarations_1 = optionDeclarations; _i < optionDeclarations_1.length; _i++) { + var option = optionDeclarations_1[_i]; + optionsIndex.set(option.name.toLowerCase(), option); + } + } + return optionsIndex.get(name.toLowerCase()); + } + function setCompilerOptionsFromHarnessSetting(settings, options) { + for (var name in settings) { + if (settings.hasOwnProperty(name)) { + var value = settings[name]; + if (value === undefined) { + throw new Error("Cannot have undefined value for compiler option '" + name + "'."); + } + var option = getCommandLineOption(name); + if (option) { + var errors = []; + options[option.name] = optionValue(option, value, errors); + if (errors.length > 0) { + throw new Error("Unknown value '" + value + "' for compiler option '" + name + "'."); + } + } + else { + throw new Error("Unknown compiler option '" + name + "'."); + } + } + } + } + Compiler.setCompilerOptionsFromHarnessSetting = setCompilerOptionsFromHarnessSetting; + function optionValue(option, value, errors) { + switch (option.type) { + case "boolean": + return value.toLowerCase() === "true"; + case "string": + return value; + case "number": { + var numverValue = parseInt(value, 10); + if (isNaN(numverValue)) { + throw new Error("Value must be a number, got: " + JSON.stringify(value)); + } + return numverValue; + } + // If not a primitive, the possible types are specified in what is effectively a map of options. + case "list": + return ts.parseListTypeOption(option, value, errors); + default: + return ts.parseCustomTypeOption(option, value, errors); + } + } + function compileFiles(inputFiles, otherFiles, harnessSettings, compilerOptions, + // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file + currentDirectory) { + var options = compilerOptions ? ts.cloneCompilerOptions(compilerOptions) : { noResolve: false }; + options.target = options.target || 0 /* ES3 */; + options.newLine = options.newLine || 0 /* CarriageReturnLineFeed */; + options.noErrorTruncation = true; + options.skipDefaultLibCheck = typeof options.skipDefaultLibCheck === "undefined" ? true : options.skipDefaultLibCheck; + if (typeof currentDirectory === "undefined") { + currentDirectory = vfs.srcFolder; + } + // Parse settings + if (harnessSettings) { + setCompilerOptionsFromHarnessSetting(harnessSettings, options); + } + if (options.rootDirs) { + options.rootDirs = ts.map(options.rootDirs, function (d) { return ts.getNormalizedAbsolutePath(d, currentDirectory); }); + } + var useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : true; + var programFileNames = inputFiles.map(function (file) { return file.unitName; }).filter(function (fileName) { return !ts.fileExtensionIs(fileName, ".json" /* Json */); }); + // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. + // Treat them as library files, so include them in build, but not in baselines. + if (options.includeBuiltFile) { + programFileNames.push(vpath.combine(vfs.builtFolder, options.includeBuiltFile)); + } + // Files from tests\lib that are requested by "@libFiles" + if (options.libFiles) { + for (var _i = 0, _a = options.libFiles.split(","); _i < _a.length; _i++) { + var fileName = _a[_i]; + programFileNames.push(vpath.combine(vfs.testLibFolder, fileName)); + } + } + var docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile); + var fs = vfs.createFromFileSystem(Harness.IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory }); + var host = new fakes.CompilerHost(fs, options); + return compiler.compileFiles(host, programFileNames, options); + } + Compiler.compileFiles = compileFiles; + function prepareDeclarationCompilationContext(inputFiles, otherFiles, result, harnessSettings, options, + // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file + currentDirectory) { + if (options.declaration && result.diagnostics.length === 0) { + if (options.emitDeclarationOnly) { + if (result.js.size > 0 || result.dts.size === 0) { + throw new Error("Only declaration files should be generated when emitDeclarationOnly:true"); + } + } + else if (result.dts.size !== result.getNumberOfJsFiles()) { + throw new Error("There were no errors and declFiles generated did not match number of js files generated"); + } + } + var declInputFiles = []; + var declOtherFiles = []; + // if the .d.ts is non-empty, confirm it compiles correctly as well + if (options.declaration && result.diagnostics.length === 0 && result.dts.size > 0) { + ts.forEach(inputFiles, function (file) { return addDtsFile(file, declInputFiles); }); + ts.forEach(otherFiles, function (file) { return addDtsFile(file, declOtherFiles); }); + return { declInputFiles: declInputFiles, declOtherFiles: declOtherFiles, harnessSettings: harnessSettings, options: options, currentDirectory: currentDirectory || harnessSettings.currentDirectory }; + } + function addDtsFile(file, dtsFiles) { + if (vpath.isDeclaration(file.unitName)) { + dtsFiles.push(file); + } + else if (vpath.isTypeScript(file.unitName)) { + var declFile = findResultCodeFile(file.unitName); + if (declFile && !findUnit(declFile.file, declInputFiles) && !findUnit(declFile.file, declOtherFiles)) { + dtsFiles.push({ unitName: declFile.file, content: utils.removeByteOrderMark(declFile.text) }); + } + } + } + function findResultCodeFile(fileName) { + var sourceFile = result.program.getSourceFile(fileName); + assert(sourceFile, "Program has no source file with name '" + fileName + "'"); + // Is this file going to be emitted separately + var sourceFileName; + var outFile = options.outFile || options.out; + if (!outFile) { + if (options.outDir) { + var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, result.vfs.cwd()); + sourceFilePath = sourceFilePath.replace(result.program.getCommonSourceDirectory(), ""); + sourceFileName = ts.combinePaths(options.outDir, sourceFilePath); + } + else { + sourceFileName = sourceFile.fileName; + } + } + else { + // Goes to single --out file + sourceFileName = outFile; + } + var dTsFileName = ts.removeFileExtension(sourceFileName) + ".d.ts" /* Dts */; + return result.dts.get(dTsFileName); + } + function findUnit(fileName, units) { + return ts.forEach(units, function (unit) { return unit.unitName === fileName ? unit : undefined; }); + } + } + Compiler.prepareDeclarationCompilationContext = prepareDeclarationCompilationContext; + function compileDeclarationFiles(context) { + if (!context) { + return; + } + var declInputFiles = context.declInputFiles, declOtherFiles = context.declOtherFiles, harnessSettings = context.harnessSettings, options = context.options, currentDirectory = context.currentDirectory; + var output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory); + return { declInputFiles: declInputFiles, declOtherFiles: declOtherFiles, declResult: output }; + } + Compiler.compileDeclarationFiles = compileDeclarationFiles; + function minimalDiagnosticsToString(diagnostics, pretty) { + var host = { getCanonicalFileName: getCanonicalFileName, getCurrentDirectory: function () { return ""; }, getNewLine: function () { return Harness.IO.newLine(); } }; + return (pretty ? ts.formatDiagnosticsWithColorAndContext : ts.formatDiagnostics)(diagnostics, host); + } + Compiler.minimalDiagnosticsToString = minimalDiagnosticsToString; + function getErrorBaseline(inputFiles, diagnostics, pretty) { + var _a; + var outputLines = ""; + var gen = iterateErrorBaseline(inputFiles, diagnostics, { pretty: pretty }); + for (var _b = gen.next(), done = _b.done, value = _b.value; !done; _a = gen.next(), done = _a.done, value = _a.value, _a) { + var content = value[1]; + outputLines += content; + } + return outputLines; + } + Compiler.getErrorBaseline = getErrorBaseline; + Compiler.diagnosticSummaryMarker = "__diagnosticSummary"; + Compiler.globalErrorsMarker = "__globalErrors"; + function iterateErrorBaseline(inputFiles, diagnostics, options) { + function newLine() { + if (firstLine) { + firstLine = false; + return ""; + } + return "\r\n"; + } + function outputErrorText(error) { + var message = ts.flattenDiagnosticMessageText(error.messageText, Harness.IO.newLine()); + var errLines = utils.removeTestPathPrefixes(message) + .split("\n") + .map(function (s) { return s.length > 0 && s.charAt(s.length - 1) === "\r" ? s.substr(0, s.length - 1) : s; }) + .filter(function (s) { return s.length > 0; }) + .map(function (s) { return "!!! " + ts.diagnosticCategoryName(error) + " TS" + error.code + ": " + s; }); + errLines.forEach(function (e) { return outputLines += (newLine() + e); }); + errorsReported++; + // do not count errors from lib.d.ts here, they are computed separately as numLibraryDiagnostics + // if lib.d.ts is explicitly included in input files and there are some errors in it (i.e. because of duplicate identifiers) + // then they will be added twice thus triggering 'total errors' assertion with condition + // 'totalErrorsReportedInNonLibraryFiles + numLibraryDiagnostics + numTest262HarnessDiagnostics, diagnostics.length + if (!error.file || !isDefaultLibraryFile(error.file.fileName)) { + totalErrorsReportedInNonLibraryFiles++; + } + } + var outputLines, totalErrorsReportedInNonLibraryFiles, errorsReported, firstLine, globalErrors, dupeCase, _loop_1, _i, _a, inputFile, numLibraryDiagnostics, numTest262HarnessDiagnostics; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + diagnostics = ts.sort(diagnostics, ts.compareDiagnostics); + outputLines = ""; + totalErrorsReportedInNonLibraryFiles = 0; + errorsReported = 0; + firstLine = true; + return [4 /*yield*/, [Compiler.diagnosticSummaryMarker, utils.removeTestPathPrefixes(minimalDiagnosticsToString(diagnostics, options && options.pretty)) + Harness.IO.newLine() + Harness.IO.newLine(), diagnostics.length]]; + case 1: + _b.sent(); + globalErrors = diagnostics.filter(function (err) { return !err.file; }); + globalErrors.forEach(outputErrorText); + return [4 /*yield*/, [Compiler.globalErrorsMarker, outputLines, errorsReported]]; + case 2: + _b.sent(); + outputLines = ""; + errorsReported = 0; + dupeCase = ts.createMap(); + _loop_1 = function (inputFile) { + var fileErrors, markedErrorCount, lineStarts, lines, isDupe; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + fileErrors = diagnostics.filter(function (e) { + var errFn = e.file; + return !!errFn && ts.comparePaths(utils.removeTestPathPrefixes(errFn.fileName), utils.removeTestPathPrefixes(inputFile.unitName), options && options.currentDirectory || "", !(options && options.caseSensitive)) === 0 /* EqualTo */; + }); + // Header + outputLines += (newLine() + "==== " + inputFile.unitName + " (" + fileErrors.length + " errors) ===="); + markedErrorCount = 0; + lineStarts = ts.computeLineStarts(inputFile.content); + lines = inputFile.content.split("\n"); + if (lines.length === 1) { + lines = lines[0].split("\r"); + } + lines.forEach(function (line, lineIndex) { + if (line.length > 0 && line.charAt(line.length - 1) === "\r") { + line = line.substr(0, line.length - 1); + } + var thisLineStart = lineStarts[lineIndex]; + var nextLineStart; + // On the last line of the file, fake the next line start number so that we handle errors on the last character of the file correctly + if (lineIndex === lines.length - 1) { + nextLineStart = inputFile.content.length; + } + else { + nextLineStart = lineStarts[lineIndex + 1]; + } + // Emit this line from the original file + outputLines += (newLine() + " " + line); + fileErrors.forEach(function (errDiagnostic) { + var err = errDiagnostic; // TODO: GH#18217 + // Does any error start or continue on to this line? Emit squiggles + var end = ts.textSpanEnd(err); + if ((end >= thisLineStart) && ((err.start < nextLineStart) || (lineIndex === lines.length - 1))) { + // How many characters from the start of this line the error starts at (could be positive or negative) + var relativeOffset = err.start - thisLineStart; + // How many characters of the error are on this line (might be longer than this line in reality) + var length = (end - err.start) - Math.max(0, thisLineStart - err.start); + // Calculate the start of the squiggle + var squiggleStart = Math.max(0, relativeOffset); + // TODO/REVIEW: this doesn't work quite right in the browser if a multi file test has files whose names are just the right length relative to one another + outputLines += (newLine() + " " + line.substr(0, squiggleStart).replace(/[^\s]/g, " ") + new Array(Math.min(length, line.length - squiggleStart) + 1).join("~")); + // If the error ended here, or we're at the end of the file, emit its message + if ((lineIndex === lines.length - 1) || nextLineStart > end) { + // Just like above, we need to do a split on a string instead of on a regex + // because the JS engine does regexes wrong + outputErrorText(errDiagnostic); + markedErrorCount++; + } + } + }); + }); + // Verify we didn't miss any errors in this file + assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName); + isDupe = dupeCase.has(sanitizeTestFilePath(inputFile.unitName)); + return [4 /*yield*/, [checkDuplicatedFileName(inputFile.unitName, dupeCase), outputLines, errorsReported]]; + case 1: + _a.sent(); + if (isDupe && !(options && options.caseSensitive)) { + // Case-duplicated files on a case-insensitive build will have errors reported in both the dupe and the original + // thanks to the canse-insensitive path comparison on the error file path - We only want to count those errors once + // for the assert below, so we subtract them here. + totalErrorsReportedInNonLibraryFiles -= errorsReported; + } + outputLines = ""; + errorsReported = 0; + return [2 /*return*/]; + } + }); + }; + _i = 0, _a = inputFiles.filter(function (f) { return f.content !== undefined; }); + _b.label = 3; + case 3: + if (!(_i < _a.length)) return [3 /*break*/, 6]; + inputFile = _a[_i]; + return [5 /*yield**/, _loop_1(inputFile)]; + case 4: + _b.sent(); + _b.label = 5; + case 5: + _i++; + return [3 /*break*/, 3]; + case 6: + numLibraryDiagnostics = ts.countWhere(diagnostics, function (diagnostic) { + return !!diagnostic.file && (isDefaultLibraryFile(diagnostic.file.fileName) || isBuiltFile(diagnostic.file.fileName)); + }); + numTest262HarnessDiagnostics = ts.countWhere(diagnostics, function (diagnostic) { + // Count an error generated from tests262-harness folder.This should only apply for test262 + return !!diagnostic.file && diagnostic.file.fileName.indexOf("test262-harness") >= 0; + }); + // Verify we didn't miss any errors in total + assert.equal(totalErrorsReportedInNonLibraryFiles + numLibraryDiagnostics + numTest262HarnessDiagnostics, diagnostics.length, "total number of errors"); + return [2 /*return*/]; + } + }); + } + Compiler.iterateErrorBaseline = iterateErrorBaseline; + function doErrorBaseline(baselinePath, inputFiles, errors, pretty) { + Baseline.runBaseline(baselinePath.replace(/\.tsx?$/, ".errors.txt"), function () { + if (!errors || (errors.length === 0)) { + /* tslint:disable:no-null-keyword */ + return null; + /* tslint:enable:no-null-keyword */ + } + return getErrorBaseline(inputFiles, errors, pretty); + }); + } + Compiler.doErrorBaseline = doErrorBaseline; + function doTypeAndSymbolBaseline(baselinePath, program, allFiles, opts, multifile, skipTypeBaselines, skipSymbolBaselines) { + // The full walker simulates the types that you would get from doing a full + // compile. The pull walker simulates the types you get when you just do + // a type query for a random node (like how the LS would do it). Most of the + // time, these will be the same. However, occasionally, they can be different. + // Specifically, when the compiler internally depends on symbol IDs to order + // things, then we may see different results because symbols can be created in a + // different order with 'pull' operations, and thus can produce slightly differing + // output. + // + // For example, with a full type check, we may see a type displayed as: number | string + // But with a pull type check, we may see it as: string | number + // + // These types are equivalent, but depend on what order the compiler observed + // certain parts of the program. + var fullWalker = new TypeWriterWalker(program, /*fullTypeCheck*/ true); + // Produce baselines. The first gives the types for all expressions. + // The second gives symbols for all identifiers. + var typesError, symbolsError; + try { + checkBaseLines(/*isSymbolBaseLine*/ false); + } + catch (e) { + typesError = e; + } + try { + checkBaseLines(/*isSymbolBaseLine*/ true); + } + catch (e) { + symbolsError = e; + } + if (typesError && symbolsError) { + throw new Error(typesError.stack + Harness.IO.newLine() + symbolsError.stack); + } + if (typesError) { + throw typesError; + } + if (symbolsError) { + throw symbolsError; + } + return; + function checkBaseLines(isSymbolBaseLine) { + var fullExtension = isSymbolBaseLine ? ".symbols" : ".types"; + // When calling this function from rwc-runner, the baselinePath will have no extension. + // As rwc test- file is stored in json which ".json" will get stripped off. + // When calling this function from compiler-runner, the baselinePath will then has either ".ts" or ".tsx" extension + var outputFileName = ts.endsWith(baselinePath, ".ts" /* Ts */) || ts.endsWith(baselinePath, ".tsx" /* Tsx */) ? + baselinePath.replace(/\.tsx?/, "") : baselinePath; + if (!multifile) { + var fullBaseLine_1 = generateBaseLine(isSymbolBaseLine, isSymbolBaseLine ? skipSymbolBaselines : skipTypeBaselines); + Baseline.runBaseline(outputFileName + fullExtension, function () { return fullBaseLine_1; }, opts); + } + else { + Baseline.runMultifileBaseline(outputFileName, fullExtension, function () { + return iterateBaseLine(isSymbolBaseLine, isSymbolBaseLine ? skipSymbolBaselines : skipTypeBaselines); + }, opts); + } + } + function generateBaseLine(isSymbolBaseline, skipBaseline) { + var _a; + var result = ""; + var gen = iterateBaseLine(isSymbolBaseline, skipBaseline); + for (var _b = gen.next(), done = _b.done, value = _b.value; !done; _a = gen.next(), done = _a.done, value = _a.value, _a) { + var content = value[1]; + result += content; + } + /* tslint:disable:no-null-keyword */ + return result || null; + /* tslint:enable:no-null-keyword */ + } + function iterateBaseLine(isSymbolBaseline, skipBaseline) { + var _a, dupeCase, _i, allFiles_1, file, unitName, typeLines, codeLines, gen, lastIndexWritten, _b, done, result, typeOrSymbolString, formattedLine, _c, codeLines_1, codeLine; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + if (skipBaseline) { + return [2 /*return*/]; + } + dupeCase = ts.createMap(); + _i = 0, allFiles_1 = allFiles; + _d.label = 1; + case 1: + if (!(_i < allFiles_1.length)) return [3 /*break*/, 4]; + file = allFiles_1[_i]; + unitName = file.unitName; + typeLines = "=== " + unitName + " ===\r\n"; + codeLines = ts.flatMap(file.content.split(/\r?\n/g), function (e) { return e.split(/[\r\u2028\u2029]/g); }); + gen = isSymbolBaseline ? fullWalker.getSymbols(unitName) : fullWalker.getTypes(unitName); + lastIndexWritten = void 0; + for (_b = gen.next(), done = _b.done, result = _b.value; !done; _a = gen.next(), done = _a.done, result = _a.value, _a) { + if (isSymbolBaseline && !result.symbol) { + return [2 /*return*/]; + } + if (lastIndexWritten === undefined) { + typeLines += codeLines.slice(0, result.line + 1).join("\r\n") + "\r\n"; + } + else if (result.line !== lastIndexWritten) { + if (!((lastIndexWritten + 1 < codeLines.length) && (codeLines[lastIndexWritten + 1].match(/^\s*[{|}]\s*$/) || codeLines[lastIndexWritten + 1].trim() === ""))) { + typeLines += "\r\n"; + } + typeLines += codeLines.slice(lastIndexWritten + 1, result.line + 1).join("\r\n") + "\r\n"; + } + lastIndexWritten = result.line; + typeOrSymbolString = isSymbolBaseline ? result.symbol : result.type; + formattedLine = result.sourceText.replace(/\r?\n/g, "") + " : " + typeOrSymbolString; + typeLines += ">" + formattedLine + "\r\n"; + } + // Preserve legacy behavior + if (lastIndexWritten === undefined) { + for (_c = 0, codeLines_1 = codeLines; _c < codeLines_1.length; _c++) { + codeLine = codeLines_1[_c]; + typeLines += codeLine + "\r\nNo type information for this code."; + } + } + else { + if (lastIndexWritten + 1 < codeLines.length) { + if (!((lastIndexWritten + 1 < codeLines.length) && (codeLines[lastIndexWritten + 1].match(/^\s*[{|}]\s*$/) || codeLines[lastIndexWritten + 1].trim() === ""))) { + typeLines += "\r\n"; + } + typeLines += codeLines.slice(lastIndexWritten + 1).join("\r\n"); + } + typeLines += "\r\n"; + } + return [4 /*yield*/, [checkDuplicatedFileName(unitName, dupeCase), utils.removeTestPathPrefixes(typeLines)]]; + case 2: + _d.sent(); + _d.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + } + } + Compiler.doTypeAndSymbolBaseline = doTypeAndSymbolBaseline; + function doSourcemapBaseline(baselinePath, options, result, harnessSettings) { + var declMaps = ts.getAreDeclarationMapsEnabled(options); + if (options.inlineSourceMap) { + if (result.maps.size > 0 && !declMaps) { + throw new Error("No sourcemap files should be generated if inlineSourceMaps was set."); + } + return; + } + else if (options.sourceMap || declMaps) { + if (result.maps.size !== (result.getNumberOfJsFiles() * (declMaps && options.sourceMap ? 2 : 1))) { + throw new Error("Number of sourcemap files should be same as js files."); + } + Baseline.runBaseline(baselinePath.replace(/\.tsx?/, ".js.map"), function () { + if ((options.noEmitOnError && result.diagnostics.length !== 0) || result.maps.size === 0) { + // We need to return null here or the runBaseLine will actually create a empty file. + // Baselining isn't required here because there is no output. + /* tslint:disable:no-null-keyword */ + return null; + /* tslint:enable:no-null-keyword */ + } + var sourceMapCode = ""; + result.maps.forEach(function (sourceMap) { + sourceMapCode += fileOutput(sourceMap, harnessSettings); + }); + return sourceMapCode; + }); + } + } + Compiler.doSourcemapBaseline = doSourcemapBaseline; + function doJsEmitBaseline(baselinePath, header, options, result, tsConfigFiles, toBeCompiled, otherFiles, harnessSettings) { + if (!options.noEmit && !options.emitDeclarationOnly && result.js.size === 0 && result.diagnostics.length === 0) { + throw new Error("Expected at least one js file to be emitted or at least one error to be created."); + } + // check js output + Baseline.runBaseline(baselinePath.replace(/\.tsx?/, ".js" /* Js */), function () { + var tsCode = ""; + var tsSources = otherFiles.concat(toBeCompiled); + if (tsSources.length > 1) { + tsCode += "//// [" + header + "] ////\r\n\r\n"; + } + for (var i = 0; i < tsSources.length; i++) { + tsCode += "//// [" + ts.getBaseFileName(tsSources[i].unitName) + "]\r\n"; + tsCode += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); + } + var jsCode = ""; + result.js.forEach(function (file) { + jsCode += fileOutput(file, harnessSettings); + }); + if (result.dts.size > 0) { + jsCode += "\r\n\r\n"; + result.dts.forEach(function (declFile) { + jsCode += fileOutput(declFile, harnessSettings); + }); + } + var declFileContext = prepareDeclarationCompilationContext(toBeCompiled, otherFiles, result, harnessSettings, options, /*currentDirectory*/ undefined); + var declFileCompilationResult = compileDeclarationFiles(declFileContext); + if (declFileCompilationResult && declFileCompilationResult.declResult.diagnostics.length) { + jsCode += "\r\n\r\n//// [DtsFileErrors]\r\n"; + jsCode += "\r\n\r\n"; + jsCode += getErrorBaseline(tsConfigFiles.concat(declFileCompilationResult.declInputFiles, declFileCompilationResult.declOtherFiles), declFileCompilationResult.declResult.diagnostics); + } + if (jsCode.length > 0) { + return tsCode + "\r\n\r\n" + jsCode; + } + else { + /* tslint:disable:no-null-keyword */ + return null; + /* tslint:enable:no-null-keyword */ + } + }); + } + Compiler.doJsEmitBaseline = doJsEmitBaseline; + function fileOutput(file, harnessSettings) { + var fileName = harnessSettings.fullEmitPaths ? utils.removeTestPathPrefixes(file.file) : ts.getBaseFileName(file.file); + return "//// [" + fileName + "]\r\n" + utils.removeTestPathPrefixes(file.text); + } + function collateOutputs(outputFiles) { + var _a; + var gen = iterateOutputs(outputFiles); + // Emit them + var result = ""; + for (var _b = gen.next(), done = _b.done, value = _b.value; !done; _a = gen.next(), done = _a.done, value = _a.value, _a) { + // Some extra spacing if this isn't the first file + if (result.length) { + result += "\r\n\r\n"; + } + // FileName header + content + var content = value[1]; + result += content; + } + return result; + } + Compiler.collateOutputs = collateOutputs; + function iterateOutputs(outputFiles) { + function cleanName(fn) { + var lastSlash = ts.normalizeSlashes(fn).lastIndexOf("/"); + return fn.substr(lastSlash + 1).toLowerCase(); + } + var files, dupeCase, _i, files_1, outputFile; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + files = Array.from(outputFiles); + files.slice().sort(function (a, b) { return ts.compareStringsCaseSensitive(cleanName(a.file), cleanName(b.file)); }); + dupeCase = ts.createMap(); + _i = 0, files_1 = files; + _a.label = 1; + case 1: + if (!(_i < files_1.length)) return [3 /*break*/, 4]; + outputFile = files_1[_i]; + return [4 /*yield*/, [checkDuplicatedFileName(outputFile.file, dupeCase), "/*====== " + outputFile.file + " ======*/\r\n" + utils.removeByteOrderMark(outputFile.text)]]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + } + Compiler.iterateOutputs = iterateOutputs; + function checkDuplicatedFileName(resultName, dupeCase) { + resultName = sanitizeTestFilePath(resultName); + if (dupeCase.has(resultName)) { + // A different baseline filename should be manufactured if the names differ only in case, for windows compat + var count = 1 + dupeCase.get(resultName); + dupeCase.set(resultName, count); + resultName = resultName + ".dupe" + count; + } + else { + dupeCase.set(resultName, 0); + } + return resultName; + } + function sanitizeTestFilePath(name) { + var path = ts.toPath(ts.normalizeSlashes(name.replace(/[\^<>:"|?*%]/g, "_")).replace(/\.\.\//g, "__dotdot/"), "", Utils.canonicalizeForHarness); + if (ts.startsWith(path, "/")) { + return path.substring(1); + } + return path; + } + Compiler.sanitizeTestFilePath = sanitizeTestFilePath; + })(Compiler = Harness.Compiler || (Harness.Compiler = {})); + function splitVaryBySettingValue(text) { + if (!text) + return undefined; + var entries = text.split(/,/).map(function (s) { return s.trim().toLowerCase(); }).filter(function (s) { return s.length > 0; }); + return entries && entries.length > 1 ? entries : undefined; + } + function computeFileBasedTestConfigurationVariations(configurations, variationState, varyByEntries, offset) { + if (offset >= varyByEntries.length) { + // make a copy of the current variation state + configurations.push(__assign({}, variationState)); + return; + } + var _a = varyByEntries[offset], varyBy = _a[0], entries = _a[1]; + for (var _i = 0, entries_2 = entries; _i < entries_2.length; _i++) { + var entry = entries_2[_i]; + // set or overwrite the variation, then compute the next variation + variationState[varyBy] = entry; + computeFileBasedTestConfigurationVariations(configurations, variationState, varyByEntries, offset + 1); + } + } + /** + * Compute FileBasedTestConfiguration variations based on a supplied list of variable settings. + */ + function getFileBasedTestConfigurations(settings, varyBy) { + var varyByEntries; + for (var _i = 0, varyBy_1 = varyBy; _i < varyBy_1.length; _i++) { + var varyByKey = varyBy_1[_i]; + if (ts.hasProperty(settings, varyByKey)) { + // we only consider variations when there are 2 or more variable entries. + var entries = splitVaryBySettingValue(settings[varyByKey]); + if (entries) { + if (!varyByEntries) + varyByEntries = []; + varyByEntries.push([varyByKey, entries]); + } + } + } + if (!varyByEntries) + return undefined; + var configurations = []; + computeFileBasedTestConfigurationVariations(configurations, /*variationState*/ {}, varyByEntries, /*offset*/ 0); + return configurations; + } + Harness.getFileBasedTestConfigurations = getFileBasedTestConfigurations; + /** + * Compute a description for this configuration based on its entries + */ + function getFileBasedTestConfigurationDescription(configuration) { + var name = ""; + if (configuration) { + var keys = Object.keys(configuration).sort(); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + if (name) + name += ", "; + name += "@" + key + ": " + configuration[key]; + } + } + return name; + } + Harness.getFileBasedTestConfigurationDescription = getFileBasedTestConfigurationDescription; + var TestCaseParser; + (function (TestCaseParser) { + // Regex for parsing options in the format "@Alpha: Value of any sort" + var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines + function extractCompilerSettings(content) { + var opts = {}; + var match; + /* tslint:disable:no-null-keyword */ + while ((match = optionRegex.exec(content)) !== null) { + /* tslint:enable:no-null-keyword */ + opts[match[1]] = match[2].trim(); + } + return opts; + } + TestCaseParser.extractCompilerSettings = extractCompilerSettings; + /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ + function makeUnitsFromTest(code, fileName, rootDir, settings) { + if (settings === void 0) { settings = extractCompilerSettings(code); } + // List of all the subfiles we've parsed out + var testUnitData = []; + var lines = Utils.splitContentByNewlines(code); + // Stuff related to the subfile we're parsing + var currentFileContent; + var currentFileOptions = {}; + var currentFileName; + var refs = []; + for (var _i = 0, lines_3 = lines; _i < lines_3.length; _i++) { + var line = lines_3[_i]; + var testMetaData = optionRegex.exec(line); + if (testMetaData) { + // Comment line, check for global/file @options and record them + optionRegex.lastIndex = 0; + var metaDataName = testMetaData[1].toLowerCase(); + currentFileOptions[testMetaData[1]] = testMetaData[2].trim(); + if (metaDataName !== "filename") { + continue; + } + // New metadata statement after having collected some code to go with the previous metadata + if (currentFileName) { + // Store result file + var newTestFile = { + content: currentFileContent, + name: currentFileName, + fileOptions: currentFileOptions, + originalFilePath: fileName, + references: refs + }; + testUnitData.push(newTestFile); + // Reset local data + currentFileContent = undefined; + currentFileOptions = {}; + currentFileName = testMetaData[2].trim(); + refs = []; + } + else { + // First metadata marker in the file + currentFileName = testMetaData[2].trim(); + } + } + else { + // Subfile content line + // Append to the current subfile content, inserting a newline needed + if (currentFileContent === undefined) { + currentFileContent = ""; + } + else if (currentFileContent !== "") { + // End-of-line + currentFileContent = currentFileContent + "\n"; + } + currentFileContent = currentFileContent + line; + } + } + // normalize the fileName for the single file case + currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : ts.getBaseFileName(fileName); + // EOF, push whatever remains + var newTestFile2 = { + content: currentFileContent || "", + name: currentFileName, + fileOptions: currentFileOptions, + originalFilePath: fileName, + references: refs + }; + testUnitData.push(newTestFile2); + // unit tests always list files explicitly + var parseConfigHost = { + useCaseSensitiveFileNames: false, + readDirectory: function () { return []; }, + fileExists: function () { return true; }, + readFile: function (name) { return ts.forEach(testUnitData, function (data) { return data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined; }); } + }; + // check if project has tsconfig.json in the list of files + var tsConfig; + var tsConfigFileUnitData; + for (var i = 0; i < testUnitData.length; i++) { + var data = testUnitData[i]; + if (getConfigNameFromFileName(data.name)) { + var configJson = ts.parseJsonText(data.name, data.content); + assert.isTrue(configJson.endOfFileToken !== undefined); + var baseDir = ts.normalizePath(ts.getDirectoryPath(data.name)); + if (rootDir) { + baseDir = ts.getNormalizedAbsolutePath(baseDir, rootDir); + } + tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir); + tsConfig.options.configFilePath = data.name; + tsConfigFileUnitData = data; + // delete entry from the list + ts.orderedRemoveItemAt(testUnitData, i); + break; + } + } + return { settings: settings, testUnitData: testUnitData, tsConfig: tsConfig, tsConfigFileUnitData: tsConfigFileUnitData }; + } + TestCaseParser.makeUnitsFromTest = makeUnitsFromTest; + })(TestCaseParser = Harness.TestCaseParser || (Harness.TestCaseParser = {})); + /** Support class for baseline files */ + var Baseline; + (function (Baseline) { + var noContent = ""; + function localPath(fileName, baselineFolder, subfolder) { + if (baselineFolder === undefined) { + return baselinePath(fileName, "local", "tests/baselines", subfolder); + } + else { + return baselinePath(fileName, "local", baselineFolder, subfolder); + } + } + Baseline.localPath = localPath; + function referencePath(fileName, baselineFolder, subfolder) { + if (baselineFolder === undefined) { + return baselinePath(fileName, "reference", "tests/baselines", subfolder); + } + else { + return baselinePath(fileName, "reference", baselineFolder, subfolder); + } + } + function baselinePath(fileName, type, baselineFolder, subfolder) { + if (subfolder !== undefined) { + return Harness.userSpecifiedRoot + baselineFolder + "/" + subfolder + "/" + type + "/" + fileName; + } + else { + return Harness.userSpecifiedRoot + baselineFolder + "/" + type + "/" + fileName; + } + } + var fileCache = {}; + function generateActual(generateContent) { + var actual = generateContent(); + if (actual === undefined) { + throw new Error("The generated content was \"undefined\". Return \"null\" if no baselining is required.\""); + } + return actual; + } + function compareToBaseline(actual, relativeFileName, opts) { + // actual is now either undefined (the generator had an error), null (no file requested), + // or some real output of the function + if (actual === undefined) { + // Nothing to do + return undefined; // TODO: GH#18217 + } + var refFileName = referencePath(relativeFileName, opts && opts.Baselinefolder, opts && opts.Subfolder); + /* tslint:disable:no-null-keyword */ + if (actual === null) { + /* tslint:enable:no-null-keyword */ + actual = noContent; + } + var expected = ""; + if (Harness.IO.fileExists(refFileName)) { + expected = Harness.IO.readFile(refFileName); // TODO: GH#18217 + } + return { expected: expected, actual: actual }; + } + function writeComparison(expected, actual, relativeFileName, actualFileName) { + // For now this is written using TypeScript, because sys is not available when running old test cases. + // But we need to move to sys once we have + // Creates the directory including its parent if not already present + function createDirectoryStructure(dirName) { + if (fileCache[dirName] || Harness.IO.directoryExists(dirName)) { + fileCache[dirName] = true; + return; + } + var parentDirectory = Harness.IO.directoryName(dirName); // TODO: GH#18217 + if (parentDirectory !== "" && parentDirectory !== dirName) { + createDirectoryStructure(parentDirectory); + } + Harness.IO.createDirectory(dirName); + fileCache[dirName] = true; + } + // Create folders if needed + createDirectoryStructure(Harness.IO.directoryName(actualFileName)); // TODO: GH#18217 + // Delete the actual file in case it fails + if (Harness.IO.fileExists(actualFileName)) { + Harness.IO.deleteFile(actualFileName); + } + var encodedActual = Utils.encodeString(actual); + if (expected !== encodedActual) { + if (actual === noContent) { + Harness.IO.writeFile(actualFileName + ".delete", ""); + } + else { + Harness.IO.writeFile(actualFileName, encodedActual); + } + throw new Error("The baseline file " + relativeFileName + " has changed."); + } + } + function runBaseline(relativeFileName, generateContent, opts) { + var actualFileName = localPath(relativeFileName, opts && opts.Baselinefolder, opts && opts.Subfolder); + var actual = generateActual(generateContent); + var comparison = compareToBaseline(actual, relativeFileName, opts); + writeComparison(comparison.expected, comparison.actual, relativeFileName, actualFileName); + } + Baseline.runBaseline = runBaseline; + function runMultifileBaseline(relativeFileBase, extension, generateContent, opts, referencedExtensions) { + var _a; + var gen = generateContent(); + var writtenFiles = ts.createMap(); + var errors = []; + // tslint:disable-next-line:no-null-keyword + if (gen !== null) { + for (var _b = gen.next(), done = _b.done, value = _b.value; !done; _a = gen.next(), done = _a.done, value = _a.value, _a) { + var _c = value, name = _c[0], content = _c[1], count = _c[2]; + if (count === 0) + continue; // Allow error reporter to skip writing files without errors + var relativeFileName = relativeFileBase + "/" + name + extension; + var actualFileName = localPath(relativeFileName, opts && opts.Baselinefolder, opts && opts.Subfolder); + var comparison = compareToBaseline(content, relativeFileName, opts); + try { + writeComparison(comparison.expected, comparison.actual, relativeFileName, actualFileName); + } + catch (e) { + errors.push(e); + } + writtenFiles.set(relativeFileName, true); + } + } + var referenceDir = referencePath(relativeFileBase, opts && opts.Baselinefolder, opts && opts.Subfolder); + var existing = Harness.IO.readDirectory(referenceDir, referencedExtensions || [extension]); + if (extension === ".ts" || referencedExtensions && referencedExtensions.indexOf(".ts") > -1 && referencedExtensions.indexOf(".d.ts") === -1) { + // special-case and filter .d.ts out of .ts results + existing = existing.filter(function (f) { return !ts.endsWith(f, ".d.ts"); }); + } + var missing = []; + for (var _i = 0, existing_1 = existing; _i < existing_1.length; _i++) { + var name = existing_1[_i]; + var localCopy = name.substring(referenceDir.length - relativeFileBase.length); + if (!writtenFiles.has(localCopy)) { + missing.push(localCopy); + } + } + if (missing.length) { + for (var _d = 0, missing_1 = missing; _d < missing_1.length; _d++) { + var file = missing_1[_d]; + Harness.IO.writeFile(localPath(file + ".delete", opts && opts.Baselinefolder, opts && opts.Subfolder), ""); + } + } + if (errors.length || missing.length) { + var errorMsg = ""; + if (errors.length) { + errorMsg += "The baseline for " + relativeFileBase + " in " + errors.length + " files has changed:" + ("\n " + errors.slice(0, 5).map(function (e) { return e.message; }).join("\n ") + (errors.length > 5 ? "\n" + (" and " + (errors.length - 5) + " more") : "")); + } + if (errors.length && missing.length) { + errorMsg += "\n"; + } + if (missing.length) { + var writtenFilesArray = ts.arrayFrom(writtenFiles.keys()); + errorMsg += "Baseline missing " + missing.length + " files:" + ("\n " + missing.slice(0, 5).join("\n ") + (missing.length > 5 ? "\n" + (" and " + (missing.length - 5) + " more") : "") + "\n") + "Written " + writtenFiles.size + " files:" + ("\n " + writtenFilesArray.slice(0, 5).join("\n ") + (writtenFilesArray.length > 5 ? "\n" + (" and " + (writtenFilesArray.length - 5) + " more") : "")); + } + throw new Error(errorMsg); + } + } + Baseline.runMultifileBaseline = runMultifileBaseline; + })(Baseline = Harness.Baseline || (Harness.Baseline = {})); + function isDefaultLibraryFile(filePath) { + // We need to make sure that the filePath is prefixed with "lib." not just containing "lib." and end with ".d.ts" + var fileName = ts.getBaseFileName(ts.normalizeSlashes(filePath)); + return ts.startsWith(fileName, "lib.") && ts.endsWith(fileName, ".d.ts" /* Dts */); + } + Harness.isDefaultLibraryFile = isDefaultLibraryFile; + function isBuiltFile(filePath) { + return filePath.indexOf(Harness.libFolder) === 0 || + filePath.indexOf(vpath.addTrailingSeparator(vfs.builtFolder)) === 0; + } + Harness.isBuiltFile = isBuiltFile; + function getDefaultLibraryFile(filePath, io) { + var libFile = Harness.userSpecifiedRoot + Harness.libFolder + ts.getBaseFileName(ts.normalizeSlashes(filePath)); + return { unitName: libFile, content: io.readFile(libFile) }; + } + Harness.getDefaultLibraryFile = getDefaultLibraryFile; + function getConfigNameFromFileName(filename) { + var flc = ts.getBaseFileName(filename).toLowerCase(); + return ts.find(["tsconfig.json", "jsconfig.json"], function (x) { return x === flc; }); + } + Harness.getConfigNameFromFileName = getConfigNameFromFileName; + if (Error) + Error.stackTraceLimit = 100; +})(Harness || (Harness = {})); +var Harness; +(function (Harness) { + var LanguageService; + (function (LanguageService) { + var ScriptInfo = /** @class */ (function () { + function ScriptInfo(fileName, content, isRootFile) { + this.fileName = fileName; + this.content = content; + this.isRootFile = isRootFile; + this.version = 1; + this.editRanges = []; + this.setContent(content); + } + ScriptInfo.prototype.setContent = function (content) { + this.content = content; + this.lineMap = undefined; + }; + ScriptInfo.prototype.getLineMap = function () { + return this.lineMap || (this.lineMap = ts.computeLineStarts(this.content)); + }; + ScriptInfo.prototype.updateContent = function (content) { + this.editRanges = []; + this.setContent(content); + this.version++; + }; + ScriptInfo.prototype.editContent = function (start, end, newText) { + // Apply edits + var prefix = this.content.substring(0, start); + var middle = newText; + var suffix = this.content.substring(end); + this.setContent(prefix + middle + suffix); + // Store edit range + new length of script + this.editRanges.push({ + length: this.content.length, + textChangeRange: ts.createTextChangeRange(ts.createTextSpanFromBounds(start, end), newText.length) + }); + // Update version # + this.version++; + }; + ScriptInfo.prototype.getTextChangeRangeBetweenVersions = function (startVersion, endVersion) { + if (startVersion === endVersion) { + // No edits! + return ts.unchangedTextChangeRange; + } + var initialEditRangeIndex = this.editRanges.length - (this.version - startVersion); + var lastEditRangeIndex = this.editRanges.length - (this.version - endVersion); + var entries = this.editRanges.slice(initialEditRangeIndex, lastEditRangeIndex); + return ts.collapseTextChangeRangesAcrossMultipleVersions(entries.map(function (e) { return e.textChangeRange; })); + }; + return ScriptInfo; + }()); + LanguageService.ScriptInfo = ScriptInfo; + var ScriptSnapshot = /** @class */ (function () { + function ScriptSnapshot(scriptInfo) { + this.scriptInfo = scriptInfo; + this.textSnapshot = scriptInfo.content; + this.version = scriptInfo.version; + } + ScriptSnapshot.prototype.getText = function (start, end) { + return this.textSnapshot.substring(start, end); + }; + ScriptSnapshot.prototype.getLength = function () { + return this.textSnapshot.length; + }; + ScriptSnapshot.prototype.getChangeRange = function (oldScript) { + var oldShim = oldScript; + return this.scriptInfo.getTextChangeRangeBetweenVersions(oldShim.version, this.version); + }; + return ScriptSnapshot; + }()); + var ScriptSnapshotProxy = /** @class */ (function () { + function ScriptSnapshotProxy(scriptSnapshot) { + this.scriptSnapshot = scriptSnapshot; + } + ScriptSnapshotProxy.prototype.getText = function (start, end) { + return this.scriptSnapshot.getText(start, end); + }; + ScriptSnapshotProxy.prototype.getLength = function () { + return this.scriptSnapshot.getLength(); + }; + ScriptSnapshotProxy.prototype.getChangeRange = function (oldScript) { + var range = this.scriptSnapshot.getChangeRange(oldScript.scriptSnapshot); + return range && JSON.stringify(range); + }; + return ScriptSnapshotProxy; + }()); + var DefaultHostCancellationToken = /** @class */ (function () { + function DefaultHostCancellationToken() { + } + DefaultHostCancellationToken.prototype.isCancellationRequested = function () { + return false; + }; + DefaultHostCancellationToken.instance = new DefaultHostCancellationToken(); + return DefaultHostCancellationToken; + }()); + var LanguageServiceAdapterHost = /** @class */ (function () { + function LanguageServiceAdapterHost(cancellationToken, settings) { + if (cancellationToken === void 0) { cancellationToken = DefaultHostCancellationToken.instance; } + if (settings === void 0) { settings = ts.getDefaultCompilerOptions(); } + this.cancellationToken = cancellationToken; + this.settings = settings; + this.sys = new fakes.System(new vfs.FileSystem(/*ignoreCase*/ true, { cwd: Harness.virtualFileSystemRoot })); + this.scriptInfos = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + } + Object.defineProperty(LanguageServiceAdapterHost.prototype, "vfs", { + get: function () { + return this.sys.vfs; + }, + enumerable: true, + configurable: true + }); + LanguageServiceAdapterHost.prototype.getNewLine = function () { + return Harness.harnessNewLine; + }; + LanguageServiceAdapterHost.prototype.getFilenames = function () { + var fileNames = []; + this.scriptInfos.forEach(function (scriptInfo) { + if (scriptInfo.isRootFile) { + // only include root files here + // usually it means that we won't include lib.d.ts in the list of root files so it won't mess the computation of compilation root dir. + fileNames.push(scriptInfo.fileName); + } + }); + return fileNames; + }; + LanguageServiceAdapterHost.prototype.getScriptInfo = function (fileName) { + return this.scriptInfos.get(vpath.resolve(this.vfs.cwd(), fileName)); + }; + LanguageServiceAdapterHost.prototype.addScript = function (fileName, content, isRootFile) { + this.vfs.mkdirpSync(vpath.dirname(fileName)); + this.vfs.writeFileSync(fileName, content); + this.scriptInfos.set(vpath.resolve(this.vfs.cwd(), fileName), new ScriptInfo(fileName, content, isRootFile)); + }; + LanguageServiceAdapterHost.prototype.editScript = function (fileName, start, end, newText) { + var script = this.getScriptInfo(fileName); + if (script) { + script.editContent(start, end, newText); + this.vfs.mkdirpSync(vpath.dirname(fileName)); + this.vfs.writeFileSync(fileName, script.content); + return; + } + throw new Error("No script with name '" + fileName + "'"); + }; + LanguageServiceAdapterHost.prototype.openFile = function (_fileName, _content, _scriptKindName) { }; + /** + * @param line 0 based index + * @param col 0 based index + */ + LanguageServiceAdapterHost.prototype.positionToLineAndCharacter = function (fileName, position) { + var script = this.getScriptInfo(fileName); + assert.isOk(script); + return ts.computeLineAndCharacterOfPosition(script.getLineMap(), position); + }; + return LanguageServiceAdapterHost; + }()); + LanguageService.LanguageServiceAdapterHost = LanguageServiceAdapterHost; + /// Native adapter + var NativeLanguageServiceHost = /** @class */ (function (_super) { + __extends(NativeLanguageServiceHost, _super); + function NativeLanguageServiceHost() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.installPackage = ts.notImplemented; + _this.log = ts.noop; + _this.trace = ts.noop; + _this.error = ts.noop; + return _this; + } + NativeLanguageServiceHost.prototype.isKnownTypesPackageName = function (name) { + return !!this.typesRegistry && this.typesRegistry.has(name); + }; + NativeLanguageServiceHost.prototype.getCompilationSettings = function () { return this.settings; }; + NativeLanguageServiceHost.prototype.getCancellationToken = function () { return this.cancellationToken; }; + NativeLanguageServiceHost.prototype.getDirectories = function (path) { + return this.sys.getDirectories(path); + }; + NativeLanguageServiceHost.prototype.getCurrentDirectory = function () { return Harness.virtualFileSystemRoot; }; + NativeLanguageServiceHost.prototype.getDefaultLibFileName = function () { return Harness.Compiler.defaultLibFileName; }; + NativeLanguageServiceHost.prototype.getScriptFileNames = function () { + return this.getFilenames().filter(ts.isAnySupportedFileExtension); + }; + NativeLanguageServiceHost.prototype.getScriptSnapshot = function (fileName) { + var script = this.getScriptInfo(fileName); + return script ? new ScriptSnapshot(script) : undefined; + }; + NativeLanguageServiceHost.prototype.getScriptKind = function () { return 0 /* Unknown */; }; + NativeLanguageServiceHost.prototype.getScriptVersion = function (fileName) { + var script = this.getScriptInfo(fileName); + return script ? script.version.toString() : undefined; // TODO: GH#18217 + }; + NativeLanguageServiceHost.prototype.directoryExists = function (dirName) { + return this.sys.directoryExists(dirName); + }; + NativeLanguageServiceHost.prototype.fileExists = function (fileName) { + return this.sys.fileExists(fileName); + }; + NativeLanguageServiceHost.prototype.readDirectory = function (path, extensions, exclude, include, depth) { + return this.sys.readDirectory(path, extensions, exclude, include, depth); + }; + NativeLanguageServiceHost.prototype.readFile = function (path) { + return this.sys.readFile(path); + }; + NativeLanguageServiceHost.prototype.realpath = function (path) { + return this.sys.realpath(path); + }; + NativeLanguageServiceHost.prototype.getTypeRootsVersion = function () { + return 0; + }; + return NativeLanguageServiceHost; + }(LanguageServiceAdapterHost)); + var NativeLanguageServiceAdapter = /** @class */ (function () { + function NativeLanguageServiceAdapter(cancellationToken, options) { + this.host = new NativeLanguageServiceHost(cancellationToken, options); + } + NativeLanguageServiceAdapter.prototype.getHost = function () { return this.host; }; + NativeLanguageServiceAdapter.prototype.getLanguageService = function () { return ts.createLanguageService(this.host); }; + NativeLanguageServiceAdapter.prototype.getClassifier = function () { return ts.createClassifier(); }; + NativeLanguageServiceAdapter.prototype.getPreProcessedFileInfo = function (fileName, fileContents) { return ts.preProcessFile(fileContents, /* readImportFiles */ true, ts.hasJavaScriptFileExtension(fileName)); }; + return NativeLanguageServiceAdapter; + }()); + LanguageService.NativeLanguageServiceAdapter = NativeLanguageServiceAdapter; + /// Shim adapter + var ShimLanguageServiceHost = /** @class */ (function (_super) { + __extends(ShimLanguageServiceHost, _super); + function ShimLanguageServiceHost(preprocessToResolve, cancellationToken, options) { + var _this = _super.call(this, cancellationToken, options) || this; + _this.readDirectory = ts.notImplemented; + _this.readDirectoryNames = ts.notImplemented; + _this.readFileNames = ts.notImplemented; + _this.nativeHost = new NativeLanguageServiceHost(cancellationToken, options); + if (preprocessToResolve) { + var compilerOptions_1 = _this.nativeHost.getCompilationSettings(); + var moduleResolutionHost_1 = { + fileExists: function (fileName) { return _this.getScriptInfo(fileName) !== undefined; }, + readFile: function (fileName) { + var scriptInfo = _this.getScriptInfo(fileName); + return scriptInfo && scriptInfo.content; + } + }; + _this.getModuleResolutionsForFile = function (fileName) { + var scriptInfo = _this.getScriptInfo(fileName); + var preprocessInfo = ts.preProcessFile(scriptInfo.content, /*readImportFiles*/ true); + var imports = {}; + for (var _i = 0, _a = preprocessInfo.importedFiles; _i < _a.length; _i++) { + var module_1 = _a[_i]; + var resolutionInfo = ts.resolveModuleName(module_1.fileName, fileName, compilerOptions_1, moduleResolutionHost_1); + if (resolutionInfo.resolvedModule) { + imports[module_1.fileName] = resolutionInfo.resolvedModule.resolvedFileName; + } + } + return JSON.stringify(imports); + }; + _this.getTypeReferenceDirectiveResolutionsForFile = function (fileName) { + var scriptInfo = _this.getScriptInfo(fileName); + if (scriptInfo) { + var preprocessInfo = ts.preProcessFile(scriptInfo.content, /*readImportFiles*/ false); + var resolutions = {}; + var settings = _this.nativeHost.getCompilationSettings(); + for (var _i = 0, _a = preprocessInfo.typeReferenceDirectives; _i < _a.length; _i++) { + var typeReferenceDirective = _a[_i]; + var resolutionInfo = ts.resolveTypeReferenceDirective(typeReferenceDirective.fileName, fileName, settings, moduleResolutionHost_1); + if (resolutionInfo.resolvedTypeReferenceDirective.resolvedFileName) { + resolutions[typeReferenceDirective.fileName] = resolutionInfo.resolvedTypeReferenceDirective; + } + } + return JSON.stringify(resolutions); + } + else { + return "[]"; + } + }; + } + return _this; + } + ShimLanguageServiceHost.prototype.getFilenames = function () { return this.nativeHost.getFilenames(); }; + ShimLanguageServiceHost.prototype.getScriptInfo = function (fileName) { return this.nativeHost.getScriptInfo(fileName); }; + ShimLanguageServiceHost.prototype.addScript = function (fileName, content, isRootFile) { this.nativeHost.addScript(fileName, content, isRootFile); }; + ShimLanguageServiceHost.prototype.editScript = function (fileName, start, end, newText) { this.nativeHost.editScript(fileName, start, end, newText); }; + ShimLanguageServiceHost.prototype.positionToLineAndCharacter = function (fileName, position) { return this.nativeHost.positionToLineAndCharacter(fileName, position); }; + ShimLanguageServiceHost.prototype.getCompilationSettings = function () { return JSON.stringify(this.nativeHost.getCompilationSettings()); }; + ShimLanguageServiceHost.prototype.getCancellationToken = function () { return this.nativeHost.getCancellationToken(); }; + ShimLanguageServiceHost.prototype.getCurrentDirectory = function () { return this.nativeHost.getCurrentDirectory(); }; + ShimLanguageServiceHost.prototype.getDirectories = function (path) { return JSON.stringify(this.nativeHost.getDirectories(path)); }; + ShimLanguageServiceHost.prototype.getDefaultLibFileName = function () { return this.nativeHost.getDefaultLibFileName(); }; + ShimLanguageServiceHost.prototype.getScriptFileNames = function () { return JSON.stringify(this.nativeHost.getScriptFileNames()); }; + ShimLanguageServiceHost.prototype.getScriptSnapshot = function (fileName) { + var nativeScriptSnapshot = this.nativeHost.getScriptSnapshot(fileName); // TODO: GH#18217 + return nativeScriptSnapshot && new ScriptSnapshotProxy(nativeScriptSnapshot); + }; + ShimLanguageServiceHost.prototype.getScriptKind = function () { return this.nativeHost.getScriptKind(); }; + ShimLanguageServiceHost.prototype.getScriptVersion = function (fileName) { return this.nativeHost.getScriptVersion(fileName); }; + ShimLanguageServiceHost.prototype.getLocalizedDiagnosticMessages = function () { return JSON.stringify({}); }; + ShimLanguageServiceHost.prototype.fileExists = function (fileName) { return this.getScriptInfo(fileName) !== undefined; }; + ShimLanguageServiceHost.prototype.readFile = function (fileName) { + var snapshot = this.nativeHost.getScriptSnapshot(fileName); + return snapshot && ts.getSnapshotText(snapshot); + }; + ShimLanguageServiceHost.prototype.log = function (s) { this.nativeHost.log(s); }; + ShimLanguageServiceHost.prototype.trace = function (s) { this.nativeHost.trace(s); }; + ShimLanguageServiceHost.prototype.error = function (s) { this.nativeHost.error(s); }; + ShimLanguageServiceHost.prototype.directoryExists = function () { + // for tests pessimistically assume that directory always exists + return true; + }; + return ShimLanguageServiceHost; + }(LanguageServiceAdapterHost)); + var ClassifierShimProxy = /** @class */ (function () { + function ClassifierShimProxy(shim) { + this.shim = shim; + } + ClassifierShimProxy.prototype.getEncodedLexicalClassifications = function (_text, _lexState, _classifyKeywordsInGenerics) { + return ts.notImplemented(); + }; + ClassifierShimProxy.prototype.getClassificationsForLine = function (text, lexState, classifyKeywordsInGenerics) { + var result = this.shim.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics).split("\n"); + var entries = []; + var i = 0; + var position = 0; + for (; i < result.length - 1; i += 2) { + var t = entries[i / 2] = { + length: parseInt(result[i]), + classification: parseInt(result[i + 1]) + }; + assert.isTrue(t.length > 0, "Result length should be greater than 0, got :" + t.length); + position += t.length; + } + var finalLexState = parseInt(result[result.length - 1]); + assert.equal(position, text.length, "Expected cumulative length of all entries to match the length of the source. expected: " + text.length + ", but got: " + position); + return { + finalLexState: finalLexState, + entries: entries + }; + }; + return ClassifierShimProxy; + }()); + function unwrapJSONCallResult(result) { + var parsedResult = JSON.parse(result); + if (parsedResult.error) { + throw new Error("Language Service Shim Error: " + JSON.stringify(parsedResult.error)); + } + else if (parsedResult.canceled) { + throw new ts.OperationCanceledException(); + } + return parsedResult.result; + } + var LanguageServiceShimProxy = /** @class */ (function () { + function LanguageServiceShimProxy(shim) { + this.shim = shim; + this.getCombinedCodeFix = ts.notImplemented; + this.applyCodeActionCommand = ts.notImplemented; + } + LanguageServiceShimProxy.prototype.cleanupSemanticCache = function () { + this.shim.cleanupSemanticCache(); + }; + LanguageServiceShimProxy.prototype.getSyntacticDiagnostics = function (fileName) { + return unwrapJSONCallResult(this.shim.getSyntacticDiagnostics(fileName)); + }; + LanguageServiceShimProxy.prototype.getSemanticDiagnostics = function (fileName) { + return unwrapJSONCallResult(this.shim.getSemanticDiagnostics(fileName)); + }; + LanguageServiceShimProxy.prototype.getSuggestionDiagnostics = function (fileName) { + return unwrapJSONCallResult(this.shim.getSuggestionDiagnostics(fileName)); + }; + LanguageServiceShimProxy.prototype.getCompilerOptionsDiagnostics = function () { + return unwrapJSONCallResult(this.shim.getCompilerOptionsDiagnostics()); + }; + LanguageServiceShimProxy.prototype.getSyntacticClassifications = function (fileName, span) { + return unwrapJSONCallResult(this.shim.getSyntacticClassifications(fileName, span.start, span.length)); + }; + LanguageServiceShimProxy.prototype.getSemanticClassifications = function (fileName, span) { + return unwrapJSONCallResult(this.shim.getSemanticClassifications(fileName, span.start, span.length)); + }; + LanguageServiceShimProxy.prototype.getEncodedSyntacticClassifications = function (fileName, span) { + return unwrapJSONCallResult(this.shim.getEncodedSyntacticClassifications(fileName, span.start, span.length)); + }; + LanguageServiceShimProxy.prototype.getEncodedSemanticClassifications = function (fileName, span) { + return unwrapJSONCallResult(this.shim.getEncodedSemanticClassifications(fileName, span.start, span.length)); + }; + LanguageServiceShimProxy.prototype.getCompletionsAtPosition = function (fileName, position, preferences) { + return unwrapJSONCallResult(this.shim.getCompletionsAtPosition(fileName, position, preferences)); + }; + LanguageServiceShimProxy.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences) { + return unwrapJSONCallResult(this.shim.getCompletionEntryDetails(fileName, position, entryName, JSON.stringify(formatOptions), source, preferences)); + }; + LanguageServiceShimProxy.prototype.getCompletionEntrySymbol = function () { + throw new Error("getCompletionEntrySymbol not implemented across the shim layer."); + }; + LanguageServiceShimProxy.prototype.getQuickInfoAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getQuickInfoAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) { + return unwrapJSONCallResult(this.shim.getNameOrDottedNameSpan(fileName, startPos, endPos)); + }; + LanguageServiceShimProxy.prototype.getBreakpointStatementAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getBreakpointStatementAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getSignatureHelpItems = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getSignatureHelpItems(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getRenameInfo = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getRenameInfo(fileName, position)); + }; + LanguageServiceShimProxy.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) { + return unwrapJSONCallResult(this.shim.findRenameLocations(fileName, position, findInStrings, findInComments)); + }; + LanguageServiceShimProxy.prototype.getDefinitionAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getDefinitionAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getDefinitionAndBoundSpan = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getDefinitionAndBoundSpan(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getTypeDefinitionAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getTypeDefinitionAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getImplementationAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getImplementationAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getReferencesAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getReferencesAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.findReferences = function (fileName, position) { + return unwrapJSONCallResult(this.shim.findReferences(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getOccurrencesAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getOccurrencesAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) { + return unwrapJSONCallResult(this.shim.getDocumentHighlights(fileName, position, JSON.stringify(filesToSearch))); + }; + LanguageServiceShimProxy.prototype.getNavigateToItems = function (searchValue) { + return unwrapJSONCallResult(this.shim.getNavigateToItems(searchValue)); + }; + LanguageServiceShimProxy.prototype.getNavigationBarItems = function (fileName) { + return unwrapJSONCallResult(this.shim.getNavigationBarItems(fileName)); + }; + LanguageServiceShimProxy.prototype.getNavigationTree = function (fileName) { + return unwrapJSONCallResult(this.shim.getNavigationTree(fileName)); + }; + LanguageServiceShimProxy.prototype.getOutliningSpans = function (fileName) { + return unwrapJSONCallResult(this.shim.getOutliningSpans(fileName)); + }; + LanguageServiceShimProxy.prototype.getTodoComments = function (fileName, descriptors) { + return unwrapJSONCallResult(this.shim.getTodoComments(fileName, JSON.stringify(descriptors))); + }; + LanguageServiceShimProxy.prototype.getBraceMatchingAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getBraceMatchingAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.getIndentationAtPosition = function (fileName, position, options) { + return unwrapJSONCallResult(this.shim.getIndentationAtPosition(fileName, position, JSON.stringify(options))); + }; + LanguageServiceShimProxy.prototype.getFormattingEditsForRange = function (fileName, start, end, options) { + return unwrapJSONCallResult(this.shim.getFormattingEditsForRange(fileName, start, end, JSON.stringify(options))); + }; + LanguageServiceShimProxy.prototype.getFormattingEditsForDocument = function (fileName, options) { + return unwrapJSONCallResult(this.shim.getFormattingEditsForDocument(fileName, JSON.stringify(options))); + }; + LanguageServiceShimProxy.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options) { + return unwrapJSONCallResult(this.shim.getFormattingEditsAfterKeystroke(fileName, position, key, JSON.stringify(options))); + }; + LanguageServiceShimProxy.prototype.getDocCommentTemplateAtPosition = function (fileName, position) { + return unwrapJSONCallResult(this.shim.getDocCommentTemplateAtPosition(fileName, position)); + }; + LanguageServiceShimProxy.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) { + return unwrapJSONCallResult(this.shim.isValidBraceCompletionAtPosition(fileName, position, openingBrace)); + }; + LanguageServiceShimProxy.prototype.getJsxClosingTagAtPosition = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) { + return unwrapJSONCallResult(this.shim.getSpanOfEnclosingComment(fileName, position, onlyMultiLine)); + }; + LanguageServiceShimProxy.prototype.getCodeFixesAtPosition = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getCodeFixDiagnostics = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getEditsForRefactor = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getApplicableRefactors = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.organizeImports = function (_scope, _formatOptions) { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getEditsForFileRename = function () { + throw new Error("Not supported on the shim."); + }; + LanguageServiceShimProxy.prototype.getEmitOutput = function (fileName) { + return unwrapJSONCallResult(this.shim.getEmitOutput(fileName)); + }; + LanguageServiceShimProxy.prototype.getProgram = function () { + throw new Error("Program can not be marshaled across the shim layer."); + }; + LanguageServiceShimProxy.prototype.getNonBoundSourceFile = function () { + throw new Error("SourceFile can not be marshaled across the shim layer."); + }; + LanguageServiceShimProxy.prototype.getSourceFile = function () { + throw new Error("SourceFile can not be marshaled across the shim layer."); + }; + LanguageServiceShimProxy.prototype.dispose = function () { this.shim.dispose({}); }; + return LanguageServiceShimProxy; + }()); + var ShimLanguageServiceAdapter = /** @class */ (function () { + function ShimLanguageServiceAdapter(preprocessToResolve, cancellationToken, options) { + this.host = new ShimLanguageServiceHost(preprocessToResolve, cancellationToken, options); + this.factory = new TypeScript.Services.TypeScriptServicesFactory(); + } + ShimLanguageServiceAdapter.prototype.getHost = function () { return this.host; }; + ShimLanguageServiceAdapter.prototype.getLanguageService = function () { return new LanguageServiceShimProxy(this.factory.createLanguageServiceShim(this.host)); }; + ShimLanguageServiceAdapter.prototype.getClassifier = function () { return new ClassifierShimProxy(this.factory.createClassifierShim(this.host)); }; + ShimLanguageServiceAdapter.prototype.getPreProcessedFileInfo = function (fileName, fileContents) { + var shimResult; + var coreServicesShim = this.factory.createCoreServicesShim(this.host); + shimResult = unwrapJSONCallResult(coreServicesShim.getPreProcessedFileInfo(fileName, ts.ScriptSnapshot.fromString(fileContents))); + var convertResult = { + referencedFiles: [], + importedFiles: [], + ambientExternalModules: [], + isLibFile: shimResult.isLibFile, + typeReferenceDirectives: [], + libReferenceDirectives: [] + }; + ts.forEach(shimResult.referencedFiles, function (refFile) { + convertResult.referencedFiles.push({ + fileName: refFile.path, + pos: refFile.position, + end: refFile.position + refFile.length + }); + }); + ts.forEach(shimResult.importedFiles, function (importedFile) { + convertResult.importedFiles.push({ + fileName: importedFile.path, + pos: importedFile.position, + end: importedFile.position + importedFile.length + }); + }); + ts.forEach(shimResult.typeReferenceDirectives, function (typeRefDirective) { + convertResult.importedFiles.push({ + fileName: typeRefDirective.path, + pos: typeRefDirective.position, + end: typeRefDirective.position + typeRefDirective.length + }); + }); + return convertResult; + }; + return ShimLanguageServiceAdapter; + }()); + LanguageService.ShimLanguageServiceAdapter = ShimLanguageServiceAdapter; + // Server adapter + var SessionClientHost = /** @class */ (function (_super) { + __extends(SessionClientHost, _super); + function SessionClientHost(cancellationToken, settings) { + var _this = _super.call(this, cancellationToken, settings) || this; + _this.onMessage = ts.noop; + _this.writeMessage = ts.noop; + return _this; + } + SessionClientHost.prototype.setClient = function (client) { + this.client = client; + }; + SessionClientHost.prototype.openFile = function (fileName, content, scriptKindName) { + _super.prototype.openFile.call(this, fileName, content, scriptKindName); + this.client.openFile(fileName, content, scriptKindName); + }; + SessionClientHost.prototype.editScript = function (fileName, start, end, newText) { + _super.prototype.editScript.call(this, fileName, start, end, newText); + this.client.changeFile(fileName, start, end, newText); + }; + return SessionClientHost; + }(NativeLanguageServiceHost)); + var SessionServerHost = /** @class */ (function () { + function SessionServerHost(host) { + this.host = host; + this.args = []; + this.useCaseSensitiveFileNames = false; + this.onMessage = ts.noop; + this.writeMessage = ts.noop; // overridden + this.writeFile = ts.noop; + this.exit = ts.noop; + this.close = ts.noop; + this.newLine = this.host.getNewLine(); + } + SessionServerHost.prototype.write = function (message) { + this.writeMessage(message); + }; + SessionServerHost.prototype.readFile = function (fileName) { + if (ts.stringContains(fileName, Harness.Compiler.defaultLibFileName)) { + fileName = Harness.Compiler.defaultLibFileName; + } + var snapshot = this.host.getScriptSnapshot(fileName); + return snapshot && ts.getSnapshotText(snapshot); + }; + SessionServerHost.prototype.resolvePath = function (path) { + return path; + }; + SessionServerHost.prototype.fileExists = function (path) { + return !!this.host.getScriptSnapshot(path); + }; + SessionServerHost.prototype.directoryExists = function () { + // for tests assume that directory exists + return true; + }; + SessionServerHost.prototype.getExecutingFilePath = function () { + return ""; + }; + SessionServerHost.prototype.createDirectory = function (_directoryName) { + return ts.notImplemented(); + }; + SessionServerHost.prototype.getCurrentDirectory = function () { + return this.host.getCurrentDirectory(); + }; + SessionServerHost.prototype.getDirectories = function () { + return []; + }; + SessionServerHost.prototype.getEnvironmentVariable = function (name) { + return ts.sys.getEnvironmentVariable(name); + }; + SessionServerHost.prototype.readDirectory = function () { return ts.notImplemented(); }; + SessionServerHost.prototype.watchFile = function () { + return { close: ts.noop }; + }; + SessionServerHost.prototype.watchDirectory = function () { + return { close: ts.noop }; + }; + SessionServerHost.prototype.info = function (message) { + this.host.log(message); + }; + SessionServerHost.prototype.msg = function (message) { + this.host.log(message); + }; + SessionServerHost.prototype.loggingEnabled = function () { + return true; + }; + SessionServerHost.prototype.getLogFileName = function () { + return undefined; + }; + SessionServerHost.prototype.hasLevel = function () { + return false; + }; + SessionServerHost.prototype.startGroup = function () { throw ts.notImplemented(); }; + SessionServerHost.prototype.endGroup = function () { throw ts.notImplemented(); }; + SessionServerHost.prototype.perftrc = function (message) { + return this.host.log(message); + }; + SessionServerHost.prototype.setTimeout = function (callback, ms) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return setTimeout(callback, ms, args); + }; + SessionServerHost.prototype.clearTimeout = function (timeoutId) { + clearTimeout(timeoutId); + }; + SessionServerHost.prototype.setImmediate = function (callback, _ms) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return setImmediate(callback, args); + }; + SessionServerHost.prototype.clearImmediate = function (timeoutId) { + clearImmediate(timeoutId); + }; + SessionServerHost.prototype.createHash = function (s) { + return Harness.mockHash(s); + }; + SessionServerHost.prototype.require = function (_initialDir, _moduleName) { + switch (_moduleName) { + // Adds to the Quick Info a fixed string and a string from the config file + // and replaces the first display part + case "quickinfo-augmeneter": + return { + module: function () { return ({ + create: function (info) { + var proxy = makeDefaultProxy(info); + var langSvc = info.languageService; + // tslint:disable-next-line only-arrow-functions + proxy.getQuickInfoAtPosition = function () { + var parts = langSvc.getQuickInfoAtPosition.apply(langSvc, arguments); + if (parts.displayParts.length > 0) { + parts.displayParts[0].text = "Proxied"; + } + parts.displayParts.push({ text: info.config.message, kind: "punctuation" }); + return parts; + }; + return proxy; + } + }); }, + error: undefined + }; + // Throws during initialization + case "create-thrower": + return { + module: function () { return ({ + create: function () { + throw new Error("I am not a well-behaved plugin"); + } + }); }, + error: undefined + }; + // Adds another diagnostic + case "diagnostic-adder": + return { + module: function () { return ({ + create: function (info) { + var proxy = makeDefaultProxy(info); + proxy.getSemanticDiagnostics = function (filename) { + var prev = info.languageService.getSemanticDiagnostics(filename); + var sourceFile = info.project.getSourceFile(ts.toPath(filename, /*basePath*/ undefined, ts.createGetCanonicalFileName(info.serverHost.useCaseSensitiveFileNames))); + prev.push({ + category: ts.DiagnosticCategory.Warning, + file: sourceFile, + code: 9999, + length: 3, + messageText: "Plugin diagnostic", + start: 0 + }); + return prev; + }; + return proxy; + } + }); }, + error: undefined + }; + default: + return { + module: undefined, + error: new Error("Could not resolve module") + }; + } + function makeDefaultProxy(info) { + // tslint:disable-next-line:no-null-keyword + var proxy = Object.create(/*prototype*/ null); + var langSvc = info.languageService; + var _loop_2 = function (k) { + // tslint:disable-next-line only-arrow-functions + proxy[k] = function () { + return langSvc[k].apply(langSvc, arguments); + }; + }; + for (var _i = 0, _a = Object.keys(langSvc); _i < _a.length; _i++) { + var k = _a[_i]; + _loop_2(k); + } + return proxy; + } + }; + return SessionServerHost; + }()); + var ServerLanguageServiceAdapter = /** @class */ (function () { + function ServerLanguageServiceAdapter(cancellationToken, options) { + // This is the main host that tests use to direct tests + var clientHost = new SessionClientHost(cancellationToken, options); + var client = new ts.server.SessionClient(clientHost); + // This host is just a proxy for the clientHost, it uses the client + // host to answer server queries about files on disk + var serverHost = new SessionServerHost(clientHost); + var opts = { + host: serverHost, + cancellationToken: ts.server.nullCancellationToken, + useSingleInferredProject: false, + useInferredProjectPerProjectRoot: false, + typingsInstaller: undefined, + byteLength: Utils.byteLength, + hrtime: process.hrtime, + logger: serverHost, + canUseEvents: true + }; + var server = new ts.server.Session(opts); + // Fake the connection between the client and the server + serverHost.writeMessage = client.onMessage.bind(client); + clientHost.writeMessage = server.onMessage.bind(server); + // Wire the client to the host to get notifications when a file is open + // or edited. + clientHost.setClient(client); + // Set the properties + this.client = client; + this.host = clientHost; + } + ServerLanguageServiceAdapter.prototype.getHost = function () { return this.host; }; + ServerLanguageServiceAdapter.prototype.getLanguageService = function () { return this.client; }; + ServerLanguageServiceAdapter.prototype.getClassifier = function () { throw new Error("getClassifier is not available using the server interface."); }; + ServerLanguageServiceAdapter.prototype.getPreProcessedFileInfo = function () { throw new Error("getPreProcessedFileInfo is not available using the server interface."); }; + return ServerLanguageServiceAdapter; + }()); + LanguageService.ServerLanguageServiceAdapter = ServerLanguageServiceAdapter; + })(LanguageService = Harness.LanguageService || (Harness.LanguageService = {})); +})(Harness || (Harness = {})); +var ts; +(function (ts) { + var TestFSWithWatch; + (function (TestFSWithWatch) { + TestFSWithWatch.libFile = { + path: "/a/lib/lib.d.ts", + content: "/// \ninterface Boolean {}\ninterface Function {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array {}" + }; + TestFSWithWatch.safeList = { + path: "/safeList.json", + content: JSON.stringify({ + commander: "commander", + express: "express", + jquery: "jquery", + lodash: "lodash", + moment: "moment", + chroma: "chroma-js" + }) + }; + function getExecutingFilePathFromLibFile() { + return ts.combinePaths(ts.getDirectoryPath(TestFSWithWatch.libFile.path), "tsc.js"); + } + function createWatchedSystem(fileOrFolderList, params) { + if (!params) { + params = {}; + } + var host = new TestServerHost(/*withSafelist*/ false, params.useCaseSensitiveFileNames !== undefined ? params.useCaseSensitiveFileNames : false, params.executingFilePath || getExecutingFilePathFromLibFile(), params.currentDirectory || "/", fileOrFolderList, params.newLine, params.useWindowsStylePaths, params.environmentVariables); + return host; + } + TestFSWithWatch.createWatchedSystem = createWatchedSystem; + function createServerHost(fileOrFolderList, params) { + if (!params) { + params = {}; + } + var host = new TestServerHost(/*withSafelist*/ true, params.useCaseSensitiveFileNames !== undefined ? params.useCaseSensitiveFileNames : false, params.executingFilePath || getExecutingFilePathFromLibFile(), params.currentDirectory || "/", fileOrFolderList, params.newLine, params.useWindowsStylePaths, params.environmentVariables); + return host; + } + TestFSWithWatch.createServerHost = createServerHost; + function isFile(fileOrFolderOrSymLink) { + return ts.isString(fileOrFolderOrSymLink.content); + } + function isSymLink(fileOrFolderOrSymLink) { + return ts.isString(fileOrFolderOrSymLink.symLink); + } + function isFsFolder(s) { + return s && ts.isArray(s.entries); + } + function isFsFile(s) { + return s && ts.isString(s.content); + } + function isFsSymLink(s) { + return s && ts.isString(s.symLink); + } + function invokeWatcherCallbacks(callbacks, invokeCallback) { + if (callbacks) { + // The array copy is made to ensure that even if one of the callback removes the callbacks, + // we dont miss any callbacks following it + var cbs = callbacks.slice(); + for (var _i = 0, cbs_1 = cbs; _i < cbs_1.length; _i++) { + var cb = cbs_1[_i]; + invokeCallback(cb); + } + } + } + function getDiffInKeys(map, expectedKeys) { + if (map.size === expectedKeys.length) { + return ""; + } + var notInActual = []; + var duplicates = []; + var seen = ts.createMap(); + ts.forEach(expectedKeys, function (expectedKey) { + if (seen.has(expectedKey)) { + duplicates.push(expectedKey); + return; + } + seen.set(expectedKey, true); + if (!map.has(expectedKey)) { + notInActual.push(expectedKey); + } + }); + var inActualNotExpected = []; + map.forEach(function (_value, key) { + if (!seen.has(key)) { + inActualNotExpected.push(key); + } + seen.set(key, true); + }); + return "\n\nNotInActual: " + notInActual + "\nDuplicates: " + duplicates + "\nInActualButNotInExpected: " + inActualNotExpected; + } + function verifyMapSize(caption, map, expectedKeys) { + assert.equal(map.size, expectedKeys.length, caption + ": incorrect size of map: Actual keys: " + ts.arrayFrom(map.keys()) + " Expected: " + expectedKeys + getDiffInKeys(map, expectedKeys)); + } + TestFSWithWatch.verifyMapSize = verifyMapSize; + function checkMapKeys(caption, map, expectedKeys) { + verifyMapSize(caption, map, expectedKeys); + for (var _i = 0, expectedKeys_1 = expectedKeys; _i < expectedKeys_1.length; _i++) { + var name = expectedKeys_1[_i]; + assert.isTrue(map.has(name), caption + " is expected to contain " + name + ", actual keys: " + ts.arrayFrom(map.keys())); + } + } + function checkMultiMapKeyCount(caption, actual, expectedKeysMapOrArray, eachKeyCount) { + var expectedKeys = ts.isArray(expectedKeysMapOrArray) ? ts.arrayToMap(expectedKeysMapOrArray, function (s) { return s; }, function () { return eachKeyCount; }) : expectedKeysMapOrArray; + verifyMapSize(caption, actual, ts.arrayFrom(expectedKeys.keys())); + expectedKeys.forEach(function (count, name) { + assert.isTrue(actual.has(name), caption + ": expected to contain " + name + ", actual keys: " + ts.arrayFrom(actual.keys())); + assert.equal(actual.get(name).length, count, caption + ": Expected to be have " + count + " entries for " + name + ". Actual entry: " + JSON.stringify(actual.get(name))); + }); + } + TestFSWithWatch.checkMultiMapKeyCount = checkMultiMapKeyCount; + function checkArray(caption, actual, expected) { + assert.equal(actual.length, expected.length, caption + ": incorrect actual number of files, expected:\r\n" + expected.join("\r\n") + "\r\ngot: " + actual.join("\r\n")); + for (var _i = 0, expected_1 = expected; _i < expected_1.length; _i++) { + var f = expected_1[_i]; + assert.equal(true, ts.contains(actual, f), caption + ": expected to find " + f + " in " + actual); + } + } + TestFSWithWatch.checkArray = checkArray; + function checkWatchedFiles(host, expectedFiles) { + checkMapKeys("watchedFiles", host.watchedFiles, expectedFiles); + } + TestFSWithWatch.checkWatchedFiles = checkWatchedFiles; + function checkWatchedFilesDetailed(host, expectedFiles, eachFileWatchCount) { + if (ts.isArray(expectedFiles)) { + checkMultiMapKeyCount("watchedFiles", host.watchedFiles, expectedFiles, eachFileWatchCount); + } + else { + checkMultiMapKeyCount("watchedFiles", host.watchedFiles, expectedFiles); + } + } + TestFSWithWatch.checkWatchedFilesDetailed = checkWatchedFilesDetailed; + function checkWatchedDirectories(host, expectedDirectories, recursive) { + checkMapKeys("watchedDirectories" + (recursive ? " recursive" : ""), recursive ? host.watchedDirectoriesRecursive : host.watchedDirectories, expectedDirectories); + } + TestFSWithWatch.checkWatchedDirectories = checkWatchedDirectories; + function checkWatchedDirectoriesDetailed(host, expectedDirectories, recursiveOrEachDirectoryWatchCount, recursive) { + if (ts.isArray(expectedDirectories)) { + checkMultiMapKeyCount("watchedDirectories" + (recursive ? " recursive" : ""), recursive ? host.watchedDirectoriesRecursive : host.watchedDirectories, expectedDirectories, recursiveOrEachDirectoryWatchCount); + } + else { + recursive = recursiveOrEachDirectoryWatchCount; + checkMultiMapKeyCount("watchedDirectories" + (recursive ? " recursive" : ""), recursive ? host.watchedDirectoriesRecursive : host.watchedDirectories, expectedDirectories); + } + } + TestFSWithWatch.checkWatchedDirectoriesDetailed = checkWatchedDirectoriesDetailed; + function checkOutputContains(host, expected) { + var mapExpected = ts.arrayToSet(expected); + var mapSeen = ts.createMap(); + for (var _i = 0, _a = host.getOutput(); _i < _a.length; _i++) { + var f = _a[_i]; + assert.isUndefined(mapSeen.get(f), "Already found " + f + " in " + JSON.stringify(host.getOutput())); + if (mapExpected.has(f)) { + mapExpected.delete(f); + mapSeen.set(f, true); + } + } + assert.equal(mapExpected.size, 0, "Output has missing " + JSON.stringify(ts.arrayFrom(mapExpected.keys())) + " in " + JSON.stringify(host.getOutput())); + } + TestFSWithWatch.checkOutputContains = checkOutputContains; + function checkOutputDoesNotContain(host, expectedToBeAbsent) { + var mapExpectedToBeAbsent = ts.arrayToSet(expectedToBeAbsent); + for (var _i = 0, _a = host.getOutput(); _i < _a.length; _i++) { + var f = _a[_i]; + assert.isFalse(mapExpectedToBeAbsent.has(f), "Contains " + f + " in " + JSON.stringify(host.getOutput())); + } + } + TestFSWithWatch.checkOutputDoesNotContain = checkOutputDoesNotContain; + var Callbacks = /** @class */ (function () { + function Callbacks() { + this.map = []; + this.nextId = 1; + } + Callbacks.prototype.getNextId = function () { + return this.nextId; + }; + Callbacks.prototype.register = function (cb, args) { + var timeoutId = this.nextId; + this.nextId++; + this.map[timeoutId] = cb.bind.apply(cb, [/*this*/ undefined].concat(args)); + return timeoutId; + }; + Callbacks.prototype.unregister = function (id) { + if (typeof id === "number") { + delete this.map[id]; + } + }; + Callbacks.prototype.count = function () { + var n = 0; + for (var _ in this.map) { + n++; + } + return n; + }; + Callbacks.prototype.invoke = function (invokeKey) { + if (invokeKey) { + this.map[invokeKey](); + delete this.map[invokeKey]; + return; + } + // Note: invoking a callback may result in new callbacks been queued, + // so do not clear the entire callback list regardless. Only remove the + // ones we have invoked. + for (var key in this.map) { + this.map[key](); + delete this.map[key]; + } + }; + return Callbacks; + }()); + var Tsc_WatchDirectory; + (function (Tsc_WatchDirectory) { + Tsc_WatchDirectory["WatchFile"] = "RecursiveDirectoryUsingFsWatchFile"; + Tsc_WatchDirectory["NonRecursiveWatchDirectory"] = "RecursiveDirectoryUsingNonRecursiveWatchDirectory"; + Tsc_WatchDirectory["DynamicPolling"] = "RecursiveDirectoryUsingDynamicPriorityPolling"; + })(Tsc_WatchDirectory = TestFSWithWatch.Tsc_WatchDirectory || (TestFSWithWatch.Tsc_WatchDirectory = {})); + var timeIncrements = 1000; + var TestServerHost = /** @class */ (function () { + function TestServerHost(withSafeList, useCaseSensitiveFileNames, executingFilePath, currentDirectory, fileOrFolderorSymLinkList, newLine, useWindowsStylePath, environmentVariables) { + if (newLine === void 0) { newLine = "\n"; } + var _this = this; + this.withSafeList = withSafeList; + this.useCaseSensitiveFileNames = useCaseSensitiveFileNames; + this.newLine = newLine; + this.useWindowsStylePath = useWindowsStylePath; + this.environmentVariables = environmentVariables; + this.args = []; + this.output = []; + this.fs = ts.createMap(); + this.time = timeIncrements; + this.timeoutCallbacks = new Callbacks(); + this.immediateCallbacks = new Callbacks(); + this.screenClears = []; + this.watchedDirectories = ts.createMultiMap(); + this.watchedDirectoriesRecursive = ts.createMultiMap(); + this.watchedFiles = ts.createMultiMap(); + this.exitMessage = "System Exit"; + this.resolvePath = function (s) { return s; }; + this.getExecutingFilePath = function () { return _this.executingFilePath; }; + this.getCurrentDirectory = function () { return _this.currentDirectory; }; + this.getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); + this.toPath = function (s) { return ts.toPath(s, currentDirectory, _this.getCanonicalFileName); }; + this.executingFilePath = this.getHostSpecificPath(executingFilePath); + this.currentDirectory = this.getHostSpecificPath(currentDirectory); + this.reloadFS(fileOrFolderorSymLinkList); + this.dynamicPriorityWatchFile = this.environmentVariables && this.environmentVariables.get("TSC_WATCHFILE") === "DynamicPriorityPolling" ? + ts.createDynamicPriorityPollingWatchFile(this) : + undefined; + var tscWatchDirectory = this.environmentVariables && this.environmentVariables.get("TSC_WATCHDIRECTORY"); + if (tscWatchDirectory === Tsc_WatchDirectory.WatchFile) { + var watchDirectory = function (directory, cb) { return _this.watchFile(directory, function () { return cb(directory); }, ts.PollingInterval.Medium); }; + this.customRecursiveWatchDirectory = ts.createRecursiveDirectoryWatcher({ + directoryExists: function (path) { return _this.directoryExists(path); }, + getAccessibleSortedChildDirectories: function (path) { return _this.getDirectories(path); }, + filePathComparer: this.useCaseSensitiveFileNames ? ts.compareStringsCaseSensitive : ts.compareStringsCaseInsensitive, + watchDirectory: watchDirectory, + realpath: function (s) { return _this.realpath(s); } + }); + } + else if (tscWatchDirectory === Tsc_WatchDirectory.NonRecursiveWatchDirectory) { + var watchDirectory = function (directory, cb) { return _this.watchDirectory(directory, function (fileName) { return cb(fileName); }, /*recursive*/ false); }; + this.customRecursiveWatchDirectory = ts.createRecursiveDirectoryWatcher({ + directoryExists: function (path) { return _this.directoryExists(path); }, + getAccessibleSortedChildDirectories: function (path) { return _this.getDirectories(path); }, + filePathComparer: this.useCaseSensitiveFileNames ? ts.compareStringsCaseSensitive : ts.compareStringsCaseInsensitive, + watchDirectory: watchDirectory, + realpath: function (s) { return _this.realpath(s); } + }); + } + else if (tscWatchDirectory === Tsc_WatchDirectory.DynamicPolling) { + var watchFile_1 = ts.createDynamicPriorityPollingWatchFile(this); + var watchDirectory = function (directory, cb) { return watchFile_1(directory, function () { return cb(directory); }, ts.PollingInterval.Medium); }; + this.customRecursiveWatchDirectory = ts.createRecursiveDirectoryWatcher({ + directoryExists: function (path) { return _this.directoryExists(path); }, + getAccessibleSortedChildDirectories: function (path) { return _this.getDirectories(path); }, + filePathComparer: this.useCaseSensitiveFileNames ? ts.compareStringsCaseSensitive : ts.compareStringsCaseInsensitive, + watchDirectory: watchDirectory, + realpath: function (s) { return _this.realpath(s); } + }); + } + } + TestServerHost.prototype.getNewLine = function () { + return this.newLine; + }; + TestServerHost.prototype.toNormalizedAbsolutePath = function (s) { + return ts.getNormalizedAbsolutePath(s, this.currentDirectory); + }; + TestServerHost.prototype.toFullPath = function (s) { + return this.toPath(this.toNormalizedAbsolutePath(s)); + }; + TestServerHost.prototype.getHostSpecificPath = function (s) { + if (this.useWindowsStylePath && s.startsWith(ts.directorySeparator)) { + return "c:/" + s.substring(1); + } + return s; + }; + TestServerHost.prototype.now = function () { + this.time += timeIncrements; + return new Date(this.time); + }; + TestServerHost.prototype.reloadFS = function (fileOrFolderOrSymLinkList, options) { + var _this = this; + var mapNewLeaves = ts.createMap(); + var isNewFs = this.fs.size === 0; + fileOrFolderOrSymLinkList = fileOrFolderOrSymLinkList.concat(this.withSafeList ? TestFSWithWatch.safeList : []); + var filesOrFoldersToLoad = !this.useWindowsStylePath ? fileOrFolderOrSymLinkList : + fileOrFolderOrSymLinkList.map(function (f) { + var result = ts.clone(f); + result.path = _this.getHostSpecificPath(f.path); + return result; + }); + for (var _i = 0, filesOrFoldersToLoad_1 = filesOrFoldersToLoad; _i < filesOrFoldersToLoad_1.length; _i++) { + var fileOrDirectory = filesOrFoldersToLoad_1[_i]; + var path = this.toFullPath(fileOrDirectory.path); + mapNewLeaves.set(path, true); + // If its a change + var currentEntry = this.fs.get(path); + if (currentEntry) { + if (isFsFile(currentEntry)) { + if (isFile(fileOrDirectory)) { + // Update file + if (currentEntry.content !== fileOrDirectory.content) { + this.modifyFile(fileOrDirectory.path, fileOrDirectory.content, options); + } + } + else { + // TODO: Changing from file => folder/Symlink + } + } + else if (isFsSymLink(currentEntry)) { + // TODO: update symlinks + } + else { + // Folder + if (isFile(fileOrDirectory)) { + // TODO: Changing from folder => file + } + else { + // Folder update: Nothing to do. + currentEntry.modifiedTime = this.now(); + } + } + } + else { + this.ensureFileOrFolder(fileOrDirectory, options && options.ignoreWatchInvokedWithTriggerAsFileCreate); + } + } + if (!isNewFs) { + this.fs.forEach(function (fileOrDirectory, path) { + // If this entry is not from the new file or folder + if (!mapNewLeaves.get(path)) { + // Leaf entries that arent in new list => remove these + if (isFsFile(fileOrDirectory) || isFsSymLink(fileOrDirectory) || isFsFolder(fileOrDirectory) && fileOrDirectory.entries.length === 0) { + _this.removeFileOrFolder(fileOrDirectory, function (folder) { return !mapNewLeaves.get(folder.path); }); + } + } + }); + } + }; + TestServerHost.prototype.modifyFile = function (filePath, content, options) { + var path = this.toFullPath(filePath); + var currentEntry = this.fs.get(path); + if (!currentEntry || !isFsFile(currentEntry)) { + throw new Error("file not present: " + filePath); + } + if (options && options.invokeFileDeleteCreateAsPartInsteadOfChange) { + this.removeFileOrFolder(currentEntry, ts.returnFalse); + this.ensureFileOrFolder({ path: filePath, content: content }); + } + else { + currentEntry.content = content; + currentEntry.modifiedTime = this.now(); + this.fs.get(ts.getDirectoryPath(currentEntry.path)).modifiedTime = this.now(); + if (options && options.invokeDirectoryWatcherInsteadOfFileChanged) { + this.invokeDirectoryWatcher(ts.getDirectoryPath(currentEntry.fullPath), currentEntry.fullPath); + } + else { + this.invokeFileWatcher(currentEntry.fullPath, ts.FileWatcherEventKind.Changed); + } + } + }; + TestServerHost.prototype.renameFolder = function (folderName, newFolderName) { + var fullPath = ts.getNormalizedAbsolutePath(folderName, this.currentDirectory); + var path = this.toPath(fullPath); + var folder = this.fs.get(path); + ts.Debug.assert(!!folder); + // Only remove the folder + this.removeFileOrFolder(folder, ts.returnFalse, /*isRenaming*/ true); + // Add updated folder with new folder name + var newFullPath = ts.getNormalizedAbsolutePath(newFolderName, this.currentDirectory); + var newFolder = this.toFsFolder(newFullPath); + var newPath = newFolder.path; + var basePath = ts.getDirectoryPath(path); + ts.Debug.assert(basePath !== path); + ts.Debug.assert(basePath === ts.getDirectoryPath(newPath)); + var baseFolder = this.fs.get(basePath); + this.addFileOrFolderInFolder(baseFolder, newFolder); + // Invoke watches for files in the folder as deleted (from old path) + this.renameFolderEntries(folder, newFolder); + }; + TestServerHost.prototype.renameFolderEntries = function (oldFolder, newFolder) { + for (var _i = 0, _a = oldFolder.entries; _i < _a.length; _i++) { + var entry = _a[_i]; + this.fs.delete(entry.path); + this.invokeFileWatcher(entry.fullPath, ts.FileWatcherEventKind.Deleted); + entry.fullPath = ts.combinePaths(newFolder.fullPath, ts.getBaseFileName(entry.fullPath)); + entry.path = this.toPath(entry.fullPath); + if (newFolder !== oldFolder) { + newFolder.entries.push(entry); + } + this.fs.set(entry.path, entry); + this.invokeFileWatcher(entry.fullPath, ts.FileWatcherEventKind.Created); + if (isFsFolder(entry)) { + this.renameFolderEntries(entry, entry); + } + } + }; + TestServerHost.prototype.ensureFileOrFolder = function (fileOrDirectoryOrSymLink, ignoreWatchInvokedWithTriggerAsFileCreate) { + if (isFile(fileOrDirectoryOrSymLink)) { + var file = this.toFsFile(fileOrDirectoryOrSymLink); + // file may already exist when updating existing type declaration file + if (!this.fs.get(file.path)) { + var baseFolder = this.ensureFolder(ts.getDirectoryPath(file.fullPath)); + this.addFileOrFolderInFolder(baseFolder, file, ignoreWatchInvokedWithTriggerAsFileCreate); + } + } + else if (isSymLink(fileOrDirectoryOrSymLink)) { + var symLink = this.toFsSymLink(fileOrDirectoryOrSymLink); + ts.Debug.assert(!this.fs.get(symLink.path)); + var baseFolder = this.ensureFolder(ts.getDirectoryPath(symLink.fullPath)); + this.addFileOrFolderInFolder(baseFolder, symLink, ignoreWatchInvokedWithTriggerAsFileCreate); + } + else { + var fullPath = ts.getNormalizedAbsolutePath(fileOrDirectoryOrSymLink.path, this.currentDirectory); + this.ensureFolder(fullPath); + } + }; + TestServerHost.prototype.ensureFolder = function (fullPath) { + var path = this.toPath(fullPath); + var folder = this.fs.get(path); + if (!folder) { + folder = this.toFsFolder(fullPath); + var baseFullPath = ts.getDirectoryPath(fullPath); + if (fullPath !== baseFullPath) { + // Add folder in the base folder + var baseFolder = this.ensureFolder(baseFullPath); + this.addFileOrFolderInFolder(baseFolder, folder); + } + else { + // root folder + ts.Debug.assert(this.fs.size === 0); + this.fs.set(path, folder); + } + } + ts.Debug.assert(isFsFolder(folder)); + return folder; + }; + TestServerHost.prototype.addFileOrFolderInFolder = function (folder, fileOrDirectory, ignoreWatch) { + ts.insertSorted(folder.entries, fileOrDirectory, function (a, b) { return ts.compareStringsCaseSensitive(ts.getBaseFileName(a.path), ts.getBaseFileName(b.path)); }); + folder.modifiedTime = this.now(); + this.fs.set(fileOrDirectory.path, fileOrDirectory); + if (ignoreWatch) { + return; + } + this.invokeFileWatcher(fileOrDirectory.fullPath, ts.FileWatcherEventKind.Created); + this.invokeDirectoryWatcher(folder.fullPath, fileOrDirectory.fullPath); + }; + TestServerHost.prototype.removeFileOrFolder = function (fileOrDirectory, isRemovableLeafFolder, isRenaming) { + if (isRenaming === void 0) { isRenaming = false; } + var basePath = ts.getDirectoryPath(fileOrDirectory.path); + var baseFolder = this.fs.get(basePath); + if (basePath !== fileOrDirectory.path) { + ts.Debug.assert(!!baseFolder); + baseFolder.modifiedTime = this.now(); + ts.filterMutate(baseFolder.entries, function (entry) { return entry !== fileOrDirectory; }); + } + this.fs.delete(fileOrDirectory.path); + this.invokeFileWatcher(fileOrDirectory.fullPath, ts.FileWatcherEventKind.Deleted); + if (isFsFolder(fileOrDirectory)) { + ts.Debug.assert(fileOrDirectory.entries.length === 0 || isRenaming); + var relativePath = this.getRelativePathToDirectory(fileOrDirectory.fullPath, fileOrDirectory.fullPath); + // Invoke directory and recursive directory watcher for the folder + // Here we arent invoking recursive directory watchers for the base folders + // since that is something we would want to do for both file as well as folder we are deleting + this.invokeWatchedDirectoriesCallback(fileOrDirectory.fullPath, relativePath); + this.invokeWatchedDirectoriesRecursiveCallback(fileOrDirectory.fullPath, relativePath); + } + if (basePath !== fileOrDirectory.path) { + if (baseFolder.entries.length === 0 && isRemovableLeafFolder(baseFolder)) { + this.removeFileOrFolder(baseFolder, isRemovableLeafFolder); + } + else { + this.invokeRecursiveDirectoryWatcher(baseFolder.fullPath, fileOrDirectory.fullPath); + } + } + }; + TestServerHost.prototype.removeFolder = function (folderPath, recursive) { + var _this = this; + var path = this.toFullPath(folderPath); + var currentEntry = this.fs.get(path); + ts.Debug.assert(isFsFolder(currentEntry)); + if (recursive && currentEntry.entries.length) { + var subEntries = currentEntry.entries.slice(); + subEntries.forEach(function (fsEntry) { + if (isFsFolder(fsEntry)) { + _this.removeFolder(fsEntry.fullPath, recursive); + } + else { + _this.removeFileOrFolder(fsEntry, ts.returnFalse); + } + }); + } + this.removeFileOrFolder(currentEntry, ts.returnFalse); + }; + // For overriding the methods + TestServerHost.prototype.invokeWatchedDirectoriesCallback = function (folderFullPath, relativePath) { + var _this = this; + invokeWatcherCallbacks(this.watchedDirectories.get(this.toPath(folderFullPath)), function (cb) { return _this.directoryCallback(cb, relativePath); }); + }; + TestServerHost.prototype.invokeWatchedDirectoriesRecursiveCallback = function (folderFullPath, relativePath) { + var _this = this; + invokeWatcherCallbacks(this.watchedDirectoriesRecursive.get(this.toPath(folderFullPath)), function (cb) { return _this.directoryCallback(cb, relativePath); }); + }; + TestServerHost.prototype.invokeFileWatcher = function (fileFullPath, eventKind, useFileNameInCallback) { + invokeWatcherCallbacks(this.watchedFiles.get(this.toPath(fileFullPath)), function (_a) { + var cb = _a.cb, fileName = _a.fileName; + return cb(useFileNameInCallback ? fileName : fileFullPath, eventKind); + }); + }; + TestServerHost.prototype.getRelativePathToDirectory = function (directoryFullPath, fileFullPath) { + return ts.getRelativePathToDirectoryOrUrl(directoryFullPath, fileFullPath, this.currentDirectory, this.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + }; + /** + * This will call the directory watcher for the folderFullPath and recursive directory watchers for this and base folders + */ + TestServerHost.prototype.invokeDirectoryWatcher = function (folderFullPath, fileName) { + var relativePath = this.getRelativePathToDirectory(folderFullPath, fileName); + // Folder is changed when the directory watcher is invoked + this.invokeFileWatcher(folderFullPath, ts.FileWatcherEventKind.Changed, /*useFileNameInCallback*/ true); + this.invokeWatchedDirectoriesCallback(folderFullPath, relativePath); + this.invokeRecursiveDirectoryWatcher(folderFullPath, fileName); + }; + TestServerHost.prototype.directoryCallback = function (_a, relativePath) { + var cb = _a.cb, directoryName = _a.directoryName; + cb(ts.combinePaths(directoryName, relativePath)); + }; + /** + * This will call the recursive directory watcher for this directory as well as all the base directories + */ + TestServerHost.prototype.invokeRecursiveDirectoryWatcher = function (fullPath, fileName) { + var relativePath = this.getRelativePathToDirectory(fullPath, fileName); + this.invokeWatchedDirectoriesRecursiveCallback(fullPath, relativePath); + var basePath = ts.getDirectoryPath(fullPath); + if (this.getCanonicalFileName(fullPath) !== this.getCanonicalFileName(basePath)) { + this.invokeRecursiveDirectoryWatcher(basePath, fileName); + } + }; + TestServerHost.prototype.toFsEntry = function (path) { + var fullPath = ts.getNormalizedAbsolutePath(path, this.currentDirectory); + return { + path: this.toPath(fullPath), + fullPath: fullPath, + modifiedTime: this.now() + }; + }; + TestServerHost.prototype.toFsFile = function (file) { + var fsFile = this.toFsEntry(file.path); + fsFile.content = file.content; + fsFile.fileSize = file.fileSize; + return fsFile; + }; + TestServerHost.prototype.toFsSymLink = function (symLink) { + var fsSymLink = this.toFsEntry(symLink.path); + fsSymLink.symLink = ts.getNormalizedAbsolutePath(symLink.symLink, ts.getDirectoryPath(fsSymLink.fullPath)); + return fsSymLink; + }; + TestServerHost.prototype.toFsFolder = function (path) { + var fsFolder = this.toFsEntry(path); + fsFolder.entries = []; // https://github.com/Microsoft/TypeScript/issues/19873 + return fsFolder; + }; + TestServerHost.prototype.getRealFsEntry = function (isFsEntry, path, fsEntry) { + if (fsEntry === void 0) { fsEntry = this.fs.get(path); } + if (isFsEntry(fsEntry)) { + return fsEntry; + } + if (isFsSymLink(fsEntry)) { + return this.getRealFsEntry(isFsEntry, this.toPath(fsEntry.symLink)); + } + if (fsEntry) { + // This fs entry is something else + return undefined; + } + var realpath = this.realpath(path); + if (path !== realpath) { + return this.getRealFsEntry(isFsEntry, this.toPath(realpath)); + } + return undefined; + }; + TestServerHost.prototype.isFsFile = function (fsEntry) { + return !!this.getRealFile(fsEntry.path, fsEntry); + }; + TestServerHost.prototype.getRealFile = function (path, fsEntry) { + return this.getRealFsEntry(isFsFile, path, fsEntry); + }; + TestServerHost.prototype.isFsFolder = function (fsEntry) { + return !!this.getRealFolder(fsEntry.path, fsEntry); + }; + TestServerHost.prototype.getRealFolder = function (path, fsEntry) { + if (fsEntry === void 0) { fsEntry = this.fs.get(path); } + return this.getRealFsEntry(isFsFolder, path, fsEntry); + }; + TestServerHost.prototype.fileExists = function (s) { + var path = this.toFullPath(s); + return !!this.getRealFile(path); + }; + TestServerHost.prototype.getModifiedTime = function (s) { + var path = this.toFullPath(s); + var fsEntry = this.fs.get(path); + return (fsEntry && fsEntry.modifiedTime); // TODO: GH#18217 + }; + TestServerHost.prototype.readFile = function (s) { + var fsEntry = this.getRealFile(this.toFullPath(s)); + return fsEntry ? fsEntry.content : undefined; + }; + TestServerHost.prototype.getFileSize = function (s) { + var path = this.toFullPath(s); + var entry = this.fs.get(path); + if (isFsFile(entry)) { + return entry.fileSize ? entry.fileSize : entry.content.length; + } + return undefined; // TODO: GH#18217 + }; + TestServerHost.prototype.directoryExists = function (s) { + var path = this.toFullPath(s); + return !!this.getRealFolder(path); + }; + TestServerHost.prototype.getDirectories = function (s) { + var _this = this; + var path = this.toFullPath(s); + var folder = this.getRealFolder(path); + if (folder) { + return ts.mapDefined(folder.entries, function (entry) { return _this.isFsFolder(entry) ? ts.getBaseFileName(entry.fullPath) : undefined; }); + } + ts.Debug.fail(folder ? "getDirectories called on file" : "getDirectories called on missing folder"); + return []; + }; + TestServerHost.prototype.readDirectory = function (path, extensions, exclude, include, depth) { + var _this = this; + return ts.matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, function (dir) { + var directories = []; + var files = []; + var folder = _this.getRealFolder(_this.toPath(dir)); + if (folder) { + folder.entries.forEach(function (entry) { + if (_this.isFsFolder(entry)) { + directories.push(ts.getBaseFileName(entry.fullPath)); + } + else if (_this.isFsFile(entry)) { + files.push(ts.getBaseFileName(entry.fullPath)); + } + else { + ts.Debug.fail("Unknown entry"); + } + }); + } + return { directories: directories, files: files }; + }); + }; + TestServerHost.prototype.watchDirectory = function (directoryName, cb, recursive) { + if (recursive && this.customRecursiveWatchDirectory) { + return this.customRecursiveWatchDirectory(directoryName, cb, /*recursive*/ true); + } + var path = this.toFullPath(directoryName); + var map = recursive ? this.watchedDirectoriesRecursive : this.watchedDirectories; + var callback = { + cb: cb, + directoryName: directoryName + }; + map.add(path, callback); + return { + close: function () { return map.remove(path, callback); } + }; + }; + TestServerHost.prototype.createHash = function (s) { + return Harness.mockHash(s); + }; + TestServerHost.prototype.createSHA256Hash = function (s) { + return ts.sys.createSHA256Hash(s); + }; + TestServerHost.prototype.watchFile = function (fileName, cb, pollingInterval) { + var _this = this; + if (this.dynamicPriorityWatchFile) { + return this.dynamicPriorityWatchFile(fileName, cb, pollingInterval); + } + var path = this.toFullPath(fileName); + var callback = { fileName: fileName, cb: cb }; + this.watchedFiles.add(path, callback); + return { close: function () { return _this.watchedFiles.remove(path, callback); } }; + }; + // TOOD: record and invoke callbacks to simulate timer events + TestServerHost.prototype.setTimeout = function (callback, _time) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return this.timeoutCallbacks.register(callback, args); + }; + TestServerHost.prototype.getNextTimeoutId = function () { + return this.timeoutCallbacks.getNextId(); + }; + TestServerHost.prototype.clearTimeout = function (timeoutId) { + this.timeoutCallbacks.unregister(timeoutId); + }; + TestServerHost.prototype.clearScreen = function () { + this.screenClears.push(this.output.length); + }; + TestServerHost.prototype.checkTimeoutQueueLengthAndRun = function (expected) { + this.checkTimeoutQueueLength(expected); + this.runQueuedTimeoutCallbacks(); + }; + TestServerHost.prototype.checkTimeoutQueueLength = function (expected) { + var callbacksCount = this.timeoutCallbacks.count(); + assert.equal(callbacksCount, expected, "expected " + expected + " timeout callbacks queued but found " + callbacksCount + "."); + }; + TestServerHost.prototype.runQueuedTimeoutCallbacks = function (timeoutId) { + try { + this.timeoutCallbacks.invoke(timeoutId); + } + catch (e) { + if (e.message === this.exitMessage) { + return; + } + throw e; + } + }; + TestServerHost.prototype.runQueuedImmediateCallbacks = function (checkCount) { + if (checkCount !== undefined) { + assert.equal(this.immediateCallbacks.count(), checkCount); + } + this.immediateCallbacks.invoke(); + }; + TestServerHost.prototype.setImmediate = function (callback, _time) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + return this.immediateCallbacks.register(callback, args); + }; + TestServerHost.prototype.clearImmediate = function (timeoutId) { + this.immediateCallbacks.unregister(timeoutId); + }; + TestServerHost.prototype.createDirectory = function (directoryName) { + var folder = this.toFsFolder(directoryName); + // base folder has to be present + var base = ts.getDirectoryPath(folder.path); + var baseFolder = this.fs.get(base); + ts.Debug.assert(isFsFolder(baseFolder)); + ts.Debug.assert(!this.fs.get(folder.path)); + this.addFileOrFolderInFolder(baseFolder, folder); + }; + TestServerHost.prototype.writeFile = function (path, content) { + var file = this.toFsFile({ path: path, content: content }); + // base folder has to be present + var base = ts.getDirectoryPath(file.path); + var folder = this.fs.get(base); + ts.Debug.assert(isFsFolder(folder)); + this.addFileOrFolderInFolder(folder, file); + }; + TestServerHost.prototype.write = function (message) { + this.output.push(message); + }; + TestServerHost.prototype.getOutput = function () { + return this.output; + }; + TestServerHost.prototype.clearOutput = function () { + ts.clear(this.output); + this.screenClears.length = 0; + }; + TestServerHost.prototype.realpath = function (s) { + var fullPath = this.toNormalizedAbsolutePath(s); + var path = this.toPath(fullPath); + if (ts.getDirectoryPath(path) === path) { + // Root + return s; + } + var dirFullPath = this.realpath(ts.getDirectoryPath(fullPath)); + var realFullPath = ts.combinePaths(dirFullPath, ts.getBaseFileName(fullPath)); + var fsEntry = this.fs.get(this.toPath(realFullPath)); + if (isFsSymLink(fsEntry)) { + return this.realpath(fsEntry.symLink); + } + return realFullPath; + }; + TestServerHost.prototype.exit = function (exitCode) { + this.exitCode = exitCode; + throw new Error(this.exitMessage); + }; + TestServerHost.prototype.getEnvironmentVariable = function (name) { + return this.environmentVariables && this.environmentVariables.get(name) || ""; + }; + return TestServerHost; + }()); + TestFSWithWatch.TestServerHost = TestServerHost; + })(TestFSWithWatch = ts.TestFSWithWatch || (ts.TestFSWithWatch = {})); +})(ts || (ts = {})); +var FourSlash; +(function (FourSlash) { + ts.disableIncrementalParsing = false; + var FourSlashTestType; + (function (FourSlashTestType) { + FourSlashTestType[FourSlashTestType["Native"] = 0] = "Native"; + FourSlashTestType[FourSlashTestType["Shims"] = 1] = "Shims"; + FourSlashTestType[FourSlashTestType["ShimsWithPreprocess"] = 2] = "ShimsWithPreprocess"; + FourSlashTestType[FourSlashTestType["Server"] = 3] = "Server"; + })(FourSlashTestType = FourSlash.FourSlashTestType || (FourSlash.FourSlashTestType = {})); + // Name of testcase metadata including ts.CompilerOptions properties that will be used by globalOptions + // To add additional option, add property into the testOptMetadataNames, refer the property in either globalMetadataNames or fileMetadataNames + // Add cases into convertGlobalOptionsToCompilationsSettings function for the compiler to acknowledge such option from meta data + var MetadataOptionNames; + (function (MetadataOptionNames) { + MetadataOptionNames["baselineFile"] = "BaselineFile"; + MetadataOptionNames["emitThisFile"] = "emitThisFile"; + MetadataOptionNames["fileName"] = "Filename"; + MetadataOptionNames["resolveReference"] = "ResolveReference"; + MetadataOptionNames["symlink"] = "Symlink"; + })(MetadataOptionNames || (MetadataOptionNames = {})); + // List of allowed metadata names + var fileMetadataNames = ["Filename" /* fileName */, "emitThisFile" /* emitThisFile */, "ResolveReference" /* resolveReference */, "Symlink" /* symlink */]; + function convertGlobalOptionsToCompilerOptions(globalOptions) { + var settings = { target: 1 /* ES5 */ }; + Harness.Compiler.setCompilerOptionsFromHarnessSetting(globalOptions, settings); + return settings; + } + var TestCancellationToken = /** @class */ (function () { + function TestCancellationToken() { + this.numberOfCallsBeforeCancellation = TestCancellationToken.notCanceled; + } + TestCancellationToken.prototype.isCancellationRequested = function () { + if (this.numberOfCallsBeforeCancellation < 0) { + return false; + } + if (this.numberOfCallsBeforeCancellation > 0) { + this.numberOfCallsBeforeCancellation--; + return false; + } + return true; + }; + TestCancellationToken.prototype.setCancelled = function (numberOfCalls) { + if (numberOfCalls === void 0) { numberOfCalls = 0; } + ts.Debug.assert(numberOfCalls >= 0); + this.numberOfCallsBeforeCancellation = numberOfCalls; + }; + TestCancellationToken.prototype.resetCancelled = function () { + this.numberOfCallsBeforeCancellation = TestCancellationToken.notCanceled; + }; + // 0 - cancelled + // >0 - not cancelled + // <0 - not cancelled and value denotes number of isCancellationRequested after which token become cancelled + TestCancellationToken.notCanceled = -1; + return TestCancellationToken; + }()); + FourSlash.TestCancellationToken = TestCancellationToken; + function verifyOperationIsCancelled(f) { + try { + f(); + } + catch (e) { + if (e instanceof ts.OperationCanceledException) { + return; + } + } + throw new Error("Operation should be cancelled"); + } + FourSlash.verifyOperationIsCancelled = verifyOperationIsCancelled; + // This function creates IScriptSnapshot object for testing getPreProcessedFileInfo + // Return object may lack some functionalities for other purposes. + function createScriptSnapShot(sourceText) { + return ts.ScriptSnapshot.fromString(sourceText); + } + var TestState = /** @class */ (function () { + function TestState(basePath, testType, testData) { + var _a; + var _this = this; + this.basePath = basePath; + this.testType = testType; + this.testData = testData; + // The current caret position in the active file + this.currentCaretPosition = 0; + // The position of the end of the current selection, or -1 if nothing is selected + this.selectionEnd = -1; + this.lastKnownMarker = ""; + // Whether or not we should format on keystrokes + this.enableFormatting = true; + this.inputFiles = ts.createMap(); // Map between inputFile's fileName and its content for easily looking up when resolving references + this.alignmentForExtraInfo = 50; + // Create a new Services Adapter + this.cancellationToken = new TestCancellationToken(); + var compilationOptions = convertGlobalOptionsToCompilerOptions(this.testData.globalOptions); + compilationOptions.skipDefaultLibCheck = true; + // Initialize the language service with all the scripts + var startResolveFileRef; + var configFileName; + for (var _i = 0, _b = testData.files; _i < _b.length; _i++) { + var file = _b[_i]; + // Create map between fileName and its content for easily looking up when resolveReference flag is specified + this.inputFiles.set(file.fileName, file.content); + if (isConfig(file)) { + var configJson = ts.parseConfigFileTextToJson(file.fileName, file.content); + if (configJson.config === undefined) { + throw new Error("Failed to parse test " + file.fileName + ": " + configJson.error.messageText); + } + // Extend our existing compiler options so that we can also support tsconfig only options + if (configJson.config.compilerOptions) { + var baseDirectory = ts.normalizePath(ts.getDirectoryPath(file.fileName)); + var tsConfig = ts.convertCompilerOptionsFromJson(configJson.config.compilerOptions, baseDirectory, file.fileName); + if (!tsConfig.errors || !tsConfig.errors.length) { + compilationOptions = ts.extend(compilationOptions, tsConfig.options); + } + } + configFileName = file.fileName; + } + if (!startResolveFileRef && file.fileOptions["ResolveReference" /* resolveReference */] === "true") { + startResolveFileRef = file; + } + else if (startResolveFileRef) { + // If entry point for resolving file references is already specified, report duplication error + throw new Error("There exists a Fourslash file which has resolveReference flag specified; remove duplicated resolveReference flag"); + } + } + if (configFileName) { + var baseDir = ts.normalizePath(ts.getDirectoryPath(configFileName)); + var files_2 = (_a = {}, _a[baseDir] = {}, _a); + this.inputFiles.forEach(function (data, path) { + var scriptInfo = new Harness.LanguageService.ScriptInfo(path, undefined, /*isRootFile*/ false); // TODO: GH#18217 + files_2[path] = new vfs.File(data, { meta: { scriptInfo: scriptInfo } }); + }); + var fs = new vfs.FileSystem(/*ignoreCase*/ true, { cwd: baseDir, files: files_2 }); + var host = new fakes.ParseConfigHost(fs); + var jsonSourceFile = ts.parseJsonText(configFileName, this.inputFiles.get(configFileName)); + compilationOptions = ts.parseJsonSourceFileConfigFileContent(jsonSourceFile, host, baseDir, compilationOptions, configFileName).options; + } + if (compilationOptions.typeRoots) { + compilationOptions.typeRoots = compilationOptions.typeRoots.map(function (p) { return ts.getNormalizedAbsolutePath(p, _this.basePath); }); + } + var languageServiceAdapter = this.getLanguageServiceAdapter(testType, this.cancellationToken, compilationOptions); + this.languageServiceAdapterHost = languageServiceAdapter.getHost(); + this.languageService = memoWrap(languageServiceAdapter.getLanguageService(), this); // Wrap the LS to cache some expensive operations certain tests call repeatedly + if (startResolveFileRef) { + // Add the entry-point file itself into the languageServiceShimHost + this.languageServiceAdapterHost.addScript(startResolveFileRef.fileName, startResolveFileRef.content, /*isRootFile*/ true); + var resolvedResult = languageServiceAdapter.getPreProcessedFileInfo(startResolveFileRef.fileName, startResolveFileRef.content); + var referencedFiles = resolvedResult.referencedFiles; + var importedFiles = resolvedResult.importedFiles; + // Add triple reference files into language-service host + ts.forEach(referencedFiles, function (referenceFile) { + // Fourslash insert tests/cases/fourslash into inputFile.unitName so we will properly append the same base directory to refFile path + var referenceFilePath = _this.basePath + "/" + referenceFile.fileName; + _this.addMatchedInputFile(referenceFilePath, /* extensions */ undefined); + }); + // Add import files into language-service host + ts.forEach(importedFiles, function (importedFile) { + // Fourslash insert tests/cases/fourslash into inputFile.unitName and import statement doesn't require ".ts" + // so convert them before making appropriate comparison + var importedFilePath = _this.basePath + "/" + importedFile.fileName; + _this.addMatchedInputFile(importedFilePath, ts.getSupportedExtensions(compilationOptions)); + }); + // Check if no-default-lib flag is false and if so add default library + if (!resolvedResult.isLibFile) { + this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, Harness.Compiler.getDefaultLibrarySourceFile().text, /*isRootFile*/ false); + } + } + else { + // resolveReference file-option is not specified then do not resolve any files and include all inputFiles + this.inputFiles.forEach(function (file, fileName) { + if (!Harness.isDefaultLibraryFile(fileName)) { + _this.languageServiceAdapterHost.addScript(fileName, file, /*isRootFile*/ true); + } + }); + if (!compilationOptions.noLib) { + this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, Harness.Compiler.getDefaultLibrarySourceFile().text, /*isRootFile*/ false); + } + } + var _loop_3 = function (file) { + ts.forEach(file.symlinks, function (link) { + _this.languageServiceAdapterHost.vfs.mkdirpSync(vpath.dirname(link)); + _this.languageServiceAdapterHost.vfs.symlinkSync(file.fileName, link); + }); + }; + for (var _c = 0, _d = testData.files; _c < _d.length; _c++) { + var file = _d[_c]; + _loop_3(file); + } + this.formatCodeSettings = { + baseIndentSize: 0, + indentSize: 4, + tabSize: 4, + newLineCharacter: "\n", + convertTabsToSpaces: true, + indentStyle: ts.IndentStyle.Smart, + insertSpaceAfterCommaDelimiter: true, + insertSpaceAfterSemicolonInForStatements: true, + insertSpaceBeforeAndAfterBinaryOperators: true, + insertSpaceAfterConstructor: false, + insertSpaceAfterKeywordsInControlFlowStatements: true, + insertSpaceAfterFunctionKeywordForAnonymousFunctions: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true, + insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false, + insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false, + insertSpaceAfterTypeAssertion: false, + placeOpenBraceOnNewLineForFunctions: false, + placeOpenBraceOnNewLineForControlBlocks: false, + insertSpaceBeforeTypeAnnotation: false + }; + // Open the first file by default + this.openFile(0); + function memoWrap(ls, target) { + var cacheableMembers = [ + "getCompletionEntryDetails", + "getCompletionEntrySymbol", + "getQuickInfoAtPosition", + "getReferencesAtPosition", + "getDocumentHighlights", + ]; + var proxy = {}; + var _loop_4 = function (k) { + var key = k; + if (cacheableMembers.indexOf(key) === -1) { + proxy[key] = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return ls[key].apply(ls, args); + }; + return "continue"; + } + var memo = Utils.memoize(function (_version, _active, _caret, _selectEnd, _marker) { + var args = []; + for (var _i = 5; _i < arguments.length; _i++) { + args[_i - 5] = arguments[_i]; + } + return ls[key].apply(ls, args); + }, function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return args.join("|,|"); + }); + proxy[key] = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return memo.apply(void 0, [target.languageServiceAdapterHost.getScriptInfo(target.activeFile.fileName).version, + target.activeFile.fileName, + target.currentCaretPosition, + target.selectionEnd, + target.lastKnownMarker].concat(args)); + }; + }; + for (var k in ls) { + _loop_4(k); + } + return proxy; + } + } + TestState.getDisplayPartsJson = function (displayParts) { + var result = ""; + ts.forEach(displayParts, function (part) { + if (result) { + result += ",\n "; + } + else { + result = "[\n "; + } + result += JSON.stringify(part); + }); + if (result) { + result += "\n]"; + } + return result; + }; + // Add input file which has matched file name with the given reference-file path. + // This is necessary when resolveReference flag is specified + TestState.prototype.addMatchedInputFile = function (referenceFilePath, extensions) { + var inputFiles = this.inputFiles; + var languageServiceAdapterHost = this.languageServiceAdapterHost; + var didAdd = tryAdd(referenceFilePath); + if (extensions && !didAdd) { + ts.forEach(extensions, function (ext) { return tryAdd(referenceFilePath + ext); }); + } + function tryAdd(path) { + var inputFile = inputFiles.get(path); + if (inputFile && !Harness.isDefaultLibraryFile(path)) { + languageServiceAdapterHost.addScript(path, inputFile, /*isRootFile*/ true); + return true; + } + } + }; + TestState.prototype.getLanguageServiceAdapter = function (testType, cancellationToken, compilationOptions) { + switch (testType) { + case 0 /* Native */: + return new Harness.LanguageService.NativeLanguageServiceAdapter(cancellationToken, compilationOptions); + case 1 /* Shims */: + return new Harness.LanguageService.ShimLanguageServiceAdapter(/*preprocessToResolve*/ false, cancellationToken, compilationOptions); + case 2 /* ShimsWithPreprocess */: + return new Harness.LanguageService.ShimLanguageServiceAdapter(/*preprocessToResolve*/ true, cancellationToken, compilationOptions); + case 3 /* Server */: + return new Harness.LanguageService.ServerLanguageServiceAdapter(cancellationToken, compilationOptions); + default: + throw new Error("Unknown FourSlash test type: "); + } + }; + TestState.prototype.getFileContent = function (fileName) { + var script = this.languageServiceAdapterHost.getScriptInfo(fileName); + return script.content; + }; + // Entry points from fourslash.ts + TestState.prototype.goToMarker = function (name) { + if (name === void 0) { name = ""; } + var marker = ts.isString(name) ? this.getMarkerByName(name) : name; + if (this.activeFile.fileName !== marker.fileName) { + this.openFile(marker.fileName); + } + var content = this.getFileContent(marker.fileName); + if (marker.position === -1 || marker.position > content.length) { + throw new Error("Marker \"" + name + "\" has been invalidated by unrecoverable edits to the file."); + } + var mName = ts.isString(name) ? name : this.markerName(marker); + this.lastKnownMarker = mName; + this.goToPosition(marker.position); + }; + TestState.prototype.goToEachMarker = function (markers, action) { + assert(markers.length); + for (var i = 0; i < markers.length; i++) { + this.goToMarker(markers[i]); + action(markers[i], i); + } + }; + TestState.prototype.goToEachRange = function (action) { + var ranges = this.getRanges(); + assert(ranges.length); + for (var _i = 0, ranges_1 = ranges; _i < ranges_1.length; _i++) { + var range = ranges_1[_i]; + this.selectRange(range); + action(); + } + }; + TestState.prototype.markerName = function (m) { + return ts.forEachEntry(this.testData.markerPositions, function (marker, name) { + if (marker === m) { + return name; + } + }); + }; + TestState.prototype.goToPosition = function (pos) { + this.currentCaretPosition = pos; + this.selectionEnd = -1; + }; + TestState.prototype.select = function (startMarker, endMarker) { + var start = this.getMarkerByName(startMarker), end = this.getMarkerByName(endMarker); + ts.Debug.assert(start.fileName === end.fileName); + if (this.activeFile.fileName !== start.fileName) { + this.openFile(start.fileName); + } + this.goToPosition(start.position); + this.selectionEnd = end.position; + }; + TestState.prototype.selectRange = function (range) { + this.goToRangeStart(range); + this.selectionEnd = range.end; + }; + TestState.prototype.moveCaretRight = function (count) { + if (count === void 0) { count = 1; } + this.currentCaretPosition += count; + this.currentCaretPosition = Math.min(this.currentCaretPosition, this.getFileContent(this.activeFile.fileName).length); + this.selectionEnd = -1; + }; + // Opens a file given its 0-based index or fileName + TestState.prototype.openFile = function (indexOrName, content, scriptKindName) { + var fileToOpen = this.findFile(indexOrName); + fileToOpen.fileName = ts.normalizeSlashes(fileToOpen.fileName); + this.activeFile = fileToOpen; + // Let the host know that this file is now open + this.languageServiceAdapterHost.openFile(fileToOpen.fileName, content, scriptKindName); + }; + TestState.prototype.verifyErrorExistsBetweenMarkers = function (startMarkerName, endMarkerName, shouldExist) { + var startMarker = this.getMarkerByName(startMarkerName); + var endMarker = this.getMarkerByName(endMarkerName); + var predicate = function (errorMinChar, errorLimChar, startPos, endPos) { + return ((errorMinChar === startPos) && (errorLimChar === endPos)) ? true : false; + }; + var exists = this.anyErrorInRange(predicate, startMarker, endMarker); + if (exists !== shouldExist) { + this.printErrorLog(shouldExist, this.getAllDiagnostics()); + throw new Error((shouldExist ? "Expected" : "Did not expect") + " failure between markers: '" + startMarkerName + "', '" + endMarkerName + "'"); + } + }; + TestState.prototype.raiseError = function (message) { + throw new Error(this.messageAtLastKnownMarker(message)); + }; + TestState.prototype.messageAtLastKnownMarker = function (message) { + var locationDescription = this.lastKnownMarker ? this.lastKnownMarker : this.getLineColStringAtPosition(this.currentCaretPosition); + return "At " + locationDescription + ": " + message; + }; + TestState.prototype.assertionMessageAtLastKnownMarker = function (msg) { + return "\nMarker: " + this.lastKnownMarker + "\nChecking: " + msg + "\n\n"; + }; + TestState.prototype.getDiagnostics = function (fileName, includeSuggestions) { + if (includeSuggestions === void 0) { includeSuggestions = false; } + return this.languageService.getSyntacticDiagnostics(fileName).concat(this.languageService.getSemanticDiagnostics(fileName), (includeSuggestions ? this.languageService.getSuggestionDiagnostics(fileName) : ts.emptyArray)); + }; + TestState.prototype.getAllDiagnostics = function () { + var _this = this; + return ts.flatMap(this.languageServiceAdapterHost.getFilenames(), function (fileName) { + return ts.isAnySupportedFileExtension(fileName) ? _this.getDiagnostics(fileName) : []; + }); + }; + TestState.prototype.verifyErrorExistsAfterMarker = function (markerName, shouldExist, after) { + var marker = this.getMarkerByName(markerName); + var predicate; + if (after) { + predicate = function (errorMinChar, errorLimChar, startPos) { + return ((errorMinChar >= startPos) && (errorLimChar >= startPos)) ? true : false; + }; + } + else { + predicate = function (errorMinChar, errorLimChar, startPos) { + return ((errorMinChar <= startPos) && (errorLimChar <= startPos)) ? true : false; + }; + } + var exists = this.anyErrorInRange(predicate, marker); + var diagnostics = this.getAllDiagnostics(); + if (exists !== shouldExist) { + this.printErrorLog(shouldExist, diagnostics); + throw new Error((shouldExist ? "Expected" : "Did not expect") + " failure at marker '" + markerName + "'"); + } + }; + TestState.prototype.anyErrorInRange = function (predicate, startMarker, endMarker) { + return this.getDiagnostics(startMarker.fileName).some(function (_a) { + var start = _a.start, length = _a.length; + return predicate(start, start + length, startMarker.position, endMarker === undefined ? undefined : endMarker.position); + }); // TODO: GH#18217 + }; + TestState.prototype.printErrorLog = function (expectErrors, errors) { + if (expectErrors) { + Harness.IO.log("Expected error not found. Error list is:"); + } + else { + Harness.IO.log("Unexpected error(s) found. Error list is:"); + } + for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) { + var _a = errors_1[_i], start = _a.start, length = _a.length, messageText = _a.messageText, file = _a.file; + Harness.IO.log(" " + this.formatRange(file, start, length) + // TODO: GH#18217 + ", message: " + ts.flattenDiagnosticMessageText(messageText, Harness.IO.newLine()) + "\n"); + } + }; + TestState.prototype.formatRange = function (file, start, length) { + if (file) { + return "from: " + this.formatLineAndCharacterOfPosition(file, start) + ", to: " + this.formatLineAndCharacterOfPosition(file, start + length); + } + return "global"; + }; + TestState.prototype.formatLineAndCharacterOfPosition = function (file, pos) { + if (file) { + var _a = ts.getLineAndCharacterOfPosition(file, pos), line = _a.line, character = _a.character; + return line + ":" + character; + } + return "global"; + }; + TestState.prototype.formatPosition = function (file, pos) { + if (file) { + return file.fileName + "@" + pos; + } + return "global"; + }; + TestState.prototype.verifyNoErrors = function () { + var _this = this; + ts.forEachKey(this.inputFiles, function (fileName) { + if (!ts.isAnySupportedFileExtension(fileName) + || !_this.getProgram().getCompilerOptions().allowJs && !ts.extensionIsTypeScript(ts.extensionFromPath(fileName))) + return; + var errors = _this.getDiagnostics(fileName).filter(function (e) { return e.category !== ts.DiagnosticCategory.Suggestion; }); + if (errors.length) { + _this.printErrorLog(/*expectErrors*/ false, errors); + var error = errors[0]; + _this.raiseError("Found an error: " + _this.formatPosition(error.file, error.start) + ": " + error.messageText); + } + }); + }; + TestState.prototype.verifyNumberOfErrorsInCurrentFile = function (expected) { + var errors = this.getDiagnostics(this.activeFile.fileName); + var actual = errors.length; + if (actual !== expected) { + this.printErrorLog(/*expectErrors*/ false, errors); + var errorMsg = "Actual number of errors (" + actual + ") does not match expected number (" + expected + ")"; + Harness.IO.log(errorMsg); + this.raiseError(errorMsg); + } + }; + TestState.prototype.verifyEval = function (expr, value) { + var emit = this.languageService.getEmitOutput(this.activeFile.fileName); + if (emit.outputFiles.length !== 1) { + throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName); + } + var evaluation = new Function(emit.outputFiles[0].text + ";\r\nreturn (" + expr + ");")(); + if (evaluation !== value) { + this.raiseError("Expected evaluation of expression \"" + expr + "\" to equal \"" + value + "\", but got \"" + evaluation + "\""); + } + }; + TestState.prototype.verifyGoToDefinitionIs = function (endMarker) { + var _this = this; + this.verifyGoToXWorker(toArray(endMarker), function () { return _this.getGoToDefinition(); }); + }; + TestState.prototype.verifyGoToDefinition = function (arg0, endMarkerNames) { + var _this = this; + this.verifyGoToX(arg0, endMarkerNames, function () { return _this.getGoToDefinitionAndBoundSpan(); }); + }; + TestState.prototype.getGoToDefinition = function () { + return this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.getGoToDefinitionAndBoundSpan = function () { + return this.languageService.getDefinitionAndBoundSpan(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.verifyGoToType = function (arg0, endMarkerNames) { + var _this = this; + this.verifyGoToX(arg0, endMarkerNames, function () { + return _this.languageService.getTypeDefinitionAtPosition(_this.activeFile.fileName, _this.currentCaretPosition); + }); + }; + TestState.prototype.verifyGoToX = function (arg0, endMarkerNames, getDefs) { + if (endMarkerNames) { + this.verifyGoToXPlain(arg0, endMarkerNames, getDefs); + } + else if (ts.isArray(arg0)) { + var pairs = arg0; + for (var _i = 0, pairs_1 = pairs; _i < pairs_1.length; _i++) { + var _a = pairs_1[_i], start = _a[0], end = _a[1]; + this.verifyGoToXPlain(start, end, getDefs); + } + } + else { + var obj = arg0; + for (var startMarkerName in obj) { + if (ts.hasProperty(obj, startMarkerName)) { + this.verifyGoToXPlain(startMarkerName, obj[startMarkerName], getDefs); + } + } + } + }; + TestState.prototype.verifyGoToXPlain = function (startMarkerNames, endMarkerNames, getDefs) { + for (var _i = 0, _a = toArray(startMarkerNames); _i < _a.length; _i++) { + var start = _a[_i]; + this.verifyGoToXSingle(start, endMarkerNames, getDefs); + } + }; + TestState.prototype.verifyGoToDefinitionForMarkers = function (markerNames) { + var _this = this; + for (var _i = 0, markerNames_1 = markerNames; _i < markerNames_1.length; _i++) { + var markerName = markerNames_1[_i]; + this.verifyGoToXSingle(markerName + "Reference", markerName + "Definition", function () { return _this.getGoToDefinition(); }); + } + }; + TestState.prototype.verifyGoToXSingle = function (startMarkerName, endMarkerNames, getDefs) { + this.goToMarker(startMarkerName); + this.verifyGoToXWorker(toArray(endMarkerNames), getDefs, startMarkerName); + }; + TestState.prototype.verifyGoToXWorker = function (endMarkers, getDefs, startMarkerName) { + var _this = this; + var defs = getDefs(); + var definitions; + var testName; + if (!defs || ts.isArray(defs)) { + definitions = defs || []; + testName = "goToDefinitions"; + } + else { + this.verifyDefinitionTextSpan(defs, startMarkerName); + definitions = defs.definitions; // TODO: GH#18217 + testName = "goToDefinitionsAndBoundSpan"; + } + if (endMarkers.length !== definitions.length) { + this.raiseError(testName + " failed - expected to find " + endMarkers.length + " definitions but got " + definitions.length); + } + ts.zipWith(endMarkers, definitions, function (endMarker, definition, i) { + var marker = _this.getMarkerByName(endMarker); + if (marker.fileName !== definition.fileName || marker.position !== definition.textSpan.start) { + _this.raiseError(testName + " failed for definition " + endMarker + " (" + i + "): expected " + marker.fileName + " at " + marker.position + ", got " + definition.fileName + " at " + definition.textSpan.start); + } + }); + }; + TestState.prototype.verifyDefinitionTextSpan = function (defs, startMarkerName) { + var _this = this; + var range = this.testData.ranges.find(function (range) { return _this.markerName(range.marker) === startMarkerName; }); + if (!range && !defs.textSpan) { + return; + } + if (!range) { + this.raiseError("goToDefinitionsAndBoundSpan failed - found a TextSpan " + JSON.stringify(defs.textSpan) + " when it wasn't expected."); + } + else if (defs.textSpan.start !== range.pos || defs.textSpan.length !== range.end - range.pos) { + var expected = { + start: range.pos, length: range.end - range.pos + }; + this.raiseError("goToDefinitionsAndBoundSpan failed - expected to find TextSpan " + JSON.stringify(expected) + " but got " + JSON.stringify(defs.textSpan)); + } + }; + TestState.prototype.verifyGetEmitOutputForCurrentFile = function (expected) { + var emit = this.languageService.getEmitOutput(this.activeFile.fileName); + if (emit.outputFiles.length !== 1) { + throw new Error("Expected exactly one output from emit of " + this.activeFile.fileName); + } + var actual = emit.outputFiles[0].text; + if (actual !== expected) { + this.raiseError("Expected emit output to be \"" + expected + "\", but got \"" + actual + "\""); + } + }; + TestState.prototype.verifyGetEmitOutputContentsForCurrentFile = function (expected) { + var emit = this.languageService.getEmitOutput(this.activeFile.fileName); + assert.equal(emit.outputFiles.length, expected.length, "Number of emit output files"); + ts.zipWith(emit.outputFiles, expected, function (outputFile, expected) { + assert.equal(outputFile.name, expected.name, "FileName"); + assert.equal(outputFile.text, expected.text, "Content"); + }); + }; + TestState.prototype.verifyCompletionListCount = function (expectedCount, negative) { + if (expectedCount === 0 && negative) { + this.verifyCompletionListIsEmpty(/*negative*/ false); + return; + } + var members = this.getCompletionListAtCaret(); + if (members) { + var match = members.entries.length === expectedCount; + if ((!match && !negative) || (match && negative)) { + this.raiseError("Member list count was " + members.entries.length + ". Expected " + expectedCount); + } + } + else if (expectedCount) { + this.raiseError("Member list count was 0. Expected " + expectedCount); + } + }; + TestState.prototype.verifyCompletionListItemsCountIsGreaterThan = function (count, negative) { + var completions = this.getCompletionListAtCaret(); + var itemsCount = completions ? completions.entries.length : 0; + if (negative) { + if (itemsCount > count) { + this.raiseError("Expected completion list items count to not be greater than " + count + ", but is actually " + itemsCount); + } + } + else { + if (itemsCount <= count) { + this.raiseError("Expected completion list items count to be greater than " + count + ", but is actually " + itemsCount); + } + } + }; + TestState.prototype.verifyCompletionListStartsWithItemsInOrder = function (items) { + if (items.length === 0) { + return; + } + var entries = this.getCompletionListAtCaret().entries; + assert.isTrue(items.length <= entries.length, "Amount of expected items in completion list [ " + items.length + " ] is greater than actual number of items in list [ " + entries.length + " ]"); + ts.zipWith(entries, items, function (entry, item) { + assert.equal(entry.name, item, "Unexpected item in completion list"); + }); + }; + TestState.prototype.noItemsWithSameNameButDifferentKind = function () { + var completions = this.getCompletionListAtCaret(); + var uniqueItems = ts.createMap(); + for (var _i = 0, _a = completions.entries; _i < _a.length; _i++) { + var item = _a[_i]; + var uniqueItem = uniqueItems.get(item.name); + if (!uniqueItem) { + uniqueItems.set(item.name, item.kind); + } + else { + assert.equal(item.kind, uniqueItem, "Items should have the same kind, got " + item.kind + " and " + uniqueItem); + } + } + }; + TestState.prototype.verifyCompletionListIsEmpty = function (negative) { + var completions = this.getCompletionListAtCaret(); + if ((!completions || completions.entries.length === 0) && negative) { + this.raiseError("Completion list is empty at caret at position " + this.activeFile.fileName + " " + this.currentCaretPosition); + } + else if (completions && completions.entries.length !== 0 && !negative) { + this.raiseError("Completion list is not empty at caret at position " + this.activeFile.fileName + " " + this.currentCaretPosition + "\n" + + ("Completion List contains: " + stringify(completions.entries.map(function (e) { return e.name; })))); + } + }; + TestState.prototype.verifyCompletionListAllowsNewIdentifier = function (negative) { + var completions = this.getCompletionListAtCaret(); + if ((completions && !completions.isNewIdentifierLocation) && !negative) { + this.raiseError("Expected builder completion entry"); + } + else if ((completions && completions.isNewIdentifierLocation) && negative) { + this.raiseError("Un-expected builder completion entry"); + } + }; + TestState.prototype.verifyCompletionListIsGlobal = function (expected) { + var completions = this.getCompletionListAtCaret(); + if (completions && completions.isGlobalCompletion !== expected) { + this.raiseError("verifyCompletionListIsGlobal failed - expected result to be " + completions.isGlobalCompletion); + } + }; + TestState.prototype.verifyCompletions = function (options) { + if (options.marker === undefined) { + this.verifyCompletionsWorker(options); + } + else { + for (var _i = 0, _a = toArray(options.marker); _i < _a.length; _i++) { + var marker = _a[_i]; + this.goToMarker(marker); + this.verifyCompletionsWorker(options); + } + } + }; + TestState.prototype.verifyCompletionsWorker = function (options) { + var actualCompletions = this.getCompletionListAtCaret(__assign({}, options.preferences, { triggerCharacter: options.triggerCharacter })); + if (!actualCompletions) { + if (options.exact === undefined) + return; + this.raiseError("No completions at position '" + this.currentCaretPosition + "'."); + } + if (actualCompletions.isNewIdentifierLocation !== (options.isNewIdentifierLocation || false)) { + this.raiseError("Expected 'isNewIdentifierLocation' to be " + (options.isNewIdentifierLocation || false) + ", got " + actualCompletions.isNewIdentifierLocation); + } + var actualByName = ts.createMap(); + var _loop_5 = function (entry) { + if (actualByName.has(entry.name)) { + // TODO: GH#23587 + if (entry.name !== "undefined" && entry.name !== "require") + this_1.raiseError("Duplicate (" + actualCompletions.entries.filter(function (a) { return a.name === entry.name; }).length + ") completions for " + entry.name); + } + else { + actualByName.set(entry.name, entry); + } + }; + var this_1 = this; + for (var _i = 0, _a = actualCompletions.entries; _i < _a.length; _i++) { + var entry = _a[_i]; + _loop_5(entry); + } + if ("exact" in options) { + ts.Debug.assert(!("includes" in options) && !("excludes" in options)); + if (options.exact === undefined) + throw this.raiseError("Expected no completions"); + this.verifyCompletionsAreExactly(actualCompletions.entries, toArray(options.exact)); + } + else { + if (options.includes) { + for (var _b = 0, _c = toArray(options.includes); _b < _c.length; _b++) { + var include = _c[_b]; + var name = typeof include === "string" ? include : include.name; + var found = actualByName.get(name); + if (!found) + throw this.raiseError("No completion " + name + " found"); + this.verifyCompletionEntry(found, include); + } + } + if (options.excludes) { + for (var _d = 0, _e = toArray(options.excludes); _d < _e.length; _d++) { + var exclude = _e[_d]; + if (typeof exclude === "string") { + if (actualByName.has(exclude)) { + this.raiseError("Did not expect to get a completion named " + exclude); + } + } + else { + var found = actualByName.get(exclude.name); + if (found && found.source === exclude.source) { + this.raiseError("Did not expect to get a completion named " + exclude.name + " with source " + exclude.source); + } + } + } + } + } + }; + TestState.prototype.verifyCompletionEntry = function (actual, expected) { + var _a = typeof expected === "string" + ? { insertText: undefined, replacementSpan: undefined, hasAction: undefined, isRecommended: undefined, kind: undefined, text: undefined, documentation: undefined, sourceDisplay: undefined } + : expected, insertText = _a.insertText, replacementSpan = _a.replacementSpan, hasAction = _a.hasAction, isRecommended = _a.isRecommended, kind = _a.kind, text = _a.text, documentation = _a.documentation, sourceDisplay = _a.sourceDisplay; + if (actual.insertText !== insertText) { + this.raiseError("Expected completion insert text to be " + insertText + ", got " + actual.insertText); + } + var convertedReplacementSpan = replacementSpan && ts.createTextSpanFromRange(replacementSpan); + try { + assert.deepEqual(actual.replacementSpan, convertedReplacementSpan); + } + catch (_b) { + this.raiseError("Expected completion replacementSpan to be " + stringify(convertedReplacementSpan) + ", got " + stringify(actual.replacementSpan)); + } + if (kind !== undefined) + assert.equal(actual.kind, kind); + assert.equal(actual.hasAction, hasAction); + assert.equal(actual.isRecommended, isRecommended); + if (text) { + var actualDetails = this.getCompletionEntryDetails(actual.name, actual.source); + assert.equal(ts.displayPartsToString(actualDetails.displayParts), text); + assert.equal(ts.displayPartsToString(actualDetails.documentation), documentation || ""); + // TODO: GH#23587 + // assert.equal(actualDetails.kind, actual.kind); + assert.equal(actualDetails.kindModifiers, actual.kindModifiers); + assert.equal(actualDetails.source && ts.displayPartsToString(actualDetails.source), sourceDisplay); + } + else { + assert(documentation === undefined && sourceDisplay === undefined, "If specifying completion details, should specify 'text'"); + } + }; + TestState.prototype.verifyCompletionsAreExactly = function (actual, expected) { + var _this = this; + if (actual.length !== expected.length) { + this.raiseError("Expected " + expected.length + " completions, got " + actual.length + " (" + actual.map(function (a) { return a.name; }) + ")."); + } + ts.zipWith(actual, expected, function (completion, expectedCompletion, index) { + var name = typeof expectedCompletion === "string" ? expectedCompletion : expectedCompletion.name; + if (completion.name !== name) { + _this.raiseError("Expected completion at index " + index + " to be " + name + ", got " + completion.name); + } + _this.verifyCompletionEntry(completion, expectedCompletion); + }); + }; + TestState.prototype.verifyCompletionsAt = function (markerName, expected, options) { + this.verifyCompletions({ + marker: markerName, + exact: expected, + isNewIdentifierLocation: options && options.isNewIdentifierLocation, + preferences: options, + triggerCharacter: options && options.triggerCharacter, + }); + }; + TestState.prototype.verifyCompletionListContains = function (entryId, text, documentation, kind, spanIndex, hasAction, options) { + var completions = this.getCompletionListAtCaret(options); + if (completions) { + this.assertItemInCompletionList(completions.entries, entryId, text, documentation, kind, spanIndex, hasAction, options); + } + else { + this.raiseError("No completions at position '" + this.currentCaretPosition + "' when looking for '" + JSON.stringify(entryId) + "'."); + } + }; + /** + * Verify that the completion list does NOT contain the given symbol. + * The symbol is considered matched with the symbol in the list if and only if all given parameters must matched. + * When any parameter is omitted, the parameter is ignored during comparison and assumed that the parameter with + * that property of the symbol in the list. + * @param symbol the name of symbol + * @param expectedText the text associated with the symbol + * @param expectedDocumentation the documentation text associated with the symbol + * @param expectedKind the kind of symbol (see ScriptElementKind) + * @param spanIndex the index of the range that the completion item's replacement text span should match + */ + TestState.prototype.verifyCompletionListDoesNotContain = function (entryId, expectedText, expectedDocumentation, expectedKind, spanIndex, options) { + var _this = this; + var replacementSpan; + if (spanIndex !== undefined) { + replacementSpan = this.getTextSpanForRangeAtIndex(spanIndex); + } + var completions = this.getCompletionListAtCaret(options); + if (completions) { + var filterCompletions = completions.entries.filter(function (e) { return e.name === entryId.name && e.source === entryId.source; }); + filterCompletions = expectedKind ? filterCompletions.filter(function (e) { return e.kind === expectedKind || (typeof expectedKind === "object" && e.kind === expectedKind.kind); }) : filterCompletions; + filterCompletions = filterCompletions.filter(function (entry) { + var details = _this.getCompletionEntryDetails(entry.name); + var documentation = details && ts.displayPartsToString(details.documentation); + var text = details && ts.displayPartsToString(details.displayParts); + // If any of the expected values are undefined, assume that users don't + // care about them. + if (replacementSpan && !TestState.textSpansEqual(replacementSpan, entry.replacementSpan)) { + return false; + } + else if (expectedText && text !== expectedText) { + return false; + } + else if (expectedDocumentation && documentation !== expectedDocumentation) { + return false; + } + return true; + }); + if (filterCompletions.length !== 0) { + // After filtered using all present criterion, if there are still symbol left in the list + // then these symbols must meet the criterion for Not supposed to be in the list. So we + // raise an error + var error = "Completion list did contain '" + JSON.stringify(entryId) + "'."; + var details = this.getCompletionEntryDetails(filterCompletions[0].name); + if (expectedText) { + error += "Expected text: " + expectedText + " to equal: " + ts.displayPartsToString(details.displayParts) + "."; + } + if (expectedDocumentation) { + error += "Expected documentation: " + expectedDocumentation + " to equal: " + ts.displayPartsToString(details.documentation) + "."; + } + if (expectedKind) { + error += "Expected kind: " + expectedKind + " to equal: " + filterCompletions[0].kind + "."; + } + else { + error += "kind: " + filterCompletions[0].kind + "."; + } + if (replacementSpan) { + var spanText = filterCompletions[0].replacementSpan ? stringify(filterCompletions[0].replacementSpan) : undefined; + error += "Expected replacement span: " + stringify(replacementSpan) + " to equal: " + spanText + "."; + } + this.raiseError(error); + } + } + }; + TestState.prototype.verifyCompletionEntryDetails = function (entryName, expectedText, expectedDocumentation, kind, tags) { + var _this = this; + var details = this.getCompletionEntryDetails(entryName); + assert(details, "no completion entry available"); + assert.equal(ts.displayPartsToString(details.displayParts), expectedText, this.assertionMessageAtLastKnownMarker("completion entry details text")); + if (expectedDocumentation !== undefined) { + assert.equal(ts.displayPartsToString(details.documentation), expectedDocumentation, this.assertionMessageAtLastKnownMarker("completion entry documentation")); + } + if (kind !== undefined) { + assert.equal(details.kind, kind, this.assertionMessageAtLastKnownMarker("completion entry kind")); + } + if (tags !== undefined) { + assert.equal(details.tags.length, tags.length, this.messageAtLastKnownMarker("QuickInfo tags")); + ts.zipWith(tags, details.tags, function (expectedTag, actualTag) { + assert.equal(actualTag.name, expectedTag.name); + assert.equal(actualTag.text, expectedTag.text, _this.messageAtLastKnownMarker("QuickInfo tag " + actualTag.name)); + }); + } + }; + TestState.prototype.getProgram = function () { + return this._program || (this._program = this.languageService.getProgram()); // TODO: GH#18217 + }; + TestState.prototype.getChecker = function () { + return this._checker || (this._checker = this.getProgram().getTypeChecker()); + }; + TestState.prototype.getSourceFile = function () { + var fileName = this.activeFile.fileName; + var result = this.getProgram().getSourceFile(fileName); + if (!result) { + throw new Error("Could not get source file " + fileName); + } + return result; + }; + TestState.prototype.getNode = function () { + return ts.getTouchingPropertyName(this.getSourceFile(), this.currentCaretPosition); + }; + TestState.prototype.goToAndGetNode = function (range) { + this.goToRangeStart(range); + var node = this.getNode(); + this.verifyRange("touching property name", range, node); + return node; + }; + TestState.prototype.verifyRange = function (desc, expected, actual) { + var actualStart = actual.getStart(); + var actualEnd = actual.getEnd(); + if (actualStart !== expected.pos || actualEnd !== expected.end) { + this.raiseError(desc + " should be " + expected.pos + "-" + expected.end + ", got " + actualStart + "-" + actualEnd); + } + }; + TestState.prototype.verifySymbol = function (symbol, declarationRanges) { + var _this = this; + var declarations = symbol.declarations; + if (declarations.length !== declarationRanges.length) { + this.raiseError("Expected to get " + declarationRanges.length + " declarations, got " + declarations.length); + } + ts.zipWith(declarations, declarationRanges, function (decl, range) { + _this.verifyRange("symbol declaration", range, decl); + }); + }; + TestState.prototype.verifySymbolAtLocation = function (startRange, declarationRanges) { + var node = this.goToAndGetNode(startRange); + var symbol = this.getChecker().getSymbolAtLocation(node); + if (!symbol) { + this.raiseError("Could not get symbol at location"); + } + this.verifySymbol(symbol, declarationRanges); + }; + TestState.prototype.symbolsInScope = function (range) { + var node = this.goToAndGetNode(range); + return this.getChecker().getSymbolsInScope(node, 67216319 /* Value */ | 67901928 /* Type */ | 1920 /* Namespace */); + }; + TestState.prototype.setTypesRegistry = function (map) { + this.languageServiceAdapterHost.typesRegistry = ts.createMapFromTemplate(map); + }; + TestState.prototype.verifyTypeOfSymbolAtLocation = function (range, symbol, expected) { + var node = this.goToAndGetNode(range); + var checker = this.getChecker(); + var type = checker.getTypeOfSymbolAtLocation(symbol, node); + var actual = checker.typeToString(type); + if (actual !== expected) { + this.raiseError("Expected: '" + expected + "', actual: '" + actual + "'"); + } + }; + TestState.prototype.verifyDocumentHighlightsRespectFilesList = function (files) { + var startFile = this.activeFile.fileName; + var _loop_6 = function (fileName) { + var searchFileNames = startFile === fileName ? [startFile] : [startFile, fileName]; + var highlights = this_2.getDocumentHighlightsAtCurrentPosition(searchFileNames); + if (!highlights.every(function (dh) { return ts.contains(searchFileNames, dh.fileName); })) { + this_2.raiseError("When asking for document highlights only in files " + searchFileNames + ", got document highlights in " + unique(highlights, function (dh) { return dh.fileName; })); + } + }; + var this_2 = this; + for (var _i = 0, files_3 = files; _i < files_3.length; _i++) { + var fileName = files_3[_i]; + _loop_6(fileName); + } + }; + TestState.prototype.verifyReferenceGroups = function (starts, parts) { + var fullExpected = ts.map(parts, function (_a) { + var definition = _a.definition, ranges = _a.ranges; + return ({ + definition: typeof definition === "string" ? definition : __assign({}, definition, { range: ts.createTextSpanFromRange(definition.range) }), + references: ranges.map(function (r) { + var _a = (r.marker && r.marker.data || {}), _b = _a.isWriteAccess, isWriteAccess = _b === void 0 ? false : _b, _c = _a.isDefinition, isDefinition = _c === void 0 ? false : _c, isInString = _a.isInString; + return __assign({ fileName: r.fileName, textSpan: ts.createTextSpanFromRange(r), isWriteAccess: isWriteAccess, + isDefinition: isDefinition }, (isInString ? { isInString: true } : undefined)); + }), + }); + }); + for (var _i = 0, _a = toArray(starts); _i < _a.length; _i++) { + var start = _a[_i]; + if (typeof start === "string") { + this.goToMarker(start); + } + else { + this.goToRangeStart(start); + } + var fullActual = ts.map(this.findReferencesAtCaret(), function (_a, i) { + var definition = _a.definition, references = _a.references; + var text = definition.displayParts.map(function (d) { return d.text; }).join(""); + return { + definition: fullExpected.length > i && typeof fullExpected[i].definition === "string" ? text : { text: text, range: definition.textSpan }, + references: references, + }; + }); + this.assertObjectsEqual(fullActual, fullExpected); + if (parts) { + this.verifyDocumentHighlightsRespectFilesList(unique(ts.flatMap(parts, function (p) { return p.ranges; }), function (r) { return r.fileName; })); + } + } + }; + TestState.prototype.verifyNoReferences = function (markerNameOrRange) { + if (markerNameOrRange) { + if (ts.isString(markerNameOrRange)) { + this.goToMarker(markerNameOrRange); + } + else { + this.goToRangeStart(markerNameOrRange); + } + } + var refs = this.getReferencesAtCaret(); + if (refs && refs.length) { + this.raiseError("Expected getReferences to fail, but saw references: " + stringify(refs)); + } + }; + // Necessary to have this function since `findReferences` isn't implemented in `client.ts` + TestState.prototype.verifyGetReferencesForServerTest = function (expected) { + var refs = this.getReferencesAtCaret(); + assert.deepEqual(refs, expected); + }; + TestState.prototype.verifySingleReferenceGroup = function (definition, ranges) { + ranges = ranges || this.getRanges(); + this.verifyReferenceGroups(ranges, [{ definition: definition, ranges: ranges }]); + }; + TestState.prototype.assertObjectsEqual = function (fullActual, fullExpected, msgPrefix) { + var _this = this; + if (msgPrefix === void 0) { msgPrefix = ""; } + var recur = function (actual, expected, path) { + var fail = function (msg) { + _this.raiseError(msgPrefix + " At " + path + ": " + msg + "\nExpected: " + stringify(fullExpected) + "\nActual: " + stringify(fullActual)); + }; + if ((actual === undefined) !== (expected === undefined)) { + fail("Expected " + expected + ", got " + actual); + } + for (var key in actual) { + if (ts.hasProperty(actual, key)) { + var ak = actual[key], ek = expected[key]; + if (typeof ak === "object" && typeof ek === "object") { + recur(ak, ek, path ? path + "." + key : key); + } + else if (ak !== ek) { + fail("Expected '" + key + "' to be '" + ek + "', got '" + ak + "'"); + } + } + } + for (var key in expected) { + if (ts.hasProperty(expected, key)) { + if (!ts.hasProperty(actual, key)) { + fail(msgPrefix + "Missing property '" + key + "'"); + } + } + } + }; + if (fullActual === undefined || fullExpected === undefined) { + if (fullActual === fullExpected) { + return; + } + this.raiseError(msgPrefix + "\nExpected: " + stringify(fullExpected) + "\nActual: " + stringify(fullActual)); + } + recur(fullActual, fullExpected, ""); + }; + TestState.prototype.verifyDisplayPartsOfReferencedSymbol = function (expected) { + var referencedSymbols = this.findReferencesAtCaret(); + if (referencedSymbols.length === 0) { + this.raiseError("No referenced symbols found at current caret position"); + } + else if (referencedSymbols.length > 1) { + this.raiseError("More than one referenced symbol found"); + } + assert.equal(TestState.getDisplayPartsJson(referencedSymbols[0].definition.displayParts), TestState.getDisplayPartsJson(expected), this.messageAtLastKnownMarker("referenced symbol definition display parts")); + }; + TestState.prototype.getCompletionListAtCaret = function (options) { + return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, options); + }; + TestState.prototype.getCompletionEntryDetails = function (entryName, source, preferences) { + return this.languageService.getCompletionEntryDetails(this.activeFile.fileName, this.currentCaretPosition, entryName, this.formatCodeSettings, source, preferences); + }; + TestState.prototype.getReferencesAtCaret = function () { + return this.languageService.getReferencesAtPosition(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.findReferencesAtCaret = function () { + return this.languageService.findReferences(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.getSyntacticDiagnostics = function (expected) { + var diagnostics = this.languageService.getSyntacticDiagnostics(this.activeFile.fileName); + this.testDiagnostics(expected, diagnostics, "error"); + }; + TestState.prototype.getSemanticDiagnostics = function (expected) { + var diagnostics = this.languageService.getSemanticDiagnostics(this.activeFile.fileName); + this.testDiagnostics(expected, diagnostics, "error"); + }; + TestState.prototype.getSuggestionDiagnostics = function (expected) { + this.testDiagnostics(expected, this.languageService.getSuggestionDiagnostics(this.activeFile.fileName), "suggestion"); + }; + TestState.prototype.testDiagnostics = function (expected, diagnostics, category) { + var _this = this; + assert.deepEqual(ts.realizeDiagnostics(diagnostics, "\n"), expected.map(function (e) { return (__assign({ message: e.message, category: category, code: e.code }, ts.createTextSpanFromRange(e.range || _this.getRanges()[0]), { reportsUnnecessary: e.reportsUnnecessary })); })); + }; + TestState.prototype.verifyQuickInfoAt = function (markerName, expectedText, expectedDocumentation) { + this.goToMarker(markerName); + this.verifyQuickInfoString(expectedText, expectedDocumentation); + }; + TestState.prototype.verifyQuickInfos = function (namesAndTexts) { + for (var name in namesAndTexts) { + if (ts.hasProperty(namesAndTexts, name)) { + var text = namesAndTexts[name]; + if (ts.isArray(text)) { + assert(text.length === 2); + var expectedText = text[0], expectedDocumentation = text[1]; + this.verifyQuickInfoAt(name, expectedText, expectedDocumentation); + } + else { + this.verifyQuickInfoAt(name, text); + } + } + } + }; + TestState.prototype.verifyQuickInfoString = function (expectedText, expectedDocumentation) { + if (expectedDocumentation === "") { + throw new Error("Use 'undefined' instead"); + } + var actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); + var actualQuickInfoText = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.displayParts) : ""; + var actualQuickInfoDocumentation = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.documentation) : ""; + assert.equal(actualQuickInfoText, expectedText, this.messageAtLastKnownMarker("quick info text")); + assert.equal(actualQuickInfoDocumentation, expectedDocumentation || "", this.assertionMessageAtLastKnownMarker("quick info doc")); + }; + TestState.prototype.verifyQuickInfoDisplayParts = function (kind, kindModifiers, textSpan, displayParts, documentation, tags) { + var _this = this; + var actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); + assert.equal(actualQuickInfo.kind, kind, this.messageAtLastKnownMarker("QuickInfo kind")); + assert.equal(actualQuickInfo.kindModifiers, kindModifiers, this.messageAtLastKnownMarker("QuickInfo kindModifiers")); + assert.equal(JSON.stringify(actualQuickInfo.textSpan), JSON.stringify(textSpan), this.messageAtLastKnownMarker("QuickInfo textSpan")); + assert.equal(TestState.getDisplayPartsJson(actualQuickInfo.displayParts), TestState.getDisplayPartsJson(displayParts), this.messageAtLastKnownMarker("QuickInfo displayParts")); + assert.equal(TestState.getDisplayPartsJson(actualQuickInfo.documentation), TestState.getDisplayPartsJson(documentation), this.messageAtLastKnownMarker("QuickInfo documentation")); + assert.equal(actualQuickInfo.tags.length, tags.length, this.messageAtLastKnownMarker("QuickInfo tags")); + ts.zipWith(tags, actualQuickInfo.tags, function (expectedTag, actualTag) { + assert.equal(expectedTag.name, actualTag.name); + assert.equal(expectedTag.text, actualTag.text, _this.messageAtLastKnownMarker("QuickInfo tag " + actualTag.name)); + }); + }; + TestState.prototype.verifyRangesAreRenameLocations = function (options) { + if (ts.isArray(options)) { + this.verifyRenameLocations(options, options); + } + else { + var ranges = options && options.ranges || this.getRanges(); + this.verifyRenameLocations(ranges, __assign({ ranges: ranges }, options)); + } + }; + TestState.prototype.verifyRenameLocations = function (startRanges, options) { + var _this = this; + var findInStrings, findInComments, ranges; + if (ts.isArray(options)) { + findInStrings = findInComments = false; + ranges = options; + } + else { + findInStrings = !!options.findInStrings; + findInComments = !!options.findInComments; + ranges = options.ranges; + } + var _loop_7 = function (startRange) { + this_3.goToRangeStart(startRange); + var renameInfo = this_3.languageService.getRenameInfo(this_3.activeFile.fileName, this_3.currentCaretPosition); + if (!renameInfo.canRename) { + this_3.raiseError("Expected rename to succeed, but it actually failed."); + return "break"; + } + var references = this_3.languageService.findRenameLocations(this_3.activeFile.fileName, this_3.currentCaretPosition, findInStrings, findInComments); + ranges = ranges || this_3.getRanges(); + if (!references) { + if (ranges.length !== 0) { + this_3.raiseError("Expected " + ranges.length + " rename locations; got none."); + } + return { value: void 0 }; + } + if (ranges.length !== references.length) { + this_3.raiseError("Rename location count does not match result.\n\nExpected: " + stringify(ranges) + "\n\nActual:" + stringify(references)); + } + ranges = ranges.sort(function (r1, r2) { return r1.pos - r2.pos; }); + references = references.sort(function (r1, r2) { return r1.textSpan.start - r2.textSpan.start; }); + ts.zipWith(references, ranges, function (reference, range) { + if (reference.textSpan.start !== range.pos || ts.textSpanEnd(reference.textSpan) !== range.end) { + _this.raiseError("Rename location results do not match.\n\nExpected: " + stringify(ranges) + "\n\nActual:" + stringify(references)); + } + }); + }; + var this_3 = this; + for (var _i = 0, _a = toArray(startRanges); _i < _a.length; _i++) { + var startRange = _a[_i]; + var state_1 = _loop_7(startRange); + if (typeof state_1 === "object") + return state_1.value; + if (state_1 === "break") + break; + } + }; + TestState.prototype.verifyQuickInfoExists = function (negative) { + var actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (negative) { + if (actualQuickInfo) { + this.raiseError("verifyQuickInfoExists failed. Expected quick info NOT to exist"); + } + } + else { + if (!actualQuickInfo) { + this.raiseError("verifyQuickInfoExists failed. Expected quick info to exist"); + } + } + }; + TestState.prototype.verifyNoSignatureHelp = function (markers) { + if (markers.length) { + for (var _i = 0, markers_1 = markers; _i < markers_1.length; _i++) { + var marker = markers_1[_i]; + this.goToMarker(marker); + this.verifyNoSignatureHelp(ts.emptyArray); + } + return; + } + var actual = this.getSignatureHelp(); + if (actual) { + this.raiseError("Expected no signature help, but got \"" + stringify(actual) + "\""); + } + }; + TestState.prototype.verifySignatureHelp = function (optionses) { + for (var _i = 0, optionses_1 = optionses; _i < optionses_1.length; _i++) { + var options = optionses_1[_i]; + if (options.marker === undefined) { + this.verifySignatureHelpWorker(options); + } + else { + for (var _a = 0, _b = toArray(options.marker); _a < _b.length; _a++) { + var marker = _b[_a]; + this.goToMarker(marker); + this.verifySignatureHelpWorker(options); + } + } + } + }; + TestState.prototype.verifySignatureHelpWorker = function (options) { + var _this = this; + var help = this.getSignatureHelp(); + var selectedItem = help.items[help.selectedItemIndex]; + // Argument index may exceed number of parameters + var currentParameter = selectedItem.parameters[help.argumentIndex]; + assert.equal(help.items.length, options.overloadsCount || 1, this.assertionMessageAtLastKnownMarker("signature help overloads count")); + assert.equal(ts.displayPartsToString(selectedItem.documentation), options.docComment || "", this.assertionMessageAtLastKnownMarker("current signature help doc comment")); + if (options.text !== undefined) { + assert.equal(ts.displayPartsToString(selectedItem.prefixDisplayParts) + + selectedItem.parameters.map(function (p) { return ts.displayPartsToString(p.displayParts); }).join(ts.displayPartsToString(selectedItem.separatorDisplayParts)) + + ts.displayPartsToString(selectedItem.suffixDisplayParts), options.text); + } + if (options.parameterName !== undefined) { + assert.equal(currentParameter.name, options.parameterName); + } + if (options.parameterSpan !== undefined) { + assert.equal(ts.displayPartsToString(currentParameter.displayParts), options.parameterSpan); + } + if (currentParameter) { + assert.equal(ts.displayPartsToString(currentParameter.documentation), options.parameterDocComment || "", this.assertionMessageAtLastKnownMarker("current parameter Help DocComment")); + } + if (options.parameterCount !== undefined) { + assert.equal(selectedItem.parameters.length, options.parameterCount); + } + if (options.argumentCount !== undefined) { + assert.equal(help.argumentCount, options.argumentCount); + } + assert.equal(selectedItem.isVariadic, !!options.isVariadic); + var actualTags = selectedItem.tags; + assert.equal(actualTags.length, (options.tags || ts.emptyArray).length, this.assertionMessageAtLastKnownMarker("signature help tags")); + ts.zipWith((options.tags || ts.emptyArray), actualTags, function (expectedTag, actualTag) { + assert.equal(expectedTag.name, actualTag.name); + assert.equal(expectedTag.text, actualTag.text, _this.assertionMessageAtLastKnownMarker("signature help tag " + actualTag.name)); + }); + var allKeys = [ + "marker", + "overloadsCount", + "docComment", + "text", + "parameterName", + "parameterSpan", + "parameterDocComment", + "parameterCount", + "isVariadic", + "tags", + "argumentCount", + ]; + for (var key in options) { + ts.Debug.assert(ts.contains(allKeys, key)); + } + }; + TestState.prototype.validate = function (name, expected, actual) { + if (expected && expected !== actual) { + this.raiseError("Expected " + name + " '" + expected + "'. Got '" + actual + "' instead."); + } + }; + TestState.prototype.verifyRenameInfoSucceeded = function (displayName, fullDisplayName, kind, kindModifiers) { + var renameInfo = this.languageService.getRenameInfo(this.activeFile.fileName, this.currentCaretPosition); + if (!renameInfo.canRename) { + this.raiseError("Rename did not succeed"); + } + this.validate("displayName", displayName, renameInfo.displayName); + this.validate("fullDisplayName", fullDisplayName, renameInfo.fullDisplayName); + this.validate("kind", kind, renameInfo.kind); + this.validate("kindModifiers", kindModifiers, renameInfo.kindModifiers); + if (this.getRanges().length !== 1) { + this.raiseError("Expected a single range to be selected in the test file."); + } + var expectedRange = this.getRanges()[0]; + if (renameInfo.triggerSpan.start !== expectedRange.pos || + ts.textSpanEnd(renameInfo.triggerSpan) !== expectedRange.end) { + this.raiseError("Expected triggerSpan [" + expectedRange.pos + "," + expectedRange.end + "). Got [" + + renameInfo.triggerSpan.start + "," + ts.textSpanEnd(renameInfo.triggerSpan) + ") instead."); + } + }; + TestState.prototype.verifyRenameInfoFailed = function (message) { + var renameInfo = this.languageService.getRenameInfo(this.activeFile.fileName, this.currentCaretPosition); + if (renameInfo.canRename) { + this.raiseError("Rename was expected to fail"); + } + this.validate("error", message, renameInfo.localizedErrorMessage); + }; + TestState.prototype.spanInfoToString = function (spanInfo, prefixString) { + var resultString = "SpanInfo: " + JSON.stringify(spanInfo); + if (spanInfo) { + var spanString = this.activeFile.content.substr(spanInfo.start, spanInfo.length); + var spanLineMap = ts.computeLineStarts(spanString); + for (var i = 0; i < spanLineMap.length; i++) { + if (!i) { + resultString += "\n"; + } + resultString += prefixString + spanString.substring(spanLineMap[i], spanLineMap[i + 1]); + } + resultString += "\n" + prefixString + ":=> (" + this.getLineColStringAtPosition(spanInfo.start) + ") to (" + this.getLineColStringAtPosition(ts.textSpanEnd(spanInfo)) + ")"; + } + return resultString; + }; + TestState.prototype.baselineCurrentFileLocations = function (getSpanAtPos) { + var _this = this; + var fileLineMap = ts.computeLineStarts(this.activeFile.content); + var nextLine = 0; + var resultString = ""; + var currentLine; + var previousSpanInfo; + var startColumn; + var length; + var prefixString = " >"; + var pos = 0; + var addSpanInfoString = function () { + if (previousSpanInfo) { + resultString += currentLine; + var thisLineMarker = ts.repeatString(" ", startColumn) + ts.repeatString("~", length); + thisLineMarker += ts.repeatString(" ", _this.alignmentForExtraInfo - thisLineMarker.length - prefixString.length + 1); + resultString += thisLineMarker; + resultString += "=> Pos: (" + (pos - length) + " to " + (pos - 1) + ") "; + resultString += " " + previousSpanInfo; + previousSpanInfo = undefined; + } + }; + for (; pos < this.activeFile.content.length; pos++) { + if (pos === 0 || pos === fileLineMap[nextLine]) { + nextLine++; + addSpanInfoString(); + if (resultString.length) { + resultString += "\n--------------------------------"; + } + currentLine = "\n" + nextLine.toString() + ts.repeatString(" ", 3 - nextLine.toString().length) + ">" + this.activeFile.content.substring(pos, fileLineMap[nextLine]) + "\n "; + startColumn = 0; + length = 0; + } + var spanInfo = this.spanInfoToString(getSpanAtPos(pos), prefixString); + if (previousSpanInfo && previousSpanInfo !== spanInfo) { + addSpanInfoString(); + previousSpanInfo = spanInfo; + startColumn = startColumn + length; + length = 1; + } + else { + previousSpanInfo = spanInfo; + length++; + } + } + addSpanInfoString(); + return resultString; + }; + TestState.prototype.getBreakpointStatementLocation = function (pos) { + return this.languageService.getBreakpointStatementAtPosition(this.activeFile.fileName, pos); + }; + TestState.prototype.baselineCurrentFileBreakpointLocations = function () { + var _this = this; + var baselineFile = this.testData.globalOptions["BaselineFile" /* baselineFile */]; + if (!baselineFile) { + baselineFile = this.activeFile.fileName.replace(this.basePath + "/breakpointValidation", "bpSpan"); + baselineFile = baselineFile.replace(".ts" /* Ts */, ".baseline"); + } + Harness.Baseline.runBaseline(baselineFile, function () { + return _this.baselineCurrentFileLocations(function (pos) { return _this.getBreakpointStatementLocation(pos); }); + }); + }; + TestState.prototype.baselineGetEmitOutput = function (insertResultsIntoVfs) { + var _this = this; + // Find file to be emitted + var emitFiles = []; // List of FourSlashFile that has emitThisFile flag on + var allFourSlashFiles = this.testData.files; + for (var _i = 0, allFourSlashFiles_1 = allFourSlashFiles; _i < allFourSlashFiles_1.length; _i++) { + var file = allFourSlashFiles_1[_i]; + if (file.fileOptions["emitThisFile" /* emitThisFile */] === "true") { + // Find a file with the flag emitThisFile turned on + emitFiles.push(file); + } + } + // If there is not emiThisFile flag specified in the test file, throw an error + if (emitFiles.length === 0) { + this.raiseError("No emitThisFile is specified in the test file"); + } + Harness.Baseline.runBaseline(this.testData.globalOptions["BaselineFile" /* baselineFile */], function () { + var resultString = ""; + // Loop through all the emittedFiles and emit them one by one + emitFiles.forEach(function (emitFile) { + var emitOutput = _this.languageService.getEmitOutput(emitFile.fileName); + // Print emitOutputStatus in readable format + resultString += "EmitSkipped: " + emitOutput.emitSkipped + Harness.IO.newLine(); + if (emitOutput.emitSkipped) { + resultString += "Diagnostics:" + Harness.IO.newLine(); + var diagnostics = ts.getPreEmitDiagnostics(_this.languageService.getProgram()); // TODO: GH#18217 + for (var _i = 0, diagnostics_1 = diagnostics; _i < diagnostics_1.length; _i++) { + var diagnostic = diagnostics_1[_i]; + if (!ts.isString(diagnostic.messageText)) { + var chainedMessage = diagnostic.messageText; + var indentation = " "; + while (chainedMessage) { + resultString += indentation + chainedMessage.messageText + Harness.IO.newLine(); + chainedMessage = chainedMessage.next; + indentation = indentation + " "; + } + } + else { + resultString += " " + diagnostic.messageText + Harness.IO.newLine(); + } + } + } + for (var _a = 0, _b = emitOutput.outputFiles; _a < _b.length; _a++) { + var outputFile = _b[_a]; + var fileName = "FileName : " + outputFile.name + Harness.IO.newLine(); + resultString = resultString + fileName + outputFile.text; + if (insertResultsIntoVfs) { + _this.languageServiceAdapterHost.addScript(ts.getNormalizedAbsolutePath(outputFile.name, "/"), outputFile.text, /*isRootFile*/ true); + } + } + resultString += Harness.IO.newLine(); + }); + return resultString; + }); + }; + TestState.prototype.baselineQuickInfo = function () { + var _this = this; + var baselineFile = this.testData.globalOptions["BaselineFile" /* baselineFile */]; + if (!baselineFile) { + baselineFile = ts.getBaseFileName(this.activeFile.fileName).replace(".ts" /* Ts */, ".baseline"); + } + Harness.Baseline.runBaseline(baselineFile, function () { return stringify(_this.testData.markers.map(function (marker) { return ({ + marker: marker, + quickInfo: _this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position) + }); })); }); + }; + TestState.prototype.printBreakpointLocation = function (pos) { + Harness.IO.log("\n**Pos: " + pos + " " + this.spanInfoToString(this.getBreakpointStatementLocation(pos), " ")); + }; + TestState.prototype.printBreakpointAtCurrentLocation = function () { + this.printBreakpointLocation(this.currentCaretPosition); + }; + TestState.prototype.printCurrentParameterHelp = function () { + var help = this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition); + Harness.IO.log(stringify(help)); + }; + TestState.prototype.printCurrentQuickInfo = function () { + var quickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition); + Harness.IO.log("Quick Info: " + quickInfo.displayParts.map(function (part) { return part.text; }).join("")); + }; + TestState.prototype.printErrorList = function () { + var syntacticErrors = this.languageService.getSyntacticDiagnostics(this.activeFile.fileName); + var semanticErrors = this.languageService.getSemanticDiagnostics(this.activeFile.fileName); + var errorList = ts.concatenate(syntacticErrors, semanticErrors); + Harness.IO.log("Error list (" + errorList.length + " errors)"); + if (errorList.length) { + errorList.forEach(function (err) { + Harness.IO.log("start: " + err.start + + ", length: " + err.length + + ", message: " + ts.flattenDiagnosticMessageText(err.messageText, Harness.IO.newLine())); + }); + } + }; + TestState.prototype.printCurrentFileState = function (showWhitespace, makeCaretVisible) { + for (var _i = 0, _a = this.testData.files; _i < _a.length; _i++) { + var file = _a[_i]; + var active = (this.activeFile === file); + Harness.IO.log("=== Script (" + file.fileName + ") " + (active ? "(active, cursor at |)" : "") + " ==="); + var content = this.getFileContent(file.fileName); + if (active) { + content = content.substr(0, this.currentCaretPosition) + (makeCaretVisible ? "|" : "") + content.substr(this.currentCaretPosition); + } + if (showWhitespace) { + content = makeWhitespaceVisible(content); + } + Harness.IO.log(content); + } + }; + TestState.prototype.printCurrentSignatureHelp = function () { + var help = this.getSignatureHelp(); + Harness.IO.log(stringify(help.items[help.selectedItemIndex])); + }; + TestState.prototype.getSignatureHelp = function () { + return this.languageService.getSignatureHelpItems(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.printCompletionListMembers = function (preferences) { + var completions = this.getCompletionListAtCaret(preferences); + this.printMembersOrCompletions(completions); + }; + TestState.prototype.printMembersOrCompletions = function (info) { + if (info === undefined) { + return "No completion info."; + } + var entries = info.entries; + function pad(s, length) { + return s + new Array(length - s.length + 1).join(" "); + } + function max(arr, selector) { + return arr.reduce(function (prev, x) { return Math.max(prev, selector(x)); }, 0); + } + var longestNameLength = max(entries, function (m) { return m.name.length; }); + var longestKindLength = max(entries, function (m) { return m.kind.length; }); + entries.sort(function (m, n) { return m.sortText > n.sortText ? 1 : m.sortText < n.sortText ? -1 : m.name > n.name ? 1 : m.name < n.name ? -1 : 0; }); + var membersString = entries.map(function (m) { return pad(m.name, longestNameLength) + " " + pad(m.kind, longestKindLength) + " " + m.kindModifiers + " " + (m.isRecommended ? "recommended " : "") + (m.source === undefined ? "" : m.source); }).join("\n"); + Harness.IO.log(membersString); + }; + TestState.prototype.printContext = function () { + ts.forEach(this.languageServiceAdapterHost.getFilenames(), Harness.IO.log); + }; + TestState.prototype.deleteChar = function (count) { + if (count === void 0) { count = 1; } + var offset = this.currentCaretPosition; + var ch = ""; + var checkCadence = (count >> 2) + 1; + for (var i = 0; i < count; i++) { + this.editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset + 1, ch); + if (i % checkCadence === 0) { + this.checkPostEditInvariants(); + } + // Handle post-keystroke formatting + if (this.enableFormatting) { + var edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeSettings); + if (edits.length) { + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + } + } + } + this.checkPostEditInvariants(); + }; + TestState.prototype.replace = function (start, length, text) { + this.editScriptAndUpdateMarkers(this.activeFile.fileName, start, start + length, text); + this.checkPostEditInvariants(); + }; + TestState.prototype.deleteCharBehindMarker = function (count) { + if (count === void 0) { count = 1; } + var offset = this.currentCaretPosition; + var ch = ""; + var checkCadence = (count >> 2) + 1; + for (var i = 0; i < count; i++) { + this.currentCaretPosition--; + offset--; + this.editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset + 1, ch); + if (i % checkCadence === 0) { + this.checkPostEditInvariants(); + } + // Don't need to examine formatting because there are no formatting changes on backspace. + } + this.checkPostEditInvariants(); + }; + // Enters lines of text at the current caret position + TestState.prototype.type = function (text, highFidelity) { + if (highFidelity === void 0) { highFidelity = false; } + var offset = this.currentCaretPosition; + var prevChar = " "; + var checkCadence = (text.length >> 2) + 1; + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i); + this.editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset, ch); + if (highFidelity) { + this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, offset); + } + this.currentCaretPosition++; + offset++; + if (highFidelity) { + if (ch === "(" || ch === ",") { + /* Signature help*/ + this.languageService.getSignatureHelpItems(this.activeFile.fileName, offset); + } + else if (prevChar === " " && /A-Za-z_/.test(ch)) { + /* Completions */ + this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset, ts.defaultPreferences); + } + if (i % checkCadence === 0) { + this.checkPostEditInvariants(); + } + } + // Handle post-keystroke formatting + if (this.enableFormatting) { + var edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeSettings); + if (edits.length) { + offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + } + } + } + this.checkPostEditInvariants(); + }; + // Enters text as if the user had pasted it + TestState.prototype.paste = function (text) { + var start = this.currentCaretPosition; + this.editScriptAndUpdateMarkers(this.activeFile.fileName, this.currentCaretPosition, this.currentCaretPosition, text); + this.checkPostEditInvariants(); + var offset = this.currentCaretPosition += text.length; + // Handle formatting + if (this.enableFormatting) { + var edits = this.languageService.getFormattingEditsForRange(this.activeFile.fileName, start, offset, this.formatCodeSettings); + if (edits.length) { + this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + } + } + this.checkPostEditInvariants(); + }; + TestState.prototype.checkPostEditInvariants = function () { + if (this.testType !== 0 /* Native */) { + // getSourcefile() results can not be serialized. Only perform these verifications + // if running against a native LS object. + return; + } + var incrementalSourceFile = this.languageService.getNonBoundSourceFile(this.activeFile.fileName); + Utils.assertInvariants(incrementalSourceFile, /*parent:*/ undefined); + var incrementalSyntaxDiagnostics = incrementalSourceFile.parseDiagnostics; + // Check syntactic structure + var content = this.getFileContent(this.activeFile.fileName); + var referenceSourceFile = ts.createLanguageServiceSourceFile(this.activeFile.fileName, createScriptSnapShot(content), 6 /* Latest */, /*version:*/ "0", /*setNodeParents:*/ false); + var referenceSyntaxDiagnostics = referenceSourceFile.parseDiagnostics; + Utils.assertDiagnosticsEquals(incrementalSyntaxDiagnostics, referenceSyntaxDiagnostics); + Utils.assertStructuralEquals(incrementalSourceFile, referenceSourceFile); + }; + /** + * @returns The number of characters added to the file as a result of the edits. + * May be negative. + */ + TestState.prototype.applyEdits = function (fileName, edits, isFormattingEdit) { + // We get back a set of edits, but langSvc.editScript only accepts one at a time. Use this to keep track + // of the incremental offset from each edit to the next. We assume these edit ranges don't overlap + // Copy this so we don't ruin someone else's copy + edits = JSON.parse(JSON.stringify(edits)); + // Get a snapshot of the content of the file so we can make sure any formatting edits didn't destroy non-whitespace characters + var oldContent = this.getFileContent(fileName); + var runningOffset = 0; + for (var i = 0; i < edits.length; i++) { + var edit = edits[i]; + var offsetStart = edit.span.start; + var offsetEnd = offsetStart + edit.span.length; + this.editScriptAndUpdateMarkers(fileName, offsetStart, offsetEnd, edit.newText); + var editDelta = edit.newText.length - edit.span.length; + if (offsetStart <= this.currentCaretPosition) { + if (offsetEnd <= this.currentCaretPosition) { + // The entirety of the edit span falls before the caret position, shift the caret accordingly + this.currentCaretPosition += editDelta; + } + else { + // The span being replaced includes the caret position, place the caret at the beginning of the span + this.currentCaretPosition = offsetStart; + } + } + runningOffset += editDelta; + // Update positions of any future edits affected by this change + for (var j = i + 1; j < edits.length; j++) { + if (edits[j].span.start >= edits[i].span.start) { + edits[j].span.start += editDelta; + } + } + } + if (isFormattingEdit) { + var newContent = this.getFileContent(fileName); + if (this.removeWhitespace(newContent) !== this.removeWhitespace(oldContent)) { + this.raiseError("Formatting operation destroyed non-whitespace content"); + } + } + return runningOffset; + }; + TestState.prototype.copyFormatOptions = function () { + return ts.clone(this.formatCodeSettings); + }; + TestState.prototype.setFormatOptions = function (formatCodeOptions) { + var oldFormatCodeOptions = this.formatCodeSettings; + this.formatCodeSettings = ts.toEditorSettings(formatCodeOptions); + return oldFormatCodeOptions; + }; + TestState.prototype.formatDocument = function () { + var edits = this.languageService.getFormattingEditsForDocument(this.activeFile.fileName, this.formatCodeSettings); + this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + }; + TestState.prototype.formatSelection = function (start, end) { + var edits = this.languageService.getFormattingEditsForRange(this.activeFile.fileName, start, end, this.formatCodeSettings); + this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + }; + TestState.prototype.formatOnType = function (pos, key) { + var edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, pos, key, this.formatCodeSettings); + this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true); + }; + TestState.prototype.editScriptAndUpdateMarkers = function (fileName, editStart, editEnd, newText) { + this.languageServiceAdapterHost.editScript(fileName, editStart, editEnd, newText); + for (var _i = 0, _a = this.testData.markers; _i < _a.length; _i++) { + var marker = _a[_i]; + if (marker.fileName === fileName) { + marker.position = updatePosition(marker.position); + } + } + for (var _b = 0, _c = this.testData.ranges; _b < _c.length; _b++) { + var range = _c[_b]; + if (range.fileName === fileName) { + range.pos = updatePosition(range.pos); + range.end = updatePosition(range.end); + } + } + function updatePosition(position) { + if (position > editStart) { + if (position < editEnd) { + // Inside the edit - mark it as invalidated (?) + return -1; + } + else { + // Move marker back/forward by the appropriate amount + return position + (editStart - editEnd) + newText.length; + } + } + else { + return position; + } + } + }; + TestState.prototype.removeWhitespace = function (text) { + return text.replace(/\s/g, ""); + }; + TestState.prototype.goToBOF = function () { + this.goToPosition(0); + }; + TestState.prototype.goToEOF = function () { + var len = this.getFileContent(this.activeFile.fileName).length; + this.goToPosition(len); + }; + TestState.prototype.goToRangeStart = function (_a) { + var fileName = _a.fileName, pos = _a.pos; + this.openFile(fileName); + this.goToPosition(pos); + }; + TestState.prototype.goToTypeDefinition = function (definitionIndex) { + var definitions = this.languageService.getTypeDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (!definitions || !definitions.length) { + this.raiseError("goToTypeDefinition failed - expected to find at least one definition location but got 0"); + } + if (definitionIndex >= definitions.length) { + this.raiseError("goToTypeDefinition failed - definitionIndex value (" + definitionIndex + ") exceeds definition list size (" + definitions.length + ")"); + } + var definition = definitions[definitionIndex]; + this.openFile(definition.fileName); + this.currentCaretPosition = definition.textSpan.start; + }; + TestState.prototype.verifyTypeDefinitionsCount = function (negative, expectedCount) { + var assertFn = negative ? assert.notEqual : assert.equal; + var definitions = this.languageService.getTypeDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); + var actualCount = definitions && definitions.length || 0; + assertFn(actualCount, expectedCount, this.messageAtLastKnownMarker("Type definitions Count")); + }; + TestState.prototype.verifyImplementationListIsEmpty = function (negative) { + var implementations = this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (negative) { + assert.isTrue(implementations && implementations.length > 0, "Expected at least one implementation but got 0"); + } + else { + assert.isUndefined(implementations, "Expected implementation list to be empty but implementations returned"); + } + }; + TestState.prototype.verifyGoToDefinitionName = function (expectedName, expectedContainerName) { + var definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); + var actualDefinitionName = definitions && definitions.length ? definitions[0].name : ""; + var actualDefinitionContainerName = definitions && definitions.length ? definitions[0].containerName : ""; + assert.equal(actualDefinitionName, expectedName, this.messageAtLastKnownMarker("Definition Info Name")); + assert.equal(actualDefinitionContainerName, expectedContainerName, this.messageAtLastKnownMarker("Definition Info Container Name")); + }; + TestState.prototype.goToImplementation = function () { + var implementations = this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (!implementations || !implementations.length) { + this.raiseError("goToImplementation failed - expected to find at least one implementation location but got 0"); + } + if (implementations.length > 1) { + this.raiseError("goToImplementation failed - more than 1 implementation returned (" + implementations.length + ")"); + } + var implementation = implementations[0]; + this.openFile(implementation.fileName); + this.currentCaretPosition = implementation.textSpan.start; + }; + TestState.prototype.verifyRangesInImplementationList = function (markerName) { + this.goToMarker(markerName); + var implementations = this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (!implementations || !implementations.length) { + this.raiseError("verifyRangesInImplementationList failed - expected to find at least one implementation location but got 0"); + } + var duplicate = findDuplicatedElement(implementations, implementationsAreEqual); + if (duplicate) { + var textSpan = duplicate.textSpan, fileName = duplicate.fileName; + var end = textSpan.start + textSpan.length; + this.raiseError("Duplicate implementations returned for range (" + textSpan.start + ", " + end + ") in " + fileName); + } + var ranges = this.getRanges(); + if (!ranges || !ranges.length) { + this.raiseError("verifyRangesInImplementationList failed - expected to find at least one range in test source"); + } + var unsatisfiedRanges = []; + var delayedErrors = []; + var _loop_8 = function (range) { + var length = range.end - range.pos; + var matchingImpl = ts.find(implementations, function (impl) { + return range.fileName === impl.fileName && range.pos === impl.textSpan.start && length === impl.textSpan.length; + }); + if (matchingImpl) { + if (range.marker && range.marker.data) { + var expected = range.marker.data; + if (expected.displayParts) { + if (!ts.arrayIsEqualTo(expected.displayParts, matchingImpl.displayParts, displayPartIsEqualTo)) { + delayedErrors.push("Mismatched display parts: expected " + JSON.stringify(expected.displayParts) + ", actual " + JSON.stringify(matchingImpl.displayParts)); + } + } + else if (expected.parts) { + var actualParts = matchingImpl.displayParts.map(function (p) { return p.text; }); + if (!ts.arrayIsEqualTo(expected.parts, actualParts)) { + delayedErrors.push("Mismatched non-tagged display parts: expected " + JSON.stringify(expected.parts) + ", actual " + JSON.stringify(actualParts)); + } + } + if (expected.kind !== undefined) { + if (expected.kind !== matchingImpl.kind) { + delayedErrors.push("Mismatched kind: expected " + JSON.stringify(expected.kind) + ", actual " + JSON.stringify(matchingImpl.kind)); + } + } + } + matchingImpl.matched = true; + } + else { + unsatisfiedRanges.push(range); + } + }; + for (var _i = 0, ranges_2 = ranges; _i < ranges_2.length; _i++) { + var range = ranges_2[_i]; + _loop_8(range); + } + if (delayedErrors.length) { + this.raiseError(delayedErrors.join("\n")); + } + var unmatchedImplementations = implementations.filter(function (impl) { return !impl.matched; }); + if (unmatchedImplementations.length || unsatisfiedRanges.length) { + var error = "Not all ranges or implementations are satisfied"; + if (unsatisfiedRanges.length) { + error += "\nUnsatisfied ranges:"; + for (var _a = 0, unsatisfiedRanges_1 = unsatisfiedRanges; _a < unsatisfiedRanges_1.length; _a++) { + var range = unsatisfiedRanges_1[_a]; + error += "\n (" + range.pos + ", " + range.end + ") in " + range.fileName + ": " + this.rangeText(range); + } + } + if (unmatchedImplementations.length) { + error += "\nUnmatched implementations:"; + for (var _b = 0, unmatchedImplementations_1 = unmatchedImplementations; _b < unmatchedImplementations_1.length; _b++) { + var impl = unmatchedImplementations_1[_b]; + var end = impl.textSpan.start + impl.textSpan.length; + error += "\n (" + impl.textSpan.start + ", " + end + ") in " + impl.fileName + ": " + this.getFileContent(impl.fileName).slice(impl.textSpan.start, end); + } + } + this.raiseError(error); + } + function implementationsAreEqual(a, b) { + return a.fileName === b.fileName && TestState.textSpansEqual(a.textSpan, b.textSpan); + } + function displayPartIsEqualTo(a, b) { + return a.kind === b.kind && a.text === b.text; + } + }; + TestState.prototype.getMarkers = function () { + // Return a copy of the list + return this.testData.markers.slice(0); + }; + TestState.prototype.getMarkerNames = function () { + return ts.arrayFrom(this.testData.markerPositions.keys()); + }; + TestState.prototype.getRanges = function () { + return this.testData.ranges; + }; + TestState.prototype.rangesByText = function () { + var result = ts.createMultiMap(); + for (var _i = 0, _a = this.getRanges(); _i < _a.length; _i++) { + var range = _a[_i]; + var text = this.rangeText(range); + result.add(text, range); + } + return result; + }; + TestState.prototype.rangeText = function (_a) { + var fileName = _a.fileName, pos = _a.pos, end = _a.end; + return this.getFileContent(fileName).slice(pos, end); + }; + TestState.prototype.verifyCaretAtMarker = function (markerName) { + if (markerName === void 0) { markerName = ""; } + var pos = this.getMarkerByName(markerName); + if (pos.fileName !== this.activeFile.fileName) { + throw new Error("verifyCaretAtMarker failed - expected to be in file \"" + pos.fileName + "\", but was in file \"" + this.activeFile.fileName + "\""); + } + if (pos.position !== this.currentCaretPosition) { + throw new Error("verifyCaretAtMarker failed - expected to be at marker \"/*" + markerName + "*/, but was at position " + this.currentCaretPosition + "(" + this.getLineColStringAtPosition(this.currentCaretPosition) + ")"); + } + }; + TestState.prototype.getIndentation = function (fileName, position, indentStyle, baseIndentSize) { + var formatOptions = ts.clone(this.formatCodeSettings); + formatOptions.indentStyle = indentStyle; + formatOptions.baseIndentSize = baseIndentSize; + return this.languageService.getIndentationAtPosition(fileName, position, formatOptions); + }; + TestState.prototype.verifyIndentationAtCurrentPosition = function (numberOfSpaces, indentStyle, baseIndentSize) { + if (indentStyle === void 0) { indentStyle = ts.IndentStyle.Smart; } + if (baseIndentSize === void 0) { baseIndentSize = 0; } + var actual = this.getIndentation(this.activeFile.fileName, this.currentCaretPosition, indentStyle, baseIndentSize); + var lineCol = this.getLineColStringAtPosition(this.currentCaretPosition); + if (actual !== numberOfSpaces) { + this.raiseError("verifyIndentationAtCurrentPosition failed at " + lineCol + " - expected: " + numberOfSpaces + ", actual: " + actual); + } + }; + TestState.prototype.verifyIndentationAtPosition = function (fileName, position, numberOfSpaces, indentStyle, baseIndentSize) { + if (indentStyle === void 0) { indentStyle = ts.IndentStyle.Smart; } + if (baseIndentSize === void 0) { baseIndentSize = 0; } + var actual = this.getIndentation(fileName, position, indentStyle, baseIndentSize); + var lineCol = this.getLineColStringAtPosition(position); + if (actual !== numberOfSpaces) { + this.raiseError("verifyIndentationAtPosition failed at " + lineCol + " - expected: " + numberOfSpaces + ", actual: " + actual); + } + }; + TestState.prototype.verifyCurrentLineContent = function (text) { + var actual = this.getCurrentLineContent(); + if (actual !== text) { + throw new Error("verifyCurrentLineContent\n" + + "\tExpected: \"" + text + "\"\n" + + "\t Actual: \"" + actual + "\""); + } + }; + TestState.prototype.verifyCurrentFileContent = function (text) { + this.verifyFileContent(this.activeFile.fileName, text); + }; + TestState.prototype.verifyFileContent = function (fileName, text) { + var actual = this.getFileContent(fileName); + if (actual !== text) { + throw new Error("verifyFileContent failed:\n" + showTextDiff(text, actual)); + } + }; + TestState.prototype.verifyTextAtCaretIs = function (text) { + var actual = this.getFileContent(this.activeFile.fileName).substring(this.currentCaretPosition, this.currentCaretPosition + text.length); + if (actual !== text) { + throw new Error("verifyTextAtCaretIs\n" + + "\tExpected: \"" + text + "\"\n" + + "\t Actual: \"" + actual + "\""); + } + }; + TestState.prototype.verifyCurrentNameOrDottedNameSpanText = function (text) { + var span = this.languageService.getNameOrDottedNameSpan(this.activeFile.fileName, this.currentCaretPosition, this.currentCaretPosition); + if (!span) { + return this.raiseError("verifyCurrentNameOrDottedNameSpanText\n" + + "\tExpected: \"" + text + "\"\n" + + "\t Actual: undefined"); + } + var actual = this.getFileContent(this.activeFile.fileName).substring(span.start, ts.textSpanEnd(span)); + if (actual !== text) { + this.raiseError("verifyCurrentNameOrDottedNameSpanText\n" + + "\tExpected: \"" + text + "\"\n" + + "\t Actual: \"" + actual + "\""); + } + }; + TestState.prototype.getNameOrDottedNameSpan = function (pos) { + return this.languageService.getNameOrDottedNameSpan(this.activeFile.fileName, pos, pos); + }; + TestState.prototype.baselineCurrentFileNameOrDottedNameSpans = function () { + var _this = this; + Harness.Baseline.runBaseline(this.testData.globalOptions["BaselineFile" /* baselineFile */], function () { + return _this.baselineCurrentFileLocations(function (pos) { + return _this.getNameOrDottedNameSpan(pos); + }); + }); + }; + TestState.prototype.printNameOrDottedNameSpans = function (pos) { + Harness.IO.log(this.spanInfoToString(this.getNameOrDottedNameSpan(pos), "**")); + }; + TestState.prototype.verifyClassifications = function (expected, actual, sourceFileText) { + var _this = this; + if (actual.length !== expected.length) { + this.raiseError("verifyClassifications failed - expected total classifications to be " + expected.length + + ", but was " + actual.length + + jsonMismatchString()); + } + ts.zipWith(expected, actual, function (expectedClassification, actualClassification) { + var expectedType = expectedClassification.classificationType; + if (expectedType !== actualClassification.classificationType) { + _this.raiseError("verifyClassifications failed - expected classifications type to be " + + expectedType + ", but was " + + actualClassification.classificationType + + jsonMismatchString()); + } + var expectedSpan = expectedClassification.textSpan; + var actualSpan = actualClassification.textSpan; + if (expectedSpan) { + var expectedLength = expectedSpan.end - expectedSpan.start; + if (expectedSpan.start !== actualSpan.start || expectedLength !== actualSpan.length) { + _this.raiseError("verifyClassifications failed - expected span of text to be " + + "{start=" + expectedSpan.start + ", length=" + expectedLength + "}, but was " + + "{start=" + actualSpan.start + ", length=" + actualSpan.length + "}" + + jsonMismatchString()); + } + } + var actualText = _this.activeFile.content.substr(actualSpan.start, actualSpan.length); + if (expectedClassification.text !== actualText) { + _this.raiseError("verifyClassifications failed - expected classified text to be " + + expectedClassification.text + ", but was " + + actualText + + jsonMismatchString()); + } + }); + function jsonMismatchString() { + var showActual = actual.map(function (_a) { + var classificationType = _a.classificationType, textSpan = _a.textSpan; + return ({ classificationType: classificationType, text: sourceFileText.slice(textSpan.start, textSpan.start + textSpan.length) }); + }); + return Harness.IO.newLine() + + "expected: '" + Harness.IO.newLine() + stringify(expected) + "'" + Harness.IO.newLine() + + "actual: '" + Harness.IO.newLine() + stringify(showActual) + "'"; + } + }; + TestState.prototype.verifyProjectInfo = function (expected) { + var _this = this; + if (this.testType === 3 /* Server */) { + var actual = this.languageService.getProjectInfo(this.activeFile.fileName, + /* needFileNameList */ true); + assert.equal(expected.join(","), actual.fileNames.map(function (file) { + return file.replace(_this.basePath + "/", ""); + }).join(",")); + } + }; + TestState.prototype.verifySemanticClassifications = function (expected) { + var actual = this.languageService.getSemanticClassifications(this.activeFile.fileName, ts.createTextSpan(0, this.activeFile.content.length)); + this.verifyClassifications(expected, actual, this.activeFile.content); + }; + TestState.prototype.verifySyntacticClassifications = function (expected) { + var actual = this.languageService.getSyntacticClassifications(this.activeFile.fileName, ts.createTextSpan(0, this.activeFile.content.length)); + this.verifyClassifications(expected, actual, this.activeFile.content); + }; + TestState.prototype.printOutliningSpans = function () { + var spans = this.languageService.getOutliningSpans(this.activeFile.fileName); + Harness.IO.log("Outlining spans (" + spans.length + " items)"); + Harness.IO.log(stringify(spans)); + }; + TestState.prototype.verifyOutliningSpans = function (spans, kind) { + var _this = this; + var actual = this.languageService.getOutliningSpans(this.activeFile.fileName); + if (actual.length !== spans.length) { + this.raiseError("verifyOutliningSpans failed - expected total spans to be " + spans.length + ", but was " + actual.length); + } + ts.zipWith(spans, actual, function (expectedSpan, actualSpan, i) { + if (expectedSpan.pos !== actualSpan.textSpan.start || expectedSpan.end !== ts.textSpanEnd(actualSpan.textSpan)) { + return _this.raiseError("verifyOutliningSpans failed - span " + (i + 1) + " expected: (" + expectedSpan.pos + "," + expectedSpan.end + "), actual: (" + actualSpan.textSpan.start + "," + ts.textSpanEnd(actualSpan.textSpan) + ")"); + } + if (kind !== undefined && actualSpan.kind !== kind) { + return _this.raiseError("verifyOutliningSpans failed - span " + (i + 1) + " expected kind: ('" + kind + "'), actual: ('" + actualSpan.kind + "')"); + } + }); + }; + TestState.prototype.verifyTodoComments = function (descriptors, spans) { + var _this = this; + var actual = this.languageService.getTodoComments(this.activeFile.fileName, descriptors.map(function (d) { return { text: d, priority: 0 }; })); + if (actual.length !== spans.length) { + this.raiseError("verifyTodoComments failed - expected total spans to be " + spans.length + ", but was " + actual.length); + } + ts.zipWith(spans, actual, function (expectedSpan, actualComment, i) { + var actualCommentSpan = ts.createTextSpan(actualComment.position, actualComment.message.length); + if (expectedSpan.pos !== actualCommentSpan.start || expectedSpan.end !== ts.textSpanEnd(actualCommentSpan)) { + _this.raiseError("verifyOutliningSpans failed - span " + (i + 1) + " expected: (" + expectedSpan.pos + "," + expectedSpan.end + "), actual: (" + actualCommentSpan.start + "," + ts.textSpanEnd(actualCommentSpan) + ")"); + } + }); + }; + /** + * Finds and applies a code action corresponding to the supplied parameters. + * If index is undefined, applies the unique code action available. + * @param errorCode The error code that generated the code action. + * @param index The nth (0-index-based) codeaction available generated by errorCode. + */ + TestState.prototype.getAndApplyCodeActions = function (errorCode, index) { + var fileName = this.activeFile.fileName; + this.applyCodeActions(this.getCodeFixes(fileName, errorCode), index); + }; + TestState.prototype.applyCodeActionFromCompletion = function (markerName, options) { + this.goToMarker(markerName); + var details = this.getCompletionEntryDetails(options.name, options.source, options.preferences); + var codeActions = details.codeActions; + if (codeActions.length !== 1) { + this.raiseError("Expected one code action, got " + codeActions.length); + } + if (codeActions[0].description !== options.description) { + this.raiseError("Expected description to be:\n" + options.description + "\ngot:\n" + codeActions[0].description); + } + this.applyCodeActions(codeActions); + this.verifyNewContent(options, ts.flatMap(codeActions, function (a) { return a.changes.map(function (c) { return c.fileName; }); })); + }; + TestState.prototype.verifyRangeIs = function (expectedText, includeWhiteSpace) { + var ranges = this.getRanges(); + if (ranges.length !== 1) { + this.raiseError("Exactly one range should be specified in the testfile."); + } + var actualText = this.rangeText(ranges[0]); + var result = includeWhiteSpace + ? actualText === expectedText + : this.removeWhitespace(actualText) === this.removeWhitespace(expectedText); + if (!result) { + this.raiseError("Actual range text doesn't match expected text.\n" + showTextDiff(expectedText, actualText)); + } + }; + /** + * Compares expected text to the text that would be in the sole range + * (ie: [|...|]) in the file after applying the codefix sole codefix + * in the source file. + */ + TestState.prototype.verifyRangeAfterCodeFix = function (expectedText, includeWhiteSpace, errorCode, index) { + this.getAndApplyCodeActions(errorCode, index); + this.verifyRangeIs(expectedText, includeWhiteSpace); + }; + TestState.prototype.verifyCodeFixAll = function (_a) { + var _this = this; + var fixId = _a.fixId, fixAllDescription = _a.fixAllDescription, newFileContent = _a.newFileContent, expectedCommands = _a.commands; + var fixWithId = ts.find(this.getCodeFixes(this.activeFile.fileName), function (a) { return a.fixId === fixId; }); + ts.Debug.assert(fixWithId !== undefined, "No available code fix has that group id.", function () { + return "Expected '" + fixId + "'. Available action ids: " + ts.mapDefined(_this.getCodeFixes(_this.activeFile.fileName), function (a) { return a.fixId; }); + }); + ts.Debug.assertEqual(fixWithId.fixAllDescription, fixAllDescription); + var _b = this.languageService.getCombinedCodeFix({ type: "file", fileName: this.activeFile.fileName }, fixId, this.formatCodeSettings, ts.defaultPreferences), changes = _b.changes, commands = _b.commands; + assert.deepEqual(commands, expectedCommands); + assert(changes.every(function (c) { return c.fileName === _this.activeFile.fileName; }), "TODO: support testing codefixes that touch multiple files"); + this.applyChanges(changes); + this.verifyCurrentFileContent(newFileContent); + }; + /** + * Applies fixes for the errors in fileName and compares the results to + * expectedContents after all fixes have been applied. + * + * Note: applying one codefix may generate another (eg: remove duplicate implements + * may generate an extends -> interface conversion fix). + * @param expectedContents The contents of the file after the fixes are applied. + * @param fileName The file to check. If not supplied, the current open file is used. + */ + TestState.prototype.verifyFileAfterCodeFix = function (expectedContents, fileName) { + fileName = fileName ? fileName : this.activeFile.fileName; + this.applyCodeActions(this.getCodeFixes(fileName)); + var actualContents = this.getFileContent(fileName); + if (this.removeWhitespace(actualContents) !== this.removeWhitespace(expectedContents)) { + this.raiseError("Actual text doesn't match expected text. Actual:\n" + actualContents + "\n\nExpected:\n" + expectedContents); + } + }; + TestState.prototype.verifyCodeFix = function (options) { + var fileName = this.activeFile.fileName; + var actions = this.getCodeFixes(fileName, options.errorCode, options.preferences); + var index = options.index; + if (index === undefined) { + if (!(actions && actions.length === 1)) { + this.raiseError("Should find exactly one codefix, but " + (actions ? actions.length : "none") + " found. " + (actions ? actions.map(function (a) { return Harness.IO.newLine() + " \"" + a.description + "\""; }) : "")); + } + index = 0; + } + else { + if (!(actions && actions.length >= index + 1)) { + this.raiseError("Should find at least " + (index + 1) + " codefix(es), but " + (actions ? actions.length : "none") + " found."); + } + } + var action = actions[index]; + assert.equal(action.description, options.description); + for (var _i = 0, _a = action.changes; _i < _a.length; _i++) { + var change = _a[_i]; + this.applyEdits(change.fileName, change.textChanges, /*isFormattingEdit*/ false); + } + this.verifyNewContent(options, action.changes.map(function (c) { return c.fileName; })); + }; + TestState.prototype.verifyNewContent = function (options, changedFiles) { + var assertedChangedFiles = !options.newFileContent || typeof options.newFileContent === "string" + ? [this.activeFile.fileName] + : ts.getOwnKeys(options.newFileContent); + assert.deepEqual(assertedChangedFiles, changedFiles); + if (options.newFileContent !== undefined) { + assert(!options.newRangeContent); + if (typeof options.newFileContent === "string") { + this.verifyCurrentFileContent(options.newFileContent); + } + else { + for (var fileName in options.newFileContent) { + this.verifyFileContent(fileName, options.newFileContent[fileName]); + } + } + } + else { + this.verifyRangeIs(options.newRangeContent, /*includeWhitespace*/ true); + } + }; + /** + * Rerieves a codefix satisfying the parameters, or undefined if no such codefix is found. + * @param fileName Path to file where error should be retrieved from. + */ + TestState.prototype.getCodeFixes = function (fileName, errorCode, preferences) { + var _this = this; + if (preferences === void 0) { preferences = ts.defaultPreferences; } + var diagnosticsForCodeFix = this.getDiagnostics(fileName, /*includeSuggestions*/ true).map(function (diagnostic) { return ({ + start: diagnostic.start, + length: diagnostic.length, + code: diagnostic.code + }); }); + return ts.flatMap(ts.deduplicate(diagnosticsForCodeFix, ts.equalOwnProperties), function (diagnostic) { + if (errorCode !== undefined && errorCode !== diagnostic.code) { + return; + } + return _this.languageService.getCodeFixesAtPosition(fileName, diagnostic.start, diagnostic.start + diagnostic.length, [diagnostic.code], _this.formatCodeSettings, preferences); + }); + }; + TestState.prototype.applyCodeActions = function (actions, index) { + if (index === undefined) { + if (!(actions && actions.length === 1)) { + this.raiseError("Should find exactly one codefix, but " + (actions ? actions.length : "none") + " found. " + (actions ? actions.map(function (a) { return Harness.IO.newLine() + " \"" + a.description + "\""; }) : "")); + } + index = 0; + } + else { + if (!(actions && actions.length >= index + 1)) { + this.raiseError("Should find at least " + (index + 1) + " codefix(es), but " + (actions ? actions.length : "none") + " found."); + } + } + this.applyChanges(actions[index].changes); + }; + TestState.prototype.applyChanges = function (changes) { + for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) { + var change = changes_1[_i]; + this.applyEdits(change.fileName, change.textChanges, /*isFormattingEdit*/ false); + } + }; + TestState.prototype.verifyImportFixAtPosition = function (expectedTextArray, errorCode, preferences) { + var _this = this; + var fileName = this.activeFile.fileName; + var ranges = this.getRanges().filter(function (r) { return r.fileName === fileName; }); + if (ranges.length > 1) { + this.raiseError("Exactly one range should be specified in the testfile."); + } + var range = ts.firstOrUndefined(ranges); + var codeFixes = this.getCodeFixes(fileName, errorCode, preferences).filter(function (f) { return f.fixId === undefined; }); // TODO: GH#20315 filter out those that use the import fix ID; + if (codeFixes.length === 0) { + if (expectedTextArray.length !== 0) { + this.raiseError("No codefixes returned."); + } + return; + } + var actualTextArray = []; + var scriptInfo = this.languageServiceAdapterHost.getScriptInfo(fileName); + var originalContent = scriptInfo.content; + for (var _i = 0, codeFixes_1 = codeFixes; _i < codeFixes_1.length; _i++) { + var codeFix = codeFixes_1[_i]; + ts.Debug.assert(codeFix.changes.length === 1); + var change = ts.first(codeFix.changes); + ts.Debug.assert(change.fileName === fileName); + this.applyEdits(change.fileName, change.textChanges, /*isFormattingEdit*/ false); + var text = range ? this.rangeText(range) : this.getFileContent(this.activeFile.fileName); + actualTextArray.push(text); + scriptInfo.updateContent(originalContent); + } + if (expectedTextArray.length !== actualTextArray.length) { + this.raiseError("Expected " + expectedTextArray.length + " import fixes, got " + actualTextArray.length); + } + ts.zipWith(expectedTextArray, actualTextArray, function (expected, actual, index) { + if (expected !== actual) { + _this.raiseError("Import fix at index " + index + " doesn't match.\n" + showTextDiff(expected, actual)); + } + }); + }; + TestState.prototype.verifyDocCommentTemplate = function (expected) { + var name = "verifyDocCommentTemplate"; + var actual = this.languageService.getDocCommentTemplateAtPosition(this.activeFile.fileName, this.currentCaretPosition); + if (expected === undefined) { + if (actual) { + this.raiseError(name + " failed - expected no template but got {newText: \"" + actual.newText + "\", caretOffset: " + actual.caretOffset + "}"); + } + return; + } + else { + if (actual === undefined) { + this.raiseError(name + " failed - expected the template {newText: \"" + expected.newText + "\", caretOffset: \"" + expected.caretOffset + "\"} but got nothing instead"); + } + if (actual.newText !== expected.newText) { + this.raiseError(name + " failed for expected insertion.\n" + showTextDiff(expected.newText, actual.newText)); + } + if (actual.caretOffset !== expected.caretOffset) { + this.raiseError(name + " failed - expected caretOffset: " + expected.caretOffset + "\nactual caretOffset:" + actual.caretOffset); + } + } + }; + TestState.prototype.verifyBraceCompletionAtPosition = function (negative, openingBrace) { + var openBraceMap = ts.createMapFromTemplate({ + "(": 40 /* openParen */, + "{": 123 /* openBrace */, + "[": 91 /* openBracket */, + "'": 39 /* singleQuote */, + '"': 34 /* doubleQuote */, + "`": 96 /* backtick */, + "<": 60 /* lessThan */ + }); + var charCode = openBraceMap.get(openingBrace); + if (!charCode) { + throw this.raiseError("Invalid openingBrace '" + openingBrace + "' specified."); + } + var position = this.currentCaretPosition; + var validBraceCompletion = this.languageService.isValidBraceCompletionAtPosition(this.activeFile.fileName, position, charCode); + if (!negative && !validBraceCompletion) { + this.raiseError(position + " is not a valid brace completion position for " + openingBrace); + } + if (negative && validBraceCompletion) { + this.raiseError(position + " is a valid brace completion position for " + openingBrace); + } + }; + TestState.prototype.verifyJsxClosingTag = function (map) { + for (var markerName in map) { + this.goToMarker(markerName); + var actual = this.languageService.getJsxClosingTagAtPosition(this.activeFile.fileName, this.currentCaretPosition); + assert.deepEqual(actual, map[markerName]); + } + }; + TestState.prototype.verifyMatchingBracePosition = function (bracePosition, expectedMatchPosition) { + var actual = this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, bracePosition); + if (actual.length !== 2) { + this.raiseError("verifyMatchingBracePosition failed - expected result to contain 2 spans, but it had " + actual.length); + } + var actualMatchPosition = -1; + if (bracePosition === actual[0].start) { + actualMatchPosition = actual[1].start; + } + else if (bracePosition === actual[1].start) { + actualMatchPosition = actual[0].start; + } + else { + this.raiseError("verifyMatchingBracePosition failed - could not find the brace position: " + bracePosition + " in the returned list: (" + actual[0].start + "," + ts.textSpanEnd(actual[0]) + ") and (" + actual[1].start + "," + ts.textSpanEnd(actual[1]) + ")"); + } + if (actualMatchPosition !== expectedMatchPosition) { + this.raiseError("verifyMatchingBracePosition failed - expected: " + actualMatchPosition + ", actual: " + expectedMatchPosition); + } + }; + TestState.prototype.verifyNoMatchingBracePosition = function (bracePosition) { + var actual = this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, bracePosition); + if (actual.length !== 0) { + this.raiseError("verifyNoMatchingBracePosition failed - expected: 0 spans, actual: " + actual.length); + } + }; + TestState.prototype.verifySpanOfEnclosingComment = function (negative, onlyMultiLineDiverges) { + var expected = !negative; + var position = this.currentCaretPosition; + var fileName = this.activeFile.fileName; + var actual = !!this.languageService.getSpanOfEnclosingComment(fileName, position, /*onlyMultiLine*/ false); + var actualOnlyMultiLine = !!this.languageService.getSpanOfEnclosingComment(fileName, position, /*onlyMultiLine*/ true); + if (expected !== actual || onlyMultiLineDiverges === (actual === actualOnlyMultiLine)) { + this.raiseError("verifySpanOfEnclosingComment failed:\n position: '" + position + "'\n fileName: '" + fileName + "'\n onlyMultiLineDiverges: '" + onlyMultiLineDiverges + "'\n actual: '" + actual + "'\n actualOnlyMultiLine: '" + actualOnlyMultiLine + "'\n expected: '" + expected + "'."); + } + }; + /* + Check number of navigationItems which match both searchValue and matchKind, + if a filename is passed in, limit the results to that file. + Report an error if expected value and actual value do not match. + */ + TestState.prototype.verifyNavigationItemsCount = function (expected, searchValue, matchKind, fileName) { + var items = this.languageService.getNavigateToItems(searchValue, /*maxResultCount*/ undefined, fileName); + var actual = 0; + // Count only the match that match the same MatchKind + for (var _i = 0, items_1 = items; _i < items_1.length; _i++) { + var item = items_1[_i]; + if (!matchKind || item.matchKind === matchKind) { + actual++; + } + } + if (expected !== actual) { + this.raiseError("verifyNavigationItemsCount failed - found: " + actual + " navigation items, expected: " + expected + "."); + } + }; + /* + Verify that returned navigationItems from getNavigateToItems have matched searchValue, matchKind, and kind. + Report an error if getNavigateToItems does not find any matched searchValue. + */ + TestState.prototype.verifyNavigationItemsListContains = function (name, kind, searchValue, matchKind, fileName, parentName) { + var items = this.languageService.getNavigateToItems(searchValue); + if (!items || items.length === 0) { + this.raiseError("verifyNavigationItemsListContains failed - found 0 navigation items, expected at least one."); + } + for (var _i = 0, items_2 = items; _i < items_2.length; _i++) { + var item = items_2[_i]; + if (item && item.name === name && item.kind === kind && + (matchKind === undefined || item.matchKind === matchKind) && + (fileName === undefined || item.fileName === fileName) && + (parentName === undefined || item.containerName === parentName)) { + return; + } + } + // if there was an explicit match kind specified, then it should be validated. + if (matchKind !== undefined) { + var missingItem = { name: name, kind: kind, searchValue: searchValue, matchKind: matchKind, fileName: fileName, parentName: parentName }; + this.raiseError("verifyNavigationItemsListContains failed - could not find the item: " + stringify(missingItem) + " in the returned list: (" + stringify(items) + ")"); + } + }; + TestState.prototype.verifyNavigationBar = function (json, options) { + this.verifyNavigationTreeOrBar(json, this.languageService.getNavigationBarItems(this.activeFile.fileName), "Bar", options); + }; + TestState.prototype.verifyNavigationTree = function (json, options) { + this.verifyNavigationTreeOrBar(json, this.languageService.getNavigationTree(this.activeFile.fileName), "Tree", options); + }; + TestState.prototype.verifyNavigationTreeOrBar = function (json, tree, name, options) { + if (JSON.stringify(tree, replacer) !== JSON.stringify(json)) { + this.raiseError("verifyNavigation" + name + " failed - expected: " + stringify(json) + ", got: " + stringify(tree, replacer)); + } + function replacer(key, value) { + switch (key) { + case "spans": + case "nameSpan": + return options && options.checkSpans ? value : undefined; + case "start": + case "length": + // Never omit the values in a span, even if they are 0. + return value; + case "childItems": + return !value || value.length === 0 ? undefined : value; + default: + // Omit falsy values, those are presumed to be the default. + return value || undefined; + } + } + }; + TestState.prototype.printNavigationItems = function (searchValue) { + var items = this.languageService.getNavigateToItems(searchValue); + Harness.IO.log("NavigationItems list (" + items.length + " items)"); + for (var _i = 0, items_3 = items; _i < items_3.length; _i++) { + var item = items_3[_i]; + Harness.IO.log("name: " + item.name + ", kind: " + item.kind + ", parentName: " + item.containerName + ", fileName: " + item.fileName); + } + }; + TestState.prototype.printNavigationBar = function () { + var items = this.languageService.getNavigationBarItems(this.activeFile.fileName); + Harness.IO.log("Navigation bar (" + items.length + " items)"); + for (var _i = 0, items_4 = items; _i < items_4.length; _i++) { + var item = items_4[_i]; + Harness.IO.log(ts.repeatString(" ", item.indent) + "name: " + item.text + ", kind: " + item.kind + ", childItems: " + item.childItems.map(function (child) { return child.text; })); + } + }; + TestState.prototype.getOccurrencesAtCurrentPosition = function () { + return this.languageService.getOccurrencesAtPosition(this.activeFile.fileName, this.currentCaretPosition); + }; + TestState.prototype.verifyOccurrencesAtPositionListContains = function (fileName, start, end, isWriteAccess) { + var occurrences = this.getOccurrencesAtCurrentPosition(); + if (!occurrences || occurrences.length === 0) { + return this.raiseError("verifyOccurrencesAtPositionListContains failed - found 0 references, expected at least one."); + } + for (var _i = 0, occurrences_1 = occurrences; _i < occurrences_1.length; _i++) { + var occurrence = occurrences_1[_i]; + if (occurrence && occurrence.fileName === fileName && occurrence.textSpan.start === start && ts.textSpanEnd(occurrence.textSpan) === end) { + if (typeof isWriteAccess !== "undefined" && occurrence.isWriteAccess !== isWriteAccess) { + this.raiseError("verifyOccurrencesAtPositionListContains failed - item isWriteAccess value does not match, actual: " + occurrence.isWriteAccess + ", expected: " + isWriteAccess + "."); + } + return; + } + } + var missingItem = { fileName: fileName, start: start, end: end, isWriteAccess: isWriteAccess }; + this.raiseError("verifyOccurrencesAtPositionListContains failed - could not find the item: " + stringify(missingItem) + " in the returned list: (" + stringify(occurrences) + ")"); + }; + TestState.prototype.verifyOccurrencesAtPositionListCount = function (expectedCount) { + var occurrences = this.getOccurrencesAtCurrentPosition(); + var actualCount = occurrences ? occurrences.length : 0; + if (expectedCount !== actualCount) { + this.raiseError("verifyOccurrencesAtPositionListCount failed - actual: " + actualCount + ", expected:" + expectedCount); + } + }; + TestState.prototype.getDocumentHighlightsAtCurrentPosition = function (fileNamesToSearch) { + var _this = this; + var filesToSearch = fileNamesToSearch.map(function (name) { return ts.combinePaths(_this.basePath, name); }); + return this.languageService.getDocumentHighlights(this.activeFile.fileName, this.currentCaretPosition, filesToSearch); + }; + TestState.prototype.verifyRangesAreOccurrences = function (isWriteAccess) { + var ranges = this.getRanges(); + for (var _i = 0, ranges_3 = ranges; _i < ranges_3.length; _i++) { + var r = ranges_3[_i]; + this.goToRangeStart(r); + this.verifyOccurrencesAtPositionListCount(ranges.length); + for (var _a = 0, ranges_4 = ranges; _a < ranges_4.length; _a++) { + var range = ranges_4[_a]; + this.verifyOccurrencesAtPositionListContains(range.fileName, range.pos, range.end, isWriteAccess); + } + } + }; + TestState.prototype.verifyRangesWithSameTextAreRenameLocations = function () { + var _this = this; + this.rangesByText().forEach(function (ranges) { return _this.verifyRangesAreRenameLocations(ranges); }); + }; + TestState.prototype.verifyRangesWithSameTextAreDocumentHighlights = function () { + var _this = this; + this.rangesByText().forEach(function (ranges) { return _this.verifyRangesAreDocumentHighlights(ranges, /*options*/ undefined); }); + }; + TestState.prototype.verifyDocumentHighlightsOf = function (startRange, ranges, options) { + var fileNames = options && options.filesToSearch || unique(ranges, function (range) { return range.fileName; }); + this.goToRangeStart(startRange); + this.verifyDocumentHighlights(ranges, fileNames); + }; + TestState.prototype.verifyRangesAreDocumentHighlights = function (ranges, options) { + ranges = ranges || this.getRanges(); + var fileNames = options && options.filesToSearch || unique(ranges, function (range) { return range.fileName; }); + for (var _i = 0, ranges_5 = ranges; _i < ranges_5.length; _i++) { + var range = ranges_5[_i]; + this.goToRangeStart(range); + this.verifyDocumentHighlights(ranges, fileNames); + } + }; + TestState.prototype.verifyNoDocumentHighlights = function (startRange) { + this.goToRangeStart(startRange); + var documentHighlights = this.getDocumentHighlightsAtCurrentPosition([this.activeFile.fileName]); + var numHighlights = ts.length(documentHighlights); + if (numHighlights > 0) { + this.raiseError("verifyNoDocumentHighlights failed - unexpectedly got " + numHighlights + " highlights"); + } + }; + TestState.prototype.verifyDocumentHighlights = function (expectedRanges, fileNames) { + var _this = this; + if (fileNames === void 0) { fileNames = [this.activeFile.fileName]; } + fileNames = ts.map(fileNames, ts.normalizePath); + var documentHighlights = this.getDocumentHighlightsAtCurrentPosition(fileNames) || []; + for (var _i = 0, documentHighlights_1 = documentHighlights; _i < documentHighlights_1.length; _i++) { + var dh = documentHighlights_1[_i]; + if (fileNames.indexOf(dh.fileName) === -1) { + this.raiseError("verifyDocumentHighlights failed - got highlights in unexpected file name " + dh.fileName); + } + } + var _loop_9 = function (fileName) { + var expectedRangesInFile = expectedRanges.filter(function (r) { return ts.normalizePath(r.fileName) === fileName; }); + var highlights = ts.find(documentHighlights, function (dh) { return dh.fileName === fileName; }); + var spansInFile = highlights ? highlights.highlightSpans.sort(function (s1, s2) { return s1.textSpan.start - s2.textSpan.start; }) : []; + if (expectedRangesInFile.length !== spansInFile.length) { + this_4.raiseError("verifyDocumentHighlights failed - In " + fileName + ", expected " + expectedRangesInFile.length + " highlights, got " + spansInFile.length); + } + ts.zipWith(expectedRangesInFile, spansInFile, function (expectedRange, span) { + if (span.textSpan.start !== expectedRange.pos || ts.textSpanEnd(span.textSpan) !== expectedRange.end) { + _this.raiseError("verifyDocumentHighlights failed - span does not match, actual: " + stringify(span.textSpan) + ", expected: " + expectedRange.pos + "--" + expectedRange.end); + } + }); + }; + var this_4 = this; + for (var _a = 0, fileNames_1 = fileNames; _a < fileNames_1.length; _a++) { + var fileName = fileNames_1[_a]; + _loop_9(fileName); + } + }; + TestState.prototype.verifyCodeFixAvailable = function (negative, expected) { + assert(!negative || !expected); + var codeFixes = this.getCodeFixes(this.activeFile.fileName); + var actuals = codeFixes.map(function (fix) { return ({ description: fix.description, commands: fix.commands }); }); + this.assertObjectsEqual(actuals, negative ? ts.emptyArray : expected); + }; + TestState.prototype.verifyApplicableRefactorAvailableAtMarker = function (negative, markerName) { + var isAvailable = this.getApplicableRefactors(this.getMarkerByName(markerName).position).length > 0; + if (negative && isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableAtMarker failed - expected no refactor at marker " + markerName + " but found some."); + } + if (!negative && !isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableAtMarker failed - expected a refactor at marker " + markerName + " but found none."); + } + }; + TestState.prototype.getSelection = function () { + return { + pos: this.currentCaretPosition, + end: this.selectionEnd === -1 ? this.currentCaretPosition : this.selectionEnd + }; + }; + TestState.prototype.verifyRefactorAvailable = function (negative, name, actionName) { + var refactors = this.getApplicableRefactors(this.getSelection()); + refactors = refactors.filter(function (r) { return r.name === name && (actionName === undefined || r.actions.some(function (a) { return a.name === actionName; })); }); + var isAvailable = refactors.length > 0; + if (negative) { + if (isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableForRange failed - expected no refactor but found: " + refactors.map(function (r) { return r.name; }).join(", ")); + } + } + else { + if (!isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableForRange failed - expected a refactor but found none."); + } + if (refactors.length > 1) { + this.raiseError(refactors.length + " available refactors both have name " + name + " and action " + actionName); + } + } + }; + TestState.prototype.verifyRefactor = function (_a) { + var name = _a.name, actionName = _a.actionName, refactors = _a.refactors; + var actualRefactors = this.getApplicableRefactors(this.getSelection()).filter(function (r) { return r.name === name && r.actions.some(function (a) { return a.name === actionName; }); }); + this.assertObjectsEqual(actualRefactors, refactors); + }; + TestState.prototype.verifyApplicableRefactorAvailableForRange = function (negative) { + var ranges = this.getRanges(); + if (!(ranges && ranges.length === 1)) { + throw new Error("Exactly one refactor range is allowed per test."); + } + var isAvailable = this.getApplicableRefactors(ts.first(ranges)).length > 0; + if (negative && isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableForRange failed - expected no refactor but found some."); + } + if (!negative && !isAvailable) { + this.raiseError("verifyApplicableRefactorAvailableForRange failed - expected a refactor but found none."); + } + }; + TestState.prototype.applyRefactor = function (_a) { + var refactorName = _a.refactorName, actionName = _a.actionName, actionDescription = _a.actionDescription, newContentWithRenameMarker = _a.newContent; + var range = this.getSelection(); + var refactors = this.getApplicableRefactors(range); + var refactorsWithName = refactors.filter(function (r) { return r.name === refactorName; }); + if (refactorsWithName.length === 0) { + this.raiseError("The expected refactor: " + refactorName + " is not available at the marker location.\nAvailable refactors: " + refactors.map(function (r) { return r.name; })); + } + var action = ts.firstDefined(refactorsWithName, function (refactor) { return refactor.actions.find(function (a) { return a.name === actionName; }); }); + if (!action) { + throw this.raiseError("The expected action: " + actionName + " is not included in: " + ts.flatMap(refactorsWithName, function (r) { return r.actions.map(function (a) { return a.name; }); })); + } + if (action.description !== actionDescription) { + this.raiseError("Expected action description to be " + JSON.stringify(actionDescription) + ", got: " + JSON.stringify(action.description)); + } + var editInfo = this.languageService.getEditsForRefactor(this.activeFile.fileName, this.formatCodeSettings, range, refactorName, actionName, ts.defaultPreferences); + for (var _i = 0, _b = editInfo.edits; _i < _b.length; _i++) { + var edit = _b[_i]; + this.applyEdits(edit.fileName, edit.textChanges, /*isFormattingEdit*/ false); + } + var _c = parseNewContent(), renamePosition = _c.renamePosition, newContent = _c.newContent; + this.verifyCurrentFileContent(newContent); + if (renamePosition === undefined) { + if (editInfo.renameLocation !== undefined) { + this.raiseError("Did not expect a rename location, got " + editInfo.renameLocation); + } + } + else { + // TODO: test editInfo.renameFilename value + assert.isDefined(editInfo.renameFilename); + if (renamePosition !== editInfo.renameLocation) { + this.raiseError("Expected rename position of " + renamePosition + ", but got " + editInfo.renameLocation); + } + } + function parseNewContent() { + var renamePosition = newContentWithRenameMarker.indexOf("/*RENAME*/"); + if (renamePosition === -1) { + return { renamePosition: undefined, newContent: newContentWithRenameMarker }; + } + else { + var newContent_1 = newContentWithRenameMarker.slice(0, renamePosition) + newContentWithRenameMarker.slice(renamePosition + "/*RENAME*/".length); + return { renamePosition: renamePosition, newContent: newContent_1 }; + } + } + }; + TestState.prototype.noMoveToNewFile = function () { + for (var _i = 0, _a = this.getRanges(); _i < _a.length; _i++) { + var range = _a[_i]; + for (var _b = 0, _c = this.getApplicableRefactors(range, { allowTextChangesInNewFiles: true }); _b < _c.length; _b++) { + var refactor = _c[_b]; + if (refactor.name === "Move to a new file") { + ts.Debug.fail("Did not expect to get 'move to a new file' refactor"); + } + } + } + }; + TestState.prototype.moveToNewFile = function (options) { + assert(this.getRanges().length === 1); + var range = this.getRanges()[0]; + var refactor = ts.find(this.getApplicableRefactors(range, { allowTextChangesInNewFiles: true }), function (r) { return r.name === "Move to a new file"; }); + assert(refactor.actions.length === 1); + var action = ts.first(refactor.actions); + assert(action.name === "Move to a new file" && action.description === "Move to a new file"); + var editInfo = this.languageService.getEditsForRefactor(this.activeFile.fileName, this.formatCodeSettings, range, refactor.name, action.name, options.preferences || ts.defaultPreferences); + this.testNewFileContents(editInfo.edits, options.newFileContents); + }; + TestState.prototype.testNewFileContents = function (edits, newFileContents) { + var _loop_10 = function (edit) { + var newContent = newFileContents[edit.fileName]; + if (newContent === undefined) { + this_5.raiseError("There was an edit in " + edit.fileName + " but new content was not specified."); + } + if (this_5.testData.files.some(function (f) { return f.fileName === edit.fileName; })) { + this_5.applyEdits(edit.fileName, edit.textChanges, /*isFormattingEdit*/ false); + this_5.openFile(edit.fileName); + this_5.verifyCurrentFileContent(newContent); + } + else { + assert(edit.textChanges.length === 1); + var change = ts.first(edit.textChanges); + assert.deepEqual(change.span, ts.createTextSpan(0, 0)); + assert.equal(change.newText, newContent, "Content for " + edit.fileName); + } + }; + var this_5 = this; + for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) { + var edit = edits_1[_i]; + _loop_10(edit); + } + var _loop_11 = function (fileName) { + assert(edits.some(function (e) { return e.fileName === fileName; })); + }; + for (var fileName in newFileContents) { + _loop_11(fileName); + } + }; + TestState.prototype.verifyFileAfterApplyingRefactorAtMarker = function (markerName, expectedContent, refactorNameToApply, actionName, formattingOptions) { + formattingOptions = formattingOptions || this.formatCodeSettings; + var markerPos = this.getMarkerByName(markerName).position; + var applicableRefactors = this.languageService.getApplicableRefactors(this.activeFile.fileName, markerPos, ts.defaultPreferences); + var applicableRefactorToApply = ts.find(applicableRefactors, function (refactor) { return refactor.name === refactorNameToApply; }); + if (!applicableRefactorToApply) { + this.raiseError("The expected refactor: " + refactorNameToApply + " is not available at the marker location."); + } + var editInfo = this.languageService.getEditsForRefactor(this.activeFile.fileName, formattingOptions, markerPos, refactorNameToApply, actionName, ts.defaultPreferences); + for (var _i = 0, _a = editInfo.edits; _i < _a.length; _i++) { + var edit = _a[_i]; + this.applyEdits(edit.fileName, edit.textChanges, /*isFormattingEdit*/ false); + } + var actualContent = this.getFileContent(this.activeFile.fileName); + if (actualContent !== expectedContent) { + this.raiseError("verifyFileAfterApplyingRefactors failed:\n" + showTextDiff(expectedContent, actualContent)); + } + }; + TestState.prototype.printAvailableCodeFixes = function () { + var codeFixes = this.getCodeFixes(this.activeFile.fileName); + Harness.IO.log(stringify(codeFixes)); + }; + // Get the text of the entire line the caret is currently at + TestState.prototype.getCurrentLineContent = function () { + var text = this.getFileContent(this.activeFile.fileName); + var pos = this.currentCaretPosition; + var startPos = pos, endPos = pos; + while (startPos > 0) { + var ch = text.charCodeAt(startPos - 1); + if (ch === 13 /* carriageReturn */ || ch === 10 /* lineFeed */) { + break; + } + startPos--; + } + while (endPos < text.length) { + var ch = text.charCodeAt(endPos); + if (ch === 13 /* carriageReturn */ || ch === 10 /* lineFeed */) { + break; + } + endPos++; + } + return text.substring(startPos, endPos); + }; + TestState.prototype.assertItemInCompletionList = function (items, entryId, text, documentation, kind, spanIndex, hasAction, options) { + var _this = this; + var eq = function (a, b, msg) { + assert.deepEqual(a, b, _this.assertionMessageAtLastKnownMarker(msg + " for " + stringify(entryId))); + }; + var matchingItems = items.filter(function (item) { return item.name === entryId.name && item.source === entryId.source; }); + if (matchingItems.length === 0) { + var itemsString = items.map(function (item) { return stringify({ name: item.name, source: item.source, kind: item.kind }); }).join(",\n"); + this.raiseError("Expected \"" + stringify({ entryId: entryId, text: text, documentation: documentation, kind: kind }) + "\" to be in list [" + itemsString + "]"); + } + else if (matchingItems.length > 1) { + this.raiseError("Found duplicate completion items for " + stringify(entryId)); + } + var item = matchingItems[0]; + if (documentation !== undefined || text !== undefined || entryId.source !== undefined) { + var details = this.getCompletionEntryDetails(item.name, item.source); + if (documentation !== undefined) { + eq(ts.displayPartsToString(details.documentation), documentation, "completion item documentation"); + } + if (text !== undefined) { + eq(ts.displayPartsToString(details.displayParts), text, "completion item detail text"); + } + if (entryId.source === undefined) { + eq(options && options.sourceDisplay, /*b*/ undefined, "source display"); + } + else { + eq(details.source, [ts.textPart(options.sourceDisplay)], "source display"); + } + } + if (kind !== undefined) { + if (typeof kind === "string") { + eq(item.kind, kind, "completion item kind"); + } + else { + if (kind.kind) { + eq(item.kind, kind.kind, "completion item kind"); + } + if (kind.kindModifiers !== undefined) { + eq(item.kindModifiers, kind.kindModifiers, "completion item kindModifiers"); + } + } + } + if (spanIndex !== undefined) { + var span = this.getTextSpanForRangeAtIndex(spanIndex); + assert.isTrue(TestState.textSpansEqual(span, item.replacementSpan), this.assertionMessageAtLastKnownMarker(stringify(span) + " does not equal " + stringify(item.replacementSpan) + " replacement span for " + stringify(entryId))); + } + eq(item.hasAction, hasAction, "hasAction"); + eq(item.isRecommended, options && options.isRecommended, "isRecommended"); + eq(item.insertText, options && options.insertText, "insertText"); + eq(item.replacementSpan, options && options.replacementSpan && ts.createTextSpanFromRange(options.replacementSpan), "replacementSpan"); + }; + TestState.prototype.findFile = function (indexOrName) { + if (typeof indexOrName === "number") { + var index = indexOrName; + if (index >= this.testData.files.length) { + throw new Error("File index (" + index + ") in openFile was out of range. There are only " + this.testData.files.length + " files in this test."); + } + else { + return this.testData.files[index]; + } + } + else if (ts.isString(indexOrName)) { + var name_1 = ts.normalizePath(indexOrName); + // names are stored in the compiler with this relative path, this allows people to use goTo.file on just the fileName + name_1 = name_1.indexOf("/") === -1 ? (this.basePath + "/" + name_1) : name_1; + var availableNames_1 = []; + var result = ts.forEach(this.testData.files, function (file) { + var fn = ts.normalizePath(file.fileName); + if (fn) { + if (fn === name_1) { + return file; + } + availableNames_1.push(fn); + } + }); + if (!result) { + throw new Error("No test file named \"" + name_1 + "\" exists. Available file names are: " + availableNames_1.join(", ")); + } + return result; + } + else { + return ts.Debug.assertNever(indexOrName); + } + }; + TestState.prototype.getLineColStringAtPosition = function (position) { + var pos = this.languageServiceAdapterHost.positionToLineAndCharacter(this.activeFile.fileName, position); + return "line " + (pos.line + 1) + ", col " + pos.character; + }; + TestState.prototype.getTextSpanForRangeAtIndex = function (index) { + var ranges = this.getRanges(); + if (ranges.length > index) { + return ts.createTextSpanFromRange(ranges[index]); + } + else { + throw this.raiseError("Supplied span index: " + index + " does not exist in range list of size: " + ranges.length); + } + }; + TestState.prototype.getMarkerByName = function (markerName) { + var markerPos = this.testData.markerPositions.get(markerName); + if (markerPos === undefined) { + throw new Error("Unknown marker \"" + markerName + "\" Available markers: " + this.getMarkerNames().map(function (m) { return "\"" + m + "\""; }).join(", ")); + } + else { + return markerPos; + } + }; + TestState.prototype.setCancelled = function (numberOfCalls) { + this.cancellationToken.setCancelled(numberOfCalls); + }; + TestState.prototype.resetCancelled = function () { + this.cancellationToken.resetCancelled(); + }; + TestState.textSpansEqual = function (a, b) { + return !!a && !!b && a.start === b.start && a.length === b.length; + }; + TestState.prototype.getEditsForFileRename = function (options) { + var changes = this.languageService.getEditsForFileRename(options.oldPath, options.newPath, this.formatCodeSettings, ts.defaultPreferences); + this.testNewFileContents(changes, options.newFileContents); + }; + TestState.prototype.getApplicableRefactors = function (positionOrRange, preferences) { + if (preferences === void 0) { preferences = ts.defaultPreferences; } + return this.languageService.getApplicableRefactors(this.activeFile.fileName, positionOrRange, preferences) || ts.emptyArray; + }; + return TestState; + }()); + FourSlash.TestState = TestState; + function runFourSlashTest(basePath, testType, fileName) { + var content = Harness.IO.readFile(fileName); + runFourSlashTestContent(basePath, testType, content, fileName); + } + FourSlash.runFourSlashTest = runFourSlashTest; + function runFourSlashTestContent(basePath, testType, content, fileName) { + // Give file paths an absolute path for the virtual file system + var absoluteBasePath = ts.combinePaths(Harness.virtualFileSystemRoot, basePath); + var absoluteFileName = ts.combinePaths(Harness.virtualFileSystemRoot, fileName); + // Parse out the files and their metadata + var testData = parseTestData(absoluteBasePath, content, absoluteFileName); + var state = new TestState(absoluteBasePath, testType, testData); + var output = ts.transpileModule(content, { reportDiagnostics: true }); + if (output.diagnostics.length > 0) { + throw new Error("Syntax error in " + absoluteBasePath + ": " + output.diagnostics[0].messageText); + } + runCode(output.outputText, state); + } + FourSlash.runFourSlashTestContent = runFourSlashTestContent; + function runCode(code, state) { + // Compile and execute the test + var wrappedCode = "(function(test, goTo, verify, edit, debug, format, cancellation, classification, verifyOperationIsCancelled) {\n" + code + "\n})"; + try { + var test_1 = new FourSlashInterface.Test(state); + var goTo = new FourSlashInterface.GoTo(state); + var verify = new FourSlashInterface.Verify(state); + var edit = new FourSlashInterface.Edit(state); + var debug = new FourSlashInterface.Debug(state); + var format = new FourSlashInterface.Format(state); + var cancellation = new FourSlashInterface.Cancellation(state); + var f = eval(wrappedCode); + f(test_1, goTo, verify, edit, debug, format, cancellation, FourSlashInterface.Classification, verifyOperationIsCancelled); + } + catch (err) { + throw err; + } + } + function chompLeadingSpace(content) { + var lines = content.split("\n"); + for (var _i = 0, lines_4 = lines; _i < lines_4.length; _i++) { + var line = lines_4[_i]; + if ((line.length !== 0) && (line.charAt(0) !== " ")) { + return content; + } + } + return lines.map(function (s) { return s.substr(1); }).join("\n"); + } + function parseTestData(basePath, contents, fileName) { + // Regex for parsing options in the format "@Alpha: Value of any sort" + var optionRegex = /^\s*@(\w+): (.*)\s*/; + // List of all the subfiles we've parsed out + var files = []; + // Global options + var globalOptions = {}; + // Marker positions + // Split up the input file by line + // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so + // we have to string-based splitting instead and try to figure out the delimiting chars + var lines = contents.split("\n"); + var markerPositions = ts.createMap(); + var markers = []; + var ranges = []; + // Stuff related to the subfile we're parsing + var currentFileContent; + var currentFileName = fileName; + var currentFileSymlinks; + var currentFileOptions = {}; + function nextFile() { + if (currentFileContent === undefined) + return; + var file = parseFileContent(currentFileContent, currentFileName, markerPositions, markers, ranges); + file.fileOptions = currentFileOptions; + file.symlinks = currentFileSymlinks; + // Store result file + files.push(file); + currentFileContent = undefined; + currentFileOptions = {}; + currentFileName = fileName; + currentFileSymlinks = undefined; + } + for (var _i = 0, lines_5 = lines; _i < lines_5.length; _i++) { + var line = lines_5[_i]; + if (line.length > 0 && line.charAt(line.length - 1) === "\r") { + line = line.substr(0, line.length - 1); + } + if (line.substr(0, 4) === "////") { + var text = line.substr(4); + currentFileContent = currentFileContent === undefined ? text : currentFileContent + "\n" + text; + } + else if (line.substr(0, 2) === "//") { + // Comment line, check for global/file @options and record them + var match = optionRegex.exec(line.substr(2)); + if (match) { + var _a = match.slice(1), key = _a[0], value = _a[1]; + if (!ts.contains(fileMetadataNames, key)) { + // Check if the match is already existed in the global options + if (globalOptions[key] !== undefined) { + throw new Error("Global option '" + key + "' already exists"); + } + globalOptions[key] = value; + } + else { + switch (key) { + case "Filename" /* fileName */: + // Found an @FileName directive, if this is not the first then create a new subfile + nextFile(); + currentFileName = ts.isRootedDiskPath(value) ? value : basePath + "/" + value; + currentFileOptions[key] = value; + break; + case "Symlink" /* symlink */: + currentFileSymlinks = ts.append(currentFileSymlinks, value); + break; + default: + // Add other fileMetadata flag + currentFileOptions[key] = value; + } + } + } + } + // Previously blank lines between fourslash content caused it to be considered as 2 files, + // Remove this behavior since it just causes errors now + else if (line !== "") { + // Code line, terminate current subfile if there is one + nextFile(); + } + } + // @Filename is the only directive that can be used in a test that contains tsconfig.json file. + var config = ts.find(files, isConfig); + if (config) { + var directive = getNonFileNameOptionInFileList(files); + if (!directive) { + directive = getNonFileNameOptionInObject(globalOptions); + } + if (directive) { + throw Error("It is not allowed to use " + config.fileName + " along with directive '" + directive + "'"); + } + } + return { + markerPositions: markerPositions, + markers: markers, + globalOptions: globalOptions, + files: files, + ranges: ranges + }; + } + function isConfig(file) { + return Harness.getConfigNameFromFileName(file.fileName) !== undefined; + } + function getNonFileNameOptionInFileList(files) { + return ts.forEach(files, function (f) { return getNonFileNameOptionInObject(f.fileOptions); }); + } + function getNonFileNameOptionInObject(optionObject) { + for (var option in optionObject) { + if (option !== "Filename" /* fileName */) { + return option; + } + } + return undefined; + } + var State; + (function (State) { + State[State["none"] = 0] = "none"; + State[State["inSlashStarMarker"] = 1] = "inSlashStarMarker"; + State[State["inObjectMarker"] = 2] = "inObjectMarker"; + })(State || (State = {})); + function reportError(fileName, line, col, message) { + var errorMessage = fileName + "(" + line + "," + col + "): " + message; + throw new Error(errorMessage); + } + function recordObjectMarker(fileName, location, text, markerMap, markers) { + var markerValue; + try { + // Attempt to parse the marker value as JSON + markerValue = JSON.parse("{ " + text + " }"); + } + catch (e) { + reportError(fileName, location.sourceLine, location.sourceColumn, "Unable to parse marker text " + e.message); + } + if (markerValue === undefined) { + reportError(fileName, location.sourceLine, location.sourceColumn, "Object markers can not be empty"); + return undefined; + } + var marker = { + fileName: fileName, + position: location.position, + data: markerValue + }; + // Object markers can be anonymous + if (markerValue.name) { + markerMap.set(markerValue.name, marker); + } + markers.push(marker); + return marker; + } + function recordMarker(fileName, location, name, markerMap, markers) { + var marker = { + fileName: fileName, + position: location.position + }; + // Verify markers for uniqueness + if (markerMap.has(name)) { + var message = "Marker '" + name + "' is duplicated in the source file contents."; + reportError(marker.fileName, location.sourceLine, location.sourceColumn, message); + return undefined; + } + else { + markerMap.set(name, marker); + markers.push(marker); + return marker; + } + } + function parseFileContent(content, fileName, markerMap, markers, ranges) { + content = chompLeadingSpace(content); + // Any slash-star comment with a character not in this string is not a marker. + var validMarkerChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$1234567890_"; + /// The file content (minus metacharacters) so far + var output = ""; + /// The current marker (or maybe multi-line comment?) we're parsing, possibly + var openMarker; + /// A stack of the open range markers that are still unclosed + var openRanges = []; + /// A list of ranges we've collected so far */ + var localRanges = []; + /// The latest position of the start of an unflushed plain text area + var lastNormalCharPosition = 0; + /// The total number of metacharacters removed from the file (so far) + var difference = 0; + /// The fourslash file state object we are generating + var state = 0 /* none */; + /// Current position data + var line = 1; + var column = 1; + var flush = function (lastSafeCharIndex) { + output = output + content.substr(lastNormalCharPosition, lastSafeCharIndex === undefined ? undefined : lastSafeCharIndex - lastNormalCharPosition); + }; + if (content.length > 0) { + var previousChar = content.charAt(0); + for (var i = 1; i < content.length; i++) { + var currentChar = content.charAt(i); + switch (state) { + case 0 /* none */: + if (previousChar === "[" && currentChar === "|") { + // found a range start + openRanges.push({ + position: (i - 1) - difference, + sourcePosition: i - 1, + sourceLine: line, + sourceColumn: column, + }); + // copy all text up to marker position + flush(i - 1); + lastNormalCharPosition = i + 1; + difference += 2; + } + else if (previousChar === "|" && currentChar === "]") { + // found a range end + var rangeStart = openRanges.pop(); + if (!rangeStart) { + throw reportError(fileName, line, column, "Found range end with no matching start."); + } + var range = { + fileName: fileName, + pos: rangeStart.position, + end: (i - 1) - difference, + marker: rangeStart.marker + }; + localRanges.push(range); + // copy all text up to range marker position + flush(i - 1); + lastNormalCharPosition = i + 1; + difference += 2; + } + else if (previousChar === "/" && currentChar === "*") { + // found a possible marker start + state = 1 /* inSlashStarMarker */; + openMarker = { + position: (i - 1) - difference, + sourcePosition: i - 1, + sourceLine: line, + sourceColumn: column, + }; + } + else if (previousChar === "{" && currentChar === "|") { + // found an object marker start + state = 2 /* inObjectMarker */; + openMarker = { + position: (i - 1) - difference, + sourcePosition: i - 1, + sourceLine: line, + sourceColumn: column, + }; + flush(i - 1); + } + break; + case 2 /* inObjectMarker */: + // Object markers are only ever terminated by |} and have no content restrictions + if (previousChar === "|" && currentChar === "}") { + // Record the marker + var objectMarkerNameText = content.substring(openMarker.sourcePosition + 2, i - 1).trim(); + var marker = recordObjectMarker(fileName, openMarker, objectMarkerNameText, markerMap, markers); + if (openRanges.length > 0) { + openRanges[openRanges.length - 1].marker = marker; + } + // Set the current start to point to the end of the current marker to ignore its text + lastNormalCharPosition = i + 1; + difference += i + 1 - openMarker.sourcePosition; + // Reset the state + openMarker = undefined; + state = 0 /* none */; + } + break; + case 1 /* inSlashStarMarker */: + if (previousChar === "*" && currentChar === "/") { + // Record the marker + // start + 2 to ignore the */, -1 on the end to ignore the * (/ is next) + var markerNameText = content.substring(openMarker.sourcePosition + 2, i - 1).trim(); + var marker = recordMarker(fileName, openMarker, markerNameText, markerMap, markers); + if (openRanges.length > 0) { + openRanges[openRanges.length - 1].marker = marker; + } + // Set the current start to point to the end of the current marker to ignore its text + flush(openMarker.sourcePosition); + lastNormalCharPosition = i + 1; + difference += i + 1 - openMarker.sourcePosition; + // Reset the state + openMarker = undefined; + state = 0 /* none */; + } + else if (validMarkerChars.indexOf(currentChar) < 0) { + if (currentChar === "*" && i < content.length - 1 && content.charAt(i + 1) === "/") { + // The marker is about to be closed, ignore the 'invalid' char + } + else { + // We've hit a non-valid marker character, so we were actually in a block comment + // Bail out the text we've gathered so far back into the output + flush(i); + lastNormalCharPosition = i; + openMarker = undefined; + state = 0 /* none */; + } + } + break; + } + if (currentChar === "\n" && previousChar === "\r") { + // Ignore trailing \n after a \r + continue; + } + else if (currentChar === "\n" || currentChar === "\r") { + line++; + column = 1; + continue; + } + column++; + previousChar = currentChar; + } + } + // Add the remaining text + flush(/*lastSafeCharIndex*/ undefined); + if (openRanges.length > 0) { + var openRange = openRanges[0]; + reportError(fileName, openRange.sourceLine, openRange.sourceColumn, "Unterminated range."); + } + if (openMarker) { + reportError(fileName, openMarker.sourceLine, openMarker.sourceColumn, "Unterminated marker."); + } + // put ranges in the correct order + localRanges = localRanges.sort(function (a, b) { return a.pos < b.pos ? -1 : 1; }); + localRanges.forEach(function (r) { ranges.push(r); }); + return { + content: output, + fileOptions: {}, + version: 0, + fileName: fileName, + }; + } + function stringify(data, replacer) { + return JSON.stringify(data, replacer, 2); + } + /** Collects an array of unique outputs. */ + function unique(inputs, getOutput) { + var set = ts.createMap(); + for (var _i = 0, inputs_2 = inputs; _i < inputs_2.length; _i++) { + var input = inputs_2[_i]; + var out = getOutput(input); + set.set(out, true); + } + return ts.arrayFrom(set.keys()); + } + function toArray(x) { + return ts.isArray(x) ? x : [x]; + } + function makeWhitespaceVisible(text) { + return text.replace(/ /g, "\u00B7").replace(/\r/g, "\u00B6").replace(/\n/g, "\u2193\n").replace(/\t/g, "\u2192\ "); + } + function showTextDiff(expected, actual) { + // Only show whitespace if the difference is whitespace-only. + if (differOnlyByWhitespace(expected, actual)) { + expected = makeWhitespaceVisible(expected); + actual = makeWhitespaceVisible(actual); + } + return "Expected:\n" + expected + "\nActual:\n" + actual; + } + function differOnlyByWhitespace(a, b) { + return stripWhitespace(a) === stripWhitespace(b); + } + function stripWhitespace(s) { + return s.replace(/\s/g, ""); + } + function findDuplicatedElement(a, equal) { + for (var i = 0; i < a.length; i++) { + for (var j = i + 1; j < a.length; j++) { + if (equal(a[i], a[j])) { + return a[i]; + } + } + } + } +})(FourSlash || (FourSlash = {})); +var FourSlashInterface; +(function (FourSlashInterface) { + var Test = /** @class */ (function () { + function Test(state) { + this.state = state; + } + Test.prototype.markers = function () { + return this.state.getMarkers(); + }; + Test.prototype.markerNames = function () { + return this.state.getMarkerNames(); + }; + Test.prototype.marker = function (name) { + return this.state.getMarkerByName(name); + }; + Test.prototype.markerName = function (m) { + return this.state.markerName(m); + }; + Test.prototype.ranges = function () { + return this.state.getRanges(); + }; + Test.prototype.spans = function () { + return this.ranges().map(function (r) { return ts.createTextSpan(r.pos, r.end - r.pos); }); + }; + Test.prototype.rangesByText = function () { + return this.state.rangesByText(); + }; + Test.prototype.markerByName = function (s) { + return this.state.getMarkerByName(s); + }; + Test.prototype.symbolsInScope = function (range) { + return this.state.symbolsInScope(range); + }; + Test.prototype.setTypesRegistry = function (map) { + this.state.setTypesRegistry(map); + }; + return Test; + }()); + FourSlashInterface.Test = Test; + var GoTo = /** @class */ (function () { + function GoTo(state) { + this.state = state; + } + // Moves the caret to the specified marker, + // or the anonymous marker ('/**/') if no name + // is given + GoTo.prototype.marker = function (name) { + this.state.goToMarker(name); + }; + GoTo.prototype.eachMarker = function (a, b) { + var _this = this; + var markers = typeof a === "function" ? this.state.getMarkers() : a.map(function (m) { return _this.state.getMarkerByName(m); }); + this.state.goToEachMarker(markers, typeof a === "function" ? a : b); + }; + GoTo.prototype.rangeStart = function (range) { + this.state.goToRangeStart(range); + }; + GoTo.prototype.eachRange = function (action) { + this.state.goToEachRange(action); + }; + GoTo.prototype.bof = function () { + this.state.goToBOF(); + }; + GoTo.prototype.eof = function () { + this.state.goToEOF(); + }; + GoTo.prototype.implementation = function () { + this.state.goToImplementation(); + }; + GoTo.prototype.position = function (position, fileNameOrIndex) { + if (fileNameOrIndex !== undefined) { + this.file(fileNameOrIndex); + } + this.state.goToPosition(position); + }; + // Opens a file, given either its index as it + // appears in the test source, or its filename + // as specified in the test metadata + GoTo.prototype.file = function (indexOrName, content, scriptKindName) { + this.state.openFile(indexOrName, content, scriptKindName); + }; + GoTo.prototype.select = function (startMarker, endMarker) { + this.state.select(startMarker, endMarker); + }; + GoTo.prototype.selectRange = function (range) { + this.state.selectRange(range); + }; + return GoTo; + }()); + FourSlashInterface.GoTo = GoTo; + var VerifyNegatable = /** @class */ (function () { + function VerifyNegatable(state, negative) { + if (negative === void 0) { negative = false; } + this.state = state; + this.negative = negative; + this.allowedClassElementKeywords = [ + "public", + "private", + "protected", + "static", + "abstract", + "readonly", + "get", + "set", + "constructor", + "async" + ]; + this.allowedConstructorParameterKeywords = [ + "public", + "private", + "protected", + "readonly", + ]; + if (!negative) { + this.not = new VerifyNegatable(state, true); + } + } + VerifyNegatable.prototype.completionListCount = function (expectedCount) { + this.state.verifyCompletionListCount(expectedCount, this.negative); + }; + // Verifies the completion list contains the specified symbol. The + // completion list is brought up if necessary + VerifyNegatable.prototype.completionListContains = function (entryId, text, documentation, kind, spanIndex, hasAction, options) { + if (typeof entryId === "string") { + entryId = { name: entryId, source: undefined }; + } + if (this.negative) { + this.state.verifyCompletionListDoesNotContain(entryId, text, documentation, kind, spanIndex, options); + } + else { + this.state.verifyCompletionListContains(entryId, text, documentation, kind, spanIndex, hasAction, options); + } + }; + // Verifies the completion list items count to be greater than the specified amount. The + // completion list is brought up if necessary + VerifyNegatable.prototype.completionListItemsCountIsGreaterThan = function (count) { + this.state.verifyCompletionListItemsCountIsGreaterThan(count, this.negative); + }; + VerifyNegatable.prototype.assertHasRanges = function (ranges) { + assert(ranges.length !== 0, "Array of ranges is expected to be non-empty"); + }; + VerifyNegatable.prototype.completionListIsEmpty = function () { + this.state.verifyCompletionListIsEmpty(this.negative); + }; + VerifyNegatable.prototype.completionListContainsClassElementKeywords = function () { + for (var _i = 0, _a = this.allowedClassElementKeywords; _i < _a.length; _i++) { + var keyword = _a[_i]; + this.completionListContains(keyword, keyword, /*documentation*/ undefined, "keyword"); + } + }; + VerifyNegatable.prototype.completionListContainsConstructorParameterKeywords = function () { + for (var _i = 0, _a = this.allowedConstructorParameterKeywords; _i < _a.length; _i++) { + var keyword = _a[_i]; + this.completionListContains(keyword, keyword, /*documentation*/ undefined, "keyword"); + } + }; + VerifyNegatable.prototype.completionListIsGlobal = function (expected) { + this.state.verifyCompletionListIsGlobal(expected); + }; + VerifyNegatable.prototype.completionListAllowsNewIdentifier = function () { + this.state.verifyCompletionListAllowsNewIdentifier(this.negative); + }; + VerifyNegatable.prototype.noSignatureHelp = function () { + var markers = []; + for (var _i = 0; _i < arguments.length; _i++) { + markers[_i] = arguments[_i]; + } + this.state.verifyNoSignatureHelp(markers); + }; + VerifyNegatable.prototype.signatureHelp = function () { + var options = []; + for (var _i = 0; _i < arguments.length; _i++) { + options[_i] = arguments[_i]; + } + this.state.verifySignatureHelp(options); + }; + VerifyNegatable.prototype.errorExistsBetweenMarkers = function (startMarker, endMarker) { + this.state.verifyErrorExistsBetweenMarkers(startMarker, endMarker, !this.negative); + }; + VerifyNegatable.prototype.errorExistsAfterMarker = function (markerName) { + if (markerName === void 0) { markerName = ""; } + this.state.verifyErrorExistsAfterMarker(markerName, !this.negative, /*after*/ true); + }; + VerifyNegatable.prototype.errorExistsBeforeMarker = function (markerName) { + if (markerName === void 0) { markerName = ""; } + this.state.verifyErrorExistsAfterMarker(markerName, !this.negative, /*after*/ false); + }; + VerifyNegatable.prototype.quickInfoExists = function () { + this.state.verifyQuickInfoExists(this.negative); + }; + VerifyNegatable.prototype.typeDefinitionCountIs = function (expectedCount) { + this.state.verifyTypeDefinitionsCount(this.negative, expectedCount); + }; + VerifyNegatable.prototype.implementationListIsEmpty = function () { + this.state.verifyImplementationListIsEmpty(this.negative); + }; + VerifyNegatable.prototype.isValidBraceCompletionAtPosition = function (openingBrace) { + this.state.verifyBraceCompletionAtPosition(this.negative, openingBrace); + }; + VerifyNegatable.prototype.jsxClosingTag = function (map) { + this.state.verifyJsxClosingTag(map); + }; + VerifyNegatable.prototype.isInCommentAtPosition = function (onlyMultiLineDiverges) { + this.state.verifySpanOfEnclosingComment(this.negative, onlyMultiLineDiverges); + }; + VerifyNegatable.prototype.codeFix = function (options) { + this.state.verifyCodeFix(options); + }; + VerifyNegatable.prototype.codeFixAvailable = function (options) { + this.state.verifyCodeFixAvailable(this.negative, options); + }; + VerifyNegatable.prototype.applicableRefactorAvailableAtMarker = function (markerName) { + this.state.verifyApplicableRefactorAvailableAtMarker(this.negative, markerName); + }; + VerifyNegatable.prototype.applicableRefactorAvailableForRange = function () { + this.state.verifyApplicableRefactorAvailableForRange(this.negative); + }; + VerifyNegatable.prototype.refactor = function (options) { + this.state.verifyRefactor(options); + }; + VerifyNegatable.prototype.refactorAvailable = function (name, actionName) { + this.state.verifyRefactorAvailable(this.negative, name, actionName); + }; + return VerifyNegatable; + }()); + FourSlashInterface.VerifyNegatable = VerifyNegatable; + var Verify = /** @class */ (function (_super) { + __extends(Verify, _super); + function Verify(state) { + return _super.call(this, state) || this; + } + Verify.prototype.completionsAt = function (markerName, completions, options) { + this.state.verifyCompletionsAt(markerName, completions, options); + }; + Verify.prototype.completions = function () { + var optionsArray = []; + for (var _i = 0; _i < arguments.length; _i++) { + optionsArray[_i] = arguments[_i]; + } + for (var _a = 0, optionsArray_1 = optionsArray; _a < optionsArray_1.length; _a++) { + var options = optionsArray_1[_a]; + this.state.verifyCompletions(options); + } + }; + Verify.prototype.quickInfoIs = function (expectedText, expectedDocumentation) { + this.state.verifyQuickInfoString(expectedText, expectedDocumentation); + }; + Verify.prototype.quickInfoAt = function (markerName, expectedText, expectedDocumentation) { + this.state.verifyQuickInfoAt(markerName, expectedText, expectedDocumentation); + }; + Verify.prototype.quickInfos = function (namesAndTexts) { + this.state.verifyQuickInfos(namesAndTexts); + }; + Verify.prototype.caretAtMarker = function (markerName) { + this.state.verifyCaretAtMarker(markerName); + }; + Verify.prototype.indentationIs = function (numberOfSpaces) { + this.state.verifyIndentationAtCurrentPosition(numberOfSpaces); + }; + Verify.prototype.indentationAtPositionIs = function (fileName, position, numberOfSpaces, indentStyle, baseIndentSize) { + if (indentStyle === void 0) { indentStyle = ts.IndentStyle.Smart; } + if (baseIndentSize === void 0) { baseIndentSize = 0; } + this.state.verifyIndentationAtPosition(fileName, position, numberOfSpaces, indentStyle, baseIndentSize); + }; + Verify.prototype.textAtCaretIs = function (text) { + this.state.verifyTextAtCaretIs(text); + }; + /** + * Compiles the current file and evaluates 'expr' in a context containing + * the emitted output, then compares (using ===) the result of that expression + * to 'value'. Do not use this function with external modules as it is not supported. + */ + Verify.prototype.eval = function (expr, value) { + this.state.verifyEval(expr, value); + }; + Verify.prototype.currentLineContentIs = function (text) { + this.state.verifyCurrentLineContent(text); + }; + Verify.prototype.currentFileContentIs = function (text) { + this.state.verifyCurrentFileContent(text); + }; + Verify.prototype.goToDefinitionIs = function (endMarkers) { + this.state.verifyGoToDefinitionIs(endMarkers); + }; + Verify.prototype.goToDefinition = function (arg0, endMarkerName) { + this.state.verifyGoToDefinition(arg0, endMarkerName); + }; + Verify.prototype.goToType = function (arg0, endMarkerName) { + this.state.verifyGoToType(arg0, endMarkerName); + }; + Verify.prototype.goToDefinitionForMarkers = function () { + var markerNames = []; + for (var _i = 0; _i < arguments.length; _i++) { + markerNames[_i] = arguments[_i]; + } + this.state.verifyGoToDefinitionForMarkers(markerNames); + }; + Verify.prototype.goToDefinitionName = function (name, containerName) { + this.state.verifyGoToDefinitionName(name, containerName); + }; + Verify.prototype.verifyGetEmitOutputForCurrentFile = function (expected) { + this.state.verifyGetEmitOutputForCurrentFile(expected); + }; + Verify.prototype.verifyGetEmitOutputContentsForCurrentFile = function (expected) { + this.state.verifyGetEmitOutputContentsForCurrentFile(expected); + }; + Verify.prototype.symbolAtLocation = function (startRange) { + var declarationRanges = []; + for (var _i = 1; _i < arguments.length; _i++) { + declarationRanges[_i - 1] = arguments[_i]; + } + this.state.verifySymbolAtLocation(startRange, declarationRanges); + }; + Verify.prototype.typeOfSymbolAtLocation = function (range, symbol, expected) { + this.state.verifyTypeOfSymbolAtLocation(range, symbol, expected); + }; + Verify.prototype.referenceGroups = function (starts, parts) { + this.state.verifyReferenceGroups(starts, parts); + }; + Verify.prototype.noReferences = function (markerNameOrRange) { + this.state.verifyNoReferences(markerNameOrRange); + }; + Verify.prototype.getReferencesForServerTest = function (expected) { + this.state.verifyGetReferencesForServerTest(expected); + }; + Verify.prototype.singleReferenceGroup = function (definition, ranges) { + this.state.verifySingleReferenceGroup(definition, ranges); + }; + Verify.prototype.findReferencesDefinitionDisplayPartsAtCaretAre = function (expected) { + this.state.verifyDisplayPartsOfReferencedSymbol(expected); + }; + Verify.prototype.noErrors = function () { + this.state.verifyNoErrors(); + }; + Verify.prototype.numberOfErrorsInCurrentFile = function (expected) { + this.state.verifyNumberOfErrorsInCurrentFile(expected); + }; + Verify.prototype.baselineCurrentFileBreakpointLocations = function () { + this.state.baselineCurrentFileBreakpointLocations(); + }; + Verify.prototype.baselineCurrentFileNameOrDottedNameSpans = function () { + this.state.baselineCurrentFileNameOrDottedNameSpans(); + }; + Verify.prototype.baselineGetEmitOutput = function (insertResultsIntoVfs) { + this.state.baselineGetEmitOutput(insertResultsIntoVfs); + }; + Verify.prototype.baselineQuickInfo = function () { + this.state.baselineQuickInfo(); + }; + Verify.prototype.nameOrDottedNameSpanTextIs = function (text) { + this.state.verifyCurrentNameOrDottedNameSpanText(text); + }; + Verify.prototype.outliningSpansInCurrentFile = function (spans, kind) { + this.state.verifyOutliningSpans(spans, kind); + }; + Verify.prototype.todoCommentsInCurrentFile = function (descriptors) { + this.state.verifyTodoComments(descriptors, this.state.getRanges()); + }; + Verify.prototype.matchingBracePositionInCurrentFile = function (bracePosition, expectedMatchPosition) { + this.state.verifyMatchingBracePosition(bracePosition, expectedMatchPosition); + }; + Verify.prototype.noMatchingBracePositionInCurrentFile = function (bracePosition) { + this.state.verifyNoMatchingBracePosition(bracePosition); + }; + Verify.prototype.docCommentTemplateAt = function (marker, expectedOffset, expectedText) { + this.state.goToMarker(marker); + this.state.verifyDocCommentTemplate({ newText: expectedText.replace(/\r?\n/g, "\r\n"), caretOffset: expectedOffset }); + }; + Verify.prototype.noDocCommentTemplateAt = function (marker) { + this.state.goToMarker(marker); + this.state.verifyDocCommentTemplate(/*expected*/ undefined); + }; + Verify.prototype.rangeAfterCodeFix = function (expectedText, includeWhiteSpace, errorCode, index) { + this.state.verifyRangeAfterCodeFix(expectedText, includeWhiteSpace, errorCode, index); + }; + Verify.prototype.codeFixAll = function (options) { + this.state.verifyCodeFixAll(options); + }; + Verify.prototype.fileAfterApplyingRefactorAtMarker = function (markerName, expectedContent, refactorNameToApply, actionName, formattingOptions) { + this.state.verifyFileAfterApplyingRefactorAtMarker(markerName, expectedContent, refactorNameToApply, actionName, formattingOptions); + }; + Verify.prototype.rangeIs = function (expectedText, includeWhiteSpace) { + this.state.verifyRangeIs(expectedText, includeWhiteSpace); + }; + Verify.prototype.getAndApplyCodeFix = function (errorCode, index) { + this.state.getAndApplyCodeActions(errorCode, index); + }; + Verify.prototype.applyCodeActionFromCompletion = function (markerName, options) { + this.state.applyCodeActionFromCompletion(markerName, options); + }; + Verify.prototype.importFixAtPosition = function (expectedTextArray, errorCode, preferences) { + this.state.verifyImportFixAtPosition(expectedTextArray, errorCode, preferences); + }; + Verify.prototype.navigationBar = function (json, options) { + this.state.verifyNavigationBar(json, options); + }; + Verify.prototype.navigationTree = function (json, options) { + this.state.verifyNavigationTree(json, options); + }; + Verify.prototype.navigationItemsListCount = function (count, searchValue, matchKind, fileName) { + this.state.verifyNavigationItemsCount(count, searchValue, matchKind, fileName); + }; + Verify.prototype.navigationItemsListContains = function (name, kind, searchValue, matchKind, fileName, parentName) { + this.state.verifyNavigationItemsListContains(name, kind, searchValue, matchKind, fileName, parentName); + }; + Verify.prototype.occurrencesAtPositionContains = function (range, isWriteAccess) { + this.state.verifyOccurrencesAtPositionListContains(range.fileName, range.pos, range.end, isWriteAccess); + }; + Verify.prototype.occurrencesAtPositionCount = function (expectedCount) { + this.state.verifyOccurrencesAtPositionListCount(expectedCount); + }; + Verify.prototype.rangesAreOccurrences = function (isWriteAccess) { + this.state.verifyRangesAreOccurrences(isWriteAccess); + }; + Verify.prototype.rangesWithSameTextAreRenameLocations = function () { + this.state.verifyRangesWithSameTextAreRenameLocations(); + }; + Verify.prototype.rangesAreRenameLocations = function (options) { + this.state.verifyRangesAreRenameLocations(options); + }; + Verify.prototype.rangesAreDocumentHighlights = function (ranges, options) { + this.state.verifyRangesAreDocumentHighlights(ranges, options); + }; + Verify.prototype.rangesWithSameTextAreDocumentHighlights = function () { + this.state.verifyRangesWithSameTextAreDocumentHighlights(); + }; + Verify.prototype.documentHighlightsOf = function (startRange, ranges, options) { + this.state.verifyDocumentHighlightsOf(startRange, ranges, options); + }; + Verify.prototype.noDocumentHighlights = function (startRange) { + this.state.verifyNoDocumentHighlights(startRange); + }; + Verify.prototype.completionEntryDetailIs = function (entryName, text, documentation, kind, tags) { + this.state.verifyCompletionEntryDetails(entryName, text, documentation, kind, tags); + }; + /** + * This method *requires* a contiguous, complete, and ordered stream of classifications for a file. + */ + Verify.prototype.syntacticClassificationsAre = function () { + var classifications = []; + for (var _i = 0; _i < arguments.length; _i++) { + classifications[_i] = arguments[_i]; + } + this.state.verifySyntacticClassifications(classifications); + }; + /** + * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended. + */ + Verify.prototype.semanticClassificationsAre = function () { + var classifications = []; + for (var _i = 0; _i < arguments.length; _i++) { + classifications[_i] = arguments[_i]; + } + this.state.verifySemanticClassifications(classifications); + }; + Verify.prototype.renameInfoSucceeded = function (displayName, fullDisplayName, kind, kindModifiers) { + this.state.verifyRenameInfoSucceeded(displayName, fullDisplayName, kind, kindModifiers); + }; + Verify.prototype.renameInfoFailed = function (message) { + this.state.verifyRenameInfoFailed(message); + }; + Verify.prototype.renameLocations = function (startRanges, options) { + this.state.verifyRenameLocations(startRanges, options); + }; + Verify.prototype.verifyQuickInfoDisplayParts = function (kind, kindModifiers, textSpan, displayParts, documentation, tags) { + this.state.verifyQuickInfoDisplayParts(kind, kindModifiers, textSpan, displayParts, documentation, tags); + }; + Verify.prototype.getSyntacticDiagnostics = function (expected) { + this.state.getSyntacticDiagnostics(expected); + }; + Verify.prototype.getSemanticDiagnostics = function (expected) { + this.state.getSemanticDiagnostics(expected); + }; + Verify.prototype.getSuggestionDiagnostics = function (expected) { + this.state.getSuggestionDiagnostics(expected); + }; + Verify.prototype.ProjectInfo = function (expected) { + this.state.verifyProjectInfo(expected); + }; + Verify.prototype.allRangesAppearInImplementationList = function (markerName) { + this.state.verifyRangesInImplementationList(markerName); + }; + Verify.prototype.getEditsForFileRename = function (options) { + this.state.getEditsForFileRename(options); + }; + Verify.prototype.moveToNewFile = function (options) { + this.state.moveToNewFile(options); + }; + Verify.prototype.noMoveToNewFile = function () { + this.state.noMoveToNewFile(); + }; + return Verify; + }(VerifyNegatable)); + FourSlashInterface.Verify = Verify; + var Edit = /** @class */ (function () { + function Edit(state) { + this.state = state; + } + Edit.prototype.backspace = function (count) { + this.state.deleteCharBehindMarker(count); + }; + Edit.prototype.deleteAtCaret = function (times) { + this.state.deleteChar(times); + }; + Edit.prototype.replace = function (start, length, text) { + this.state.replace(start, length, text); + }; + Edit.prototype.paste = function (text) { + this.state.paste(text); + }; + Edit.prototype.insert = function (text) { + this.insertLines(text); + }; + Edit.prototype.insertLine = function (text) { + this.insertLines(text + "\n"); + }; + Edit.prototype.insertLines = function () { + var lines = []; + for (var _i = 0; _i < arguments.length; _i++) { + lines[_i] = arguments[_i]; + } + this.state.type(lines.join("\n")); + }; + Edit.prototype.moveRight = function (count) { + this.state.moveCaretRight(count); + }; + Edit.prototype.moveLeft = function (count) { + if (typeof count === "undefined") { + count = 1; + } + this.state.moveCaretRight(count * -1); + }; + Edit.prototype.enableFormatting = function () { + this.state.enableFormatting = true; + }; + Edit.prototype.disableFormatting = function () { + this.state.enableFormatting = false; + }; + Edit.prototype.applyRefactor = function (options) { + this.state.applyRefactor(options); + }; + return Edit; + }()); + FourSlashInterface.Edit = Edit; + var Debug = /** @class */ (function () { + function Debug(state) { + this.state = state; + } + Debug.prototype.printCurrentParameterHelp = function () { + this.state.printCurrentParameterHelp(); + }; + Debug.prototype.printCurrentFileState = function () { + this.state.printCurrentFileState(/*showWhitespace*/ false, /*makeCaretVisible*/ true); + }; + Debug.prototype.printCurrentFileStateWithWhitespace = function () { + this.state.printCurrentFileState(/*showWhitespace*/ true, /*makeCaretVisible*/ true); + }; + Debug.prototype.printCurrentFileStateWithoutCaret = function () { + this.state.printCurrentFileState(/*showWhitespace*/ false, /*makeCaretVisible*/ false); + }; + Debug.prototype.printCurrentQuickInfo = function () { + this.state.printCurrentQuickInfo(); + }; + Debug.prototype.printCurrentSignatureHelp = function () { + this.state.printCurrentSignatureHelp(); + }; + Debug.prototype.printCompletionListMembers = function (options) { + this.state.printCompletionListMembers(options); + }; + Debug.prototype.printAvailableCodeFixes = function () { + this.state.printAvailableCodeFixes(); + }; + Debug.prototype.printBreakpointLocation = function (pos) { + this.state.printBreakpointLocation(pos); + }; + Debug.prototype.printBreakpointAtCurrentLocation = function () { + this.state.printBreakpointAtCurrentLocation(); + }; + Debug.prototype.printNameOrDottedNameSpans = function (pos) { + this.state.printNameOrDottedNameSpans(pos); + }; + Debug.prototype.printErrorList = function () { + this.state.printErrorList(); + }; + Debug.prototype.printNavigationItems = function (searchValue) { + if (searchValue === void 0) { searchValue = ".*"; } + this.state.printNavigationItems(searchValue); + }; + Debug.prototype.printNavigationBar = function () { + this.state.printNavigationBar(); + }; + Debug.prototype.printContext = function () { + this.state.printContext(); + }; + Debug.prototype.printOutliningSpans = function () { + this.state.printOutliningSpans(); + }; + return Debug; + }()); + FourSlashInterface.Debug = Debug; + var Format = /** @class */ (function () { + function Format(state) { + this.state = state; + } + Format.prototype.document = function () { + this.state.formatDocument(); + }; + Format.prototype.copyFormatOptions = function () { + return this.state.copyFormatOptions(); + }; + Format.prototype.setFormatOptions = function (options) { + return this.state.setFormatOptions(options); + }; + Format.prototype.selection = function (startMarker, endMarker) { + this.state.formatSelection(this.state.getMarkerByName(startMarker).position, this.state.getMarkerByName(endMarker).position); + }; + Format.prototype.onType = function (posMarker, key) { + this.state.formatOnType(this.state.getMarkerByName(posMarker).position, key); + }; + Format.prototype.setOption = function (name, value) { + this.state.formatCodeSettings[name] = value; + }; + return Format; + }()); + FourSlashInterface.Format = Format; + var Cancellation = /** @class */ (function () { + function Cancellation(state) { + this.state = state; + } + Cancellation.prototype.resetCancelled = function () { + this.state.resetCancelled(); + }; + Cancellation.prototype.setCancelled = function (numberOfCalls) { + if (numberOfCalls === void 0) { numberOfCalls = 0; } + this.state.setCancelled(numberOfCalls); + }; + return Cancellation; + }()); + FourSlashInterface.Cancellation = Cancellation; + var Classification; + (function (Classification) { + function comment(text, position) { + return getClassification("comment" /* comment */, text, position); + } + Classification.comment = comment; + function identifier(text, position) { + return getClassification("identifier" /* identifier */, text, position); + } + Classification.identifier = identifier; + function keyword(text, position) { + return getClassification("keyword" /* keyword */, text, position); + } + Classification.keyword = keyword; + function numericLiteral(text, position) { + return getClassification("number" /* numericLiteral */, text, position); + } + Classification.numericLiteral = numericLiteral; + function operator(text, position) { + return getClassification("operator" /* operator */, text, position); + } + Classification.operator = operator; + function stringLiteral(text, position) { + return getClassification("string" /* stringLiteral */, text, position); + } + Classification.stringLiteral = stringLiteral; + function whiteSpace(text, position) { + return getClassification("whitespace" /* whiteSpace */, text, position); + } + Classification.whiteSpace = whiteSpace; + function text(text, position) { + return getClassification("text" /* text */, text, position); + } + Classification.text = text; + function punctuation(text, position) { + return getClassification("punctuation" /* punctuation */, text, position); + } + Classification.punctuation = punctuation; + function docCommentTagName(text, position) { + return getClassification("doc comment tag name" /* docCommentTagName */, text, position); + } + Classification.docCommentTagName = docCommentTagName; + function className(text, position) { + return getClassification("class name" /* className */, text, position); + } + Classification.className = className; + function enumName(text, position) { + return getClassification("enum name" /* enumName */, text, position); + } + Classification.enumName = enumName; + function interfaceName(text, position) { + return getClassification("interface name" /* interfaceName */, text, position); + } + Classification.interfaceName = interfaceName; + function moduleName(text, position) { + return getClassification("module name" /* moduleName */, text, position); + } + Classification.moduleName = moduleName; + function typeParameterName(text, position) { + return getClassification("type parameter name" /* typeParameterName */, text, position); + } + Classification.typeParameterName = typeParameterName; + function parameterName(text, position) { + return getClassification("parameter name" /* parameterName */, text, position); + } + Classification.parameterName = parameterName; + function typeAliasName(text, position) { + return getClassification("type alias name" /* typeAliasName */, text, position); + } + Classification.typeAliasName = typeAliasName; + function jsxOpenTagName(text, position) { + return getClassification("jsx open tag name" /* jsxOpenTagName */, text, position); + } + Classification.jsxOpenTagName = jsxOpenTagName; + function jsxCloseTagName(text, position) { + return getClassification("jsx close tag name" /* jsxCloseTagName */, text, position); + } + Classification.jsxCloseTagName = jsxCloseTagName; + function jsxSelfClosingTagName(text, position) { + return getClassification("jsx self closing tag name" /* jsxSelfClosingTagName */, text, position); + } + Classification.jsxSelfClosingTagName = jsxSelfClosingTagName; + function jsxAttribute(text, position) { + return getClassification("jsx attribute" /* jsxAttribute */, text, position); + } + Classification.jsxAttribute = jsxAttribute; + function jsxText(text, position) { + return getClassification("jsx text" /* jsxText */, text, position); + } + Classification.jsxText = jsxText; + function jsxAttributeStringLiteralValue(text, position) { + return getClassification("jsx attribute string literal value" /* jsxAttributeStringLiteralValue */, text, position); + } + Classification.jsxAttributeStringLiteralValue = jsxAttributeStringLiteralValue; + function getClassification(classificationType, text, position) { + var textSpan = position === undefined ? undefined : { start: position, end: position + text.length }; + return { classificationType: classificationType, text: text, textSpan: textSpan }; + } + })(Classification = FourSlashInterface.Classification || (FourSlashInterface.Classification = {})); +})(FourSlashInterface || (FourSlashInterface = {})); +var TypeWriterWalker = /** @class */ (function () { + function TypeWriterWalker(program, fullTypeCheck) { + this.program = program; + // Consider getting both the diagnostics checker and the non-diagnostics checker to verify + // they are consistent. + this.checker = fullTypeCheck + ? program.getDiagnosticsProducingTypeChecker() + : program.getTypeChecker(); + } + TypeWriterWalker.prototype.getSymbols = function (fileName) { + var _a, sourceFile, gen, _b, done, value; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + sourceFile = this.program.getSourceFile(fileName); + this.currentSourceFile = sourceFile; + gen = this.visitNode(sourceFile, /*isSymbolWalk*/ true); + _b = gen.next(), done = _b.done, value = _b.value; + _c.label = 1; + case 1: + if (!!done) return [3 /*break*/, 4]; + return [4 /*yield*/, value]; + case 2: + _c.sent(); + _c.label = 3; + case 3: + _a = gen.next(), done = _a.done, value = _a.value, _a; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }; + TypeWriterWalker.prototype.getTypes = function (fileName) { + var _a, sourceFile, gen, _b, done, value; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + sourceFile = this.program.getSourceFile(fileName); + this.currentSourceFile = sourceFile; + gen = this.visitNode(sourceFile, /*isSymbolWalk*/ false); + _b = gen.next(), done = _b.done, value = _b.value; + _c.label = 1; + case 1: + if (!!done) return [3 /*break*/, 4]; + return [4 /*yield*/, value]; + case 2: + _c.sent(); + _c.label = 3; + case 3: + _a = gen.next(), done = _a.done, value = _a.value, _a; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }; + TypeWriterWalker.prototype.visitNode = function (node, isSymbolWalk) { + var _a, result, children, _i, children_1, child, gen, _b, done, value; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + if (!(ts.isExpressionNode(node) || node.kind === 71 /* Identifier */ || ts.isDeclarationName(node))) return [3 /*break*/, 2]; + result = this.writeTypeOrSymbol(node, isSymbolWalk); + if (!result) return [3 /*break*/, 2]; + return [4 /*yield*/, result]; + case 1: + _c.sent(); + _c.label = 2; + case 2: + children = []; + ts.forEachChild(node, function (child) { return void children.push(child); }); + _i = 0, children_1 = children; + _c.label = 3; + case 3: + if (!(_i < children_1.length)) return [3 /*break*/, 8]; + child = children_1[_i]; + gen = this.visitNode(child, isSymbolWalk); + _b = gen.next(), done = _b.done, value = _b.value; + _c.label = 4; + case 4: + if (!!done) return [3 /*break*/, 7]; + return [4 /*yield*/, value]; + case 5: + _c.sent(); + _c.label = 6; + case 6: + _a = gen.next(), done = _a.done, value = _a.value, _a; + return [3 /*break*/, 4]; + case 7: + _i++; + return [3 /*break*/, 3]; + case 8: return [2 /*return*/]; + } + }); + }; + TypeWriterWalker.prototype.writeTypeOrSymbol = function (node, isSymbolWalk) { + var actualPos = ts.skipTrivia(this.currentSourceFile.text, node.pos); + var lineAndCharacter = this.currentSourceFile.getLineAndCharacterOfPosition(actualPos); + var sourceText = ts.getSourceTextOfNodeFromSourceFile(this.currentSourceFile, node); + if (!isSymbolWalk) { + // Workaround to ensure we output 'C' instead of 'typeof C' for base class expressions + // let type = this.checker.getTypeAtLocation(node); + var type = node.parent && ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent) && this.checker.getTypeAtLocation(node.parent) || this.checker.getTypeAtLocation(node); + var typeString = type ? this.checker.typeToString(type, node.parent, 1 /* NoTruncation */ | 1048576 /* AllowUniqueESSymbolType */) : "No type information available!"; + return { + line: lineAndCharacter.line, + syntaxKind: node.kind, + sourceText: sourceText, + type: typeString + }; + } + var symbol = this.checker.getSymbolAtLocation(node); + if (!symbol) { + return; + } + var symbolString = "Symbol(" + this.checker.symbolToString(symbol, node.parent); + if (symbol.declarations) { + var count = 0; + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (count >= 5) { + symbolString += " ... and " + (symbol.declarations.length - count) + " more"; + break; + } + count++; + symbolString += ", "; + if (declaration.__symbolTestOutputCache) { + symbolString += declaration.__symbolTestOutputCache; + continue; + } + var declSourceFile = declaration.getSourceFile(); + var declLineAndCharacter = declSourceFile.getLineAndCharacterOfPosition(declaration.pos); + var fileName = ts.getBaseFileName(declSourceFile.fileName); + var isLibFile = /lib(.*)\.d\.ts/i.test(fileName); + var declText = "Decl(" + fileName + ", " + (isLibFile ? "--" : declLineAndCharacter.line) + ", " + (isLibFile ? "--" : declLineAndCharacter.character) + ")"; + symbolString += declText; + declaration.__symbolTestOutputCache = declText; + } + } + symbolString += ")"; + return { + line: lineAndCharacter.line, + syntaxKind: node.kind, + sourceText: sourceText, + symbol: symbolString + }; + }; + return TypeWriterWalker; +}()); +var Playback; +(function (Playback) { + var recordLog; + var replayLog; + var replayFilesRead; + var recordLogFileNameBase = ""; + function memoize(func) { + var lookup = {}; + var run = (function (s) { + if (lookup.hasOwnProperty(s)) + return lookup[s]; + return lookup[s] = func(s); + }); + run.reset = function () { + lookup = undefined; // TODO: GH#18217 + }; + return run; + } + function createEmptyLog() { + return { + timestamp: (new Date()).toString(), + arguments: [], + currentDirectory: "", + filesRead: [], + directoriesRead: [], + filesWritten: [], + filesDeleted: [], + filesAppended: [], + fileExists: [], + filesFound: [], + dirs: [], + dirExists: [], + dirsCreated: [], + pathsResolved: [], + executingPath: "" + }; + } + function newStyleLogIntoOldStyleLog(log, host, baseName) { + for (var _i = 0, _a = log.filesAppended; _i < _a.length; _i++) { + var file = _a[_i]; + if (file.contentsPath) { + file.contents = host.readFile(ts.combinePaths(baseName, file.contentsPath)); + delete file.contentsPath; + } + } + for (var _b = 0, _c = log.filesWritten; _b < _c.length; _b++) { + var file = _c[_b]; + if (file.contentsPath) { + file.contents = host.readFile(ts.combinePaths(baseName, file.contentsPath)); + delete file.contentsPath; + } + } + for (var _d = 0, _e = log.filesRead; _d < _e.length; _d++) { + var file = _e[_d]; + var result = file.result; // TODO: GH#18217 + if (result.contentsPath) { + // `readFile` strips away a BOM (and actually reinerprets the file contents according to the correct encoding) + // - but this has the unfortunate sideeffect of removing the BOM from any outputs based on the file, so we readd it here. + result.contents = (result.bom || "") + host.readFile(ts.combinePaths(baseName, result.contentsPath)); + delete result.contentsPath; + } + } + return log; + } + Playback.newStyleLogIntoOldStyleLog = newStyleLogIntoOldStyleLog; + var canonicalizeForHarness = ts.createGetCanonicalFileName(/*caseSensitive*/ false); // This is done so tests work on windows _and_ linux + function sanitizeTestFilePath(name) { + var path = ts.toPath(ts.normalizeSlashes(name.replace(/[\^<>:"|?*%]/g, "_")).replace(/\.\.\//g, "__dotdot/"), "", canonicalizeForHarness); + if (ts.startsWith(path, "/")) { + return path.substring(1); + } + return path; + } + function oldStyleLogIntoNewStyleLog(log, writeFile, baseTestName) { + if (log.filesAppended) { + for (var _i = 0, _a = log.filesAppended; _i < _a.length; _i++) { + var file = _a[_i]; + if (file.contents !== undefined) { + file.contentsPath = ts.combinePaths("appended", sanitizeTestFilePath(file.path)); + writeFile(ts.combinePaths(baseTestName, file.contentsPath), file.contents); + delete file.contents; + } + } + } + if (log.filesWritten) { + for (var _b = 0, _c = log.filesWritten; _b < _c.length; _b++) { + var file = _c[_b]; + if (file.contents !== undefined) { + file.contentsPath = ts.combinePaths("written", sanitizeTestFilePath(file.path)); + writeFile(ts.combinePaths(baseTestName, file.contentsPath), file.contents); + delete file.contents; + } + } + } + if (log.filesRead) { + for (var _d = 0, _e = log.filesRead; _d < _e.length; _d++) { + var file = _e[_d]; + var result = file.result; // TODO: GH#18217 + var contents = result.contents; + if (contents !== undefined) { + result.contentsPath = ts.combinePaths("read", sanitizeTestFilePath(file.path)); + writeFile(ts.combinePaths(baseTestName, result.contentsPath), contents); + var len = contents.length; + if (len >= 2 && contents.charCodeAt(0) === 0xfeff) { + result.bom = "\ufeff"; + } + if (len >= 2 && contents.charCodeAt(0) === 0xfffe) { + result.bom = "\ufffe"; + } + if (len >= 3 && contents.charCodeAt(0) === 0xefbb && contents.charCodeAt(1) === 0xbf) { + result.bom = "\uefbb\xbf"; + } + delete result.contents; + } + } + } + return log; + } + Playback.oldStyleLogIntoNewStyleLog = oldStyleLogIntoNewStyleLog; + function initWrapper(wrapper, underlying) { + ts.forEach(Object.keys(underlying), function (prop) { + wrapper[prop] = underlying[prop]; + }); + wrapper.startReplayFromString = function (logString) { + wrapper.startReplayFromData(JSON.parse(logString)); + }; + wrapper.startReplayFromData = function (log) { + replayLog = log; + // Remove non-found files from the log (shouldn't really need them, but we still record them for diagnostic purposes) + replayLog.filesRead = replayLog.filesRead.filter(function (f) { return f.result.contents !== undefined; }); + replayFilesRead = ts.createMap(); + for (var _i = 0, _a = replayLog.filesRead; _i < _a.length; _i++) { + var file = _a[_i]; + replayFilesRead.set(ts.normalizeSlashes(file.path).toLowerCase(), file); + } + }; + wrapper.endReplay = function () { + replayLog = undefined; + replayFilesRead = undefined; + }; + wrapper.startRecord = function (fileNameBase) { + recordLogFileNameBase = fileNameBase; + recordLog = createEmptyLog(); + recordLog.useCaseSensitiveFileNames = typeof underlying.useCaseSensitiveFileNames === "function" ? underlying.useCaseSensitiveFileNames() : underlying.useCaseSensitiveFileNames; + if (typeof underlying.args !== "function") { + recordLog.arguments = underlying.args; + } + }; + wrapper.startReplayFromFile = function (logFn) { + wrapper.startReplayFromString(underlying.readFile(logFn)); + }; + wrapper.endRecord = function () { + if (recordLog !== undefined) { + var i_1 = 0; + var getBase = function () { return recordLogFileNameBase + i_1; }; + while (underlying.fileExists(ts.combinePaths(getBase(), "test.json"))) + i_1++; + var newLog = oldStyleLogIntoNewStyleLog(recordLog, function (path, str) { return underlying.writeFile(path, str); }, getBase()); + underlying.writeFile(ts.combinePaths(getBase(), "test.json"), JSON.stringify(newLog, null, 4)); // tslint:disable-line:no-null-keyword + var syntheticTsconfig = generateTsconfig(newLog); + if (syntheticTsconfig) { + underlying.writeFile(ts.combinePaths(getBase(), "tsconfig.json"), JSON.stringify(syntheticTsconfig, null, 4)); // tslint:disable-line:no-null-keyword + } + recordLog = undefined; + } + }; + function generateTsconfig(newLog) { + if (newLog.filesRead.some(function (file) { return /tsconfig.+json$/.test(file.path); })) { + return; + } + var files = []; + for (var _i = 0, _a = newLog.filesRead; _i < _a.length; _i++) { + var file = _a[_i]; + var result = file.result; + if (result.contentsPath && + Harness.isDefaultLibraryFile(result.contentsPath) && + /\.[tj]s$/.test(result.contentsPath)) { + files.push(result.contentsPath); + } + } + return { compilerOptions: ts.parseCommandLine(newLog.arguments).options, files: files }; + } + wrapper.fileExists = recordReplay(wrapper.fileExists, underlying)(function (path) { return callAndRecord(underlying.fileExists(path), recordLog.fileExists, { path: path }); }, memoize(function (path) { + // If we read from the file, it must exist + if (findFileByPath(path, /*throwFileNotFoundError*/ false)) { + return true; + } + else { + return findResultByFields(replayLog.fileExists, { path: path }, /*defaultValue*/ false); + } + })); + wrapper.getExecutingFilePath = function () { + if (replayLog !== undefined) { + return replayLog.executingPath; + } + else if (recordLog !== undefined) { + return recordLog.executingPath = underlying.getExecutingFilePath(); + } + else { + return underlying.getExecutingFilePath(); + } + }; + wrapper.getCurrentDirectory = function () { + if (replayLog !== undefined) { + return replayLog.currentDirectory || ""; + } + else if (recordLog !== undefined) { + return recordLog.currentDirectory = underlying.getCurrentDirectory(); + } + else { + return underlying.getCurrentDirectory(); + } + }; + wrapper.resolvePath = recordReplay(wrapper.resolvePath, underlying)(function (path) { return callAndRecord(underlying.resolvePath(path), recordLog.pathsResolved, { path: path }); }, memoize(function (path) { return findResultByFields(replayLog.pathsResolved, { path: path }, !ts.isRootedDiskPath(ts.normalizeSlashes(path)) && replayLog.currentDirectory ? replayLog.currentDirectory + "/" + path : ts.normalizeSlashes(path)); })); + wrapper.readFile = recordReplay(wrapper.readFile, underlying)(function (path) { + var result = underlying.readFile(path); + var logEntry = { path: path, codepage: 0, result: { contents: result, codepage: 0 } }; + recordLog.filesRead.push(logEntry); + return result; + }, memoize(function (path) { return findFileByPath(path, /*throwFileNotFoundError*/ true).contents; })); + wrapper.readDirectory = recordReplay(wrapper.readDirectory, underlying)(function (path, extensions, exclude, include, depth) { + var result = underlying.readDirectory(path, extensions, exclude, include, depth); + recordLog.directoriesRead.push({ path: path, extensions: extensions, exclude: exclude, include: include, depth: depth, result: result }); + return result; + }, function (path) { + // Because extensions is an array of all allowed extension, we will want to merge each of the replayLog.directoriesRead into one + // if each of the directoriesRead has matched path with the given path (directory with same path but different extension will considered + // different entry). + // TODO (yuisu): We can certainly remove these once we recapture the RWC using new API + var normalizedPath = ts.normalizePath(path).toLowerCase(); + return ts.flatMap(replayLog.directoriesRead, function (directory) { + if (ts.normalizeSlashes(directory.path).toLowerCase() === normalizedPath) { + return directory.result; + } + }); + }); + wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)(function (path, contents) { return callAndRecord(underlying.writeFile(path, contents), recordLog.filesWritten, { path: path, contents: contents, bom: false }); }, function () { return noOpReplay("writeFile"); }); + wrapper.exit = function (exitCode) { + if (recordLog !== undefined) { + wrapper.endRecord(); + } + underlying.exit(exitCode); + }; + wrapper.useCaseSensitiveFileNames = function () { + if (replayLog !== undefined) { + return !!replayLog.useCaseSensitiveFileNames; + } + return typeof underlying.useCaseSensitiveFileNames === "function" ? underlying.useCaseSensitiveFileNames() : underlying.useCaseSensitiveFileNames; + }; + } + function recordReplay(original, underlying) { + function createWrapper(record, replay) { + // tslint:disable-next-line only-arrow-functions + return (function () { + if (replayLog !== undefined) { + return replay.apply(undefined, arguments); + } + else if (recordLog !== undefined) { + return record.apply(undefined, arguments); + } + else { + return original.apply(underlying, arguments); + } + }); + } + return createWrapper; + } + function callAndRecord(underlyingResult, logArray, logEntry) { + if (underlyingResult !== undefined) { + logEntry.result = underlyingResult; + } + logArray.push(logEntry); + return underlyingResult; + } + function findResultByFields(logArray, expectedFields, defaultValue) { + var predicate = function (entry) { + return Object.getOwnPropertyNames(expectedFields).every(function (name) { return entry[name] === expectedFields[name]; }); + }; + var results = logArray.filter(function (entry) { return predicate(entry); }); + if (results.length === 0) { + if (defaultValue !== undefined) { + return defaultValue; + } + else { + throw new Error("No matching result in log array for: " + JSON.stringify(expectedFields)); + } + } + return results[0].result; + } + function findFileByPath(expectedPath, throwFileNotFoundError) { + var normalizedName = ts.normalizePath(expectedPath).toLowerCase(); + // Try to find the result through normal fileName + var result = replayFilesRead.get(normalizedName); + if (result) { + return result.result; + } + // If we got here, we didn't find a match + if (throwFileNotFoundError) { + throw new Error("No matching result in log array for path: " + expectedPath); + } + else { + return undefined; + } + } + function noOpReplay(_name) { + // console.log("Swallowed write operation during replay: " + name); + } + function wrapIO(underlying) { + var wrapper = {}; + initWrapper(wrapper, underlying); + wrapper.directoryName = notSupported; + wrapper.createDirectory = notSupported; + wrapper.directoryExists = notSupported; + wrapper.deleteFile = notSupported; + wrapper.listFiles = notSupported; + return wrapper; + function notSupported() { + throw new Error("NotSupported"); + } + } + Playback.wrapIO = wrapIO; + function wrapSystem(underlying) { + var wrapper = {}; + initWrapper(wrapper, underlying); + return wrapper; + } + Playback.wrapSystem = wrapSystem; +})(Playback || (Playback = {})); +//# sourceMappingURL=harness.js.map \ No newline at end of file diff --git a/src/built/local/harness.js.map b/src/built/local/harness.js.map new file mode 100644 index 00000000000..8bae7bf1b91 --- /dev/null +++ b/src/built/local/harness.js.map @@ -0,0 +1 @@ +{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../harness/collections.ts","../../harness/utils.ts","../../harness/documents.ts","../../harness/vpath.ts","../../harness/vfs.ts","../../harness/compiler.ts","../../harness/evaluator.ts","../../harness/fakes.ts","../../harness/client.ts","../../harness/runnerbase.ts","../../harness/sourceMapRecorder.ts","../../harness/harness.ts","../../harness/harnessLanguageService.ts","../../harness/virtualFileSystemWithWatch.ts","../../harness/fourslash.ts","../../harness/typeWriter.ts","../../harness/loggedIO.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAU,WAAW,CAgUpB;AAhUD,WAAU,WAAW;IAMjB;QAQI,mBAAY,QAAmD,EAAE,QAA2B;YANpF,UAAK,GAAQ,EAAE,CAAC;YAChB,YAAO,GAAQ,EAAE,CAAC;YAElB,aAAQ,GAAG,CAAC,CAAC;YACb,iBAAY,GAAG,KAAK,CAAC;YAGzB,IAAI,CAAC,SAAS,GAAG,OAAO,QAAQ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CAAC,CAAC;SAChF;aACI;YACD,OAAO,SAAS,CAAC;SACpB;IACL,CAAC;IAED,oBAAoB,KAAa;QAC7B,mEAAmE;IACvE,CAAC;IAED,gBAAuB,UAAsB;QACzC,IAAM,OAAO,GAAoB,EAAE,CAAC;QACpC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAEjC,OAAO,CAAC,aAAa,GAAG,YAAY,CAAC;QACrC,OAAO,CAAC,eAAe,GAAG,YAAY,CAAC;QACvC,OAAO,CAAC,eAAe,GAAG,YAAY,CAAC;QACvC,OAAO,CAAC,UAAU,GAAG,YAAY,CAAC;QAClC,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC;QAEjC,OAAO,OAAO,CAAC;QAEf;YACI,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAfe,eAAM,SAerB,CAAA;IAED,oBAA2B,UAAqB;QAC5C,IAAM,OAAO,GAAwB,EAAE,CAAC;QACxC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC;IACnB,CAAC;IAJe,mBAAU,aAIzB,CAAA;AACL,CAAC,EA9WS,QAAQ,KAAR,QAAQ,QA8WjB"} \ No newline at end of file diff --git a/src/server/cancellationToken/cancellationToken.ts b/src/cancellationToken/cancellationToken.ts similarity index 100% rename from src/server/cancellationToken/cancellationToken.ts rename to src/cancellationToken/cancellationToken.ts diff --git a/src/server/cancellationToken/tsconfig.json b/src/cancellationToken/tsconfig.json similarity index 62% rename from src/server/cancellationToken/tsconfig.json rename to src/cancellationToken/tsconfig.json index 604b92b4cf2..45795320796 100644 --- a/src/server/cancellationToken/tsconfig.json +++ b/src/cancellationToken/tsconfig.json @@ -1,6 +1,9 @@ { - "extends": "../../tsconfig-base", + "extends": "../tsconfig-base", "compilerOptions": { + "outDir": "../built/local/", + "composite": false, + "declaration": false, "removeComments": true, "module": "commonjs", "types": [ diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 3f848cfbc29..4614c3bede4 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -6,7 +6,7 @@ namespace ts { finishRecordingFilesWithChangedResolutions(): Path[] | undefined; resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined): ResolvedModuleFull[]; - getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined; + getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): CachedResolvedModuleWithFailedLookupLocations | undefined; resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[]; invalidateResolutionOfFile(filePath: Path): void; @@ -33,7 +33,7 @@ namespace ts { resolvedFileName: string | undefined; } - interface ResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations { + interface CachedResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations { } interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations { @@ -85,8 +85,8 @@ namespace ts { // The resolvedModuleNames and resolvedTypeReferenceDirectives are the cache of resolutions per file. // The key in the map is source file's path. // The values are Map of resolutions with key being name lookedup. - const resolvedModuleNames = createMap>(); - const perDirectoryResolvedModuleNames = createMap>(); + const resolvedModuleNames = createMap>(); + const perDirectoryResolvedModuleNames = createMap>(); const nonRelaticeModuleNameCache = createMap(); const moduleResolutionCache = createModuleResolutionCacheWithMaps( perDirectoryResolvedModuleNames, @@ -133,7 +133,7 @@ namespace ts { clear }; - function getResolvedModule(resolution: ResolvedModuleWithFailedLookupLocations) { + function getResolvedModule(resolution: CachedResolvedModuleWithFailedLookupLocations) { return resolution.resolvedModule; } @@ -211,7 +211,7 @@ namespace ts { clearPerDirectoryResolutions(); } - function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): CachedResolvedModuleWithFailedLookupLocations { const primaryResult = ts.resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache); // return result immediately only if global cache support is not enabled or if it is .ts, .tsx or .d.ts if (!resolutionHost.getGlobalCache) { @@ -328,7 +328,7 @@ namespace ts { } function resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined): ResolvedModuleFull[] { - return resolveNamesWithLocalCache( + return resolveNamesWithLocalCache( moduleNames, containingFile, resolvedModuleNames, perDirectoryResolvedModuleNames, resolveModuleName, getResolvedModule, @@ -336,7 +336,7 @@ namespace ts { ); } - function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined { + function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): CachedResolvedModuleWithFailedLookupLocations | undefined { const cache = resolvedModuleNames.get(resolutionHost.toPath(containingFile)); return cache && cache.get(moduleName); } diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index b2ed458b8b4..8a7ba50c62c 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -1,19 +1,9 @@ { "extends": "../tsconfig-base", "compilerOptions": { - "removeComments": true, - "outFile": "../../built/local/tsc.js", - "declaration": true + "outFile": "../../built/local/compiler.js" }, "files": [ - "types.ts", - "performance.ts", - "core.ts", - "sys.ts", - "diagnosticInformationMap.generated.ts", - "scanner.ts", - "utilities.ts", - "parser.ts", "binder.ts", "symbolWalker.ts", "moduleNameResolver.ts", @@ -46,8 +36,10 @@ "resolutionCache.ts", "moduleSpecifiers.ts", "watch.ts", - "commandLineParser.ts", - "tsbuild.ts", - "tsc.ts", + "tsbuild.ts" + ], + "references": [ + { "path": "../core" }, + { "path": "../parser" } ] } diff --git a/src/compiler/core.ts b/src/core/core.ts similarity index 52% rename from src/compiler/core.ts rename to src/core/core.ts index 0ec284d1882..4797f3f085b 100644 --- a/src/compiler/core.ts +++ b/src/core/core.ts @@ -7,25 +7,62 @@ namespace ts { } namespace ts { - export function isExternalModuleNameRelative(moduleName: string): boolean { - // TypeScript 1.0 spec (April 2014): 11.2.1 - // An external module name is "relative" if the first term is "." or "..". - // Update: We also consider a path like `C:\foo.ts` "relative" because we do not search for it in `node_modules` or treat it as an ambient module. - return pathIsRelative(moduleName) || isRootedDiskPath(moduleName); + /** + * Type of objects whose values are all of the same type. + * The `in` and `for-in` operators can *not* be safely used, + * since `Object.prototype` may be modified by outside code. + */ + export interface MapLike { + [index: string]: T; } - export function sortAndDeduplicateDiagnostics(diagnostics: ReadonlyArray): T[] { - return sortAndDeduplicate(diagnostics, compareDiagnostics); + export interface SortedArray extends Array { + " __sortedArrayBrand": any; } } /* @internal */ namespace ts { - export const emptyArray: never[] = [] as never[]; - export function closeFileWatcher(watcher: FileWatcher) { - watcher.close(); + /* @internal */ + export type EqualityComparer = (a: T, b: T) => boolean; + + /* @internal */ + export type Comparer = (a: T, b: T) => Comparison; + + export const enum Comparison { + LessThan = -1, + EqualTo = 0, + GreaterThan = 1 } + /** ES6 Map interface, only read methods included. */ + export interface ReadonlyMap { + get(key: string): T | undefined; + has(key: string): boolean; + forEach(action: (value: T, key: string) => void): void; + readonly size: number; + keys(): Iterator; + values(): Iterator; + entries(): Iterator<[string, T]>; + } + + /** ES6 Map interface. */ + export interface Map extends ReadonlyMap { + set(key: string, value: T): this; + delete(key: string): boolean; + clear(): void; + } + + /** ES6 Iterator type. */ + export interface Iterator { + next(): { value: T, done: false } | { value: never, done: true }; + } + + /** Array that is only intended to be pushed to, never read. */ + export interface Push { + push(...values: T[]): void; + } + /** Create a MapLike with good performance. */ function createDictionaryObject(): MapLike { const map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword @@ -44,21 +81,6 @@ namespace ts { return new MapCtr(); } - /** Create a new escaped identifier map. */ - export function createUnderscoreEscapedMap(): UnderscoreEscapedMap { - return new MapCtr() as UnderscoreEscapedMap; - } - - export function createSymbolTable(symbols?: ReadonlyArray): SymbolTable { - const result = createMap() as SymbolTable; - if (symbols) { - for (const symbol of symbols) { - result.set(symbol.escapedName, symbol); - } - } - return result; - } - export function createMapFromEntries(entries: [string, T][]): Map { const map = createMap(); for (const [key, value] of entries) { @@ -85,7 +107,7 @@ namespace ts { declare const Map: { new (): Map } | undefined; // Internet Explorer's Map doesn't support iteration, so don't use it. // tslint:disable-next-line no-in-operator variable-name - const MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); + export const MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap(); // Keep the class inside a function so it doesn't get compiled if it's not used. function shimMap(): { new (): Map } { @@ -166,21 +188,10 @@ namespace ts { }; } - export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { - const nonCanonicalizedPath = isRootedDiskPath(fileName) - ? normalizePath(fileName) - : getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - export function length(array: ReadonlyArray | undefined): number { return array ? array.length : 0; } - export function hasEntries(map: ReadonlyUnderscoreEscapedMap | undefined): map is ReadonlyUnderscoreEscapedMap { - return !!map && !!map.size; - } - /** * Iterates through 'array' by index and performs the callback on each element of array until the callback * returns a truthy value, then returns that value. @@ -226,28 +237,6 @@ namespace ts { } } - /** - * Iterates through the parent chain of a node and performs the callback on each parent until the callback - * returns a truthy value, then returns that value. - * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" - * At that point findAncestor returns undefined. - */ - export function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; - export function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; - export function findAncestor(node: Node, callback: (element: Node) => boolean | "quit"): Node | undefined { - while (node) { - const result = callback(node); - if (result === "quit") { - return undefined; - } - else if (result) { - return node; - } - node = node.parent; - } - return undefined; - } - export function zipWith(arrayA: ReadonlyArray, arrayB: ReadonlyArray, callback: (a: T, b: U, index: number) => V): V[] { const result: V[] = []; Debug.assertEqual(arrayA.length, arrayB.length); @@ -873,25 +862,6 @@ namespace ts { return true; } - export function changesAffectModuleResolution(oldOptions: CompilerOptions, newOptions: CompilerOptions): boolean { - return !oldOptions || - (oldOptions.module !== newOptions.module) || - (oldOptions.moduleResolution !== newOptions.moduleResolution) || - (oldOptions.noResolve !== newOptions.noResolve) || - (oldOptions.target !== newOptions.target) || - (oldOptions.noLib !== newOptions.noLib) || - (oldOptions.jsx !== newOptions.jsx) || - (oldOptions.allowJs !== newOptions.allowJs) || - (oldOptions.rootDir !== newOptions.rootDir) || - (oldOptions.configFilePath !== newOptions.configFilePath) || - (oldOptions.baseUrl !== newOptions.baseUrl) || - (oldOptions.maxNodeModuleJsDepth !== newOptions.maxNodeModuleJsDepth) || - !arrayIsEqualTo(oldOptions.lib, newOptions.lib) || - !arrayIsEqualTo(oldOptions.typeRoots, newOptions.typeRoots) || - !arrayIsEqualTo(oldOptions.rootDirs, newOptions.rootDirs) || - !equalOwnProperties(oldOptions.paths, newOptions.paths); - } - /** * Compacts an array, removing any falsey elements. */ @@ -1293,46 +1263,6 @@ namespace ts { return result; } - /** - * Calls `callback` for each entry in the map, returning the first truthy result. - * Use `map.forEach` instead for normal iteration. - */ - export function forEachEntry(map: ReadonlyUnderscoreEscapedMap, callback: (value: T, key: __String) => U | undefined): U | undefined; - export function forEachEntry(map: ReadonlyMap, callback: (value: T, key: string) => U | undefined): U | undefined; - export function forEachEntry(map: ReadonlyUnderscoreEscapedMap | ReadonlyMap, callback: (value: T, key: (string & __String)) => U | undefined): U | undefined { - const iterator = map.entries(); - for (let { value: pair, done } = iterator.next(); !done; { value: pair, done } = iterator.next()) { - const [key, value] = pair; - const result = callback(value, key as (string & __String)); - if (result) { - return result; - } - } - return undefined; - } - - /** `forEachEntry` for just keys. */ - export function forEachKey(map: ReadonlyUnderscoreEscapedMap<{}>, callback: (key: __String) => T | undefined): T | undefined; - export function forEachKey(map: ReadonlyMap<{}>, callback: (key: string) => T | undefined): T | undefined; - export function forEachKey(map: ReadonlyUnderscoreEscapedMap<{}> | ReadonlyMap<{}>, callback: (key: string & __String) => T | undefined): T | undefined { - const iterator = map.keys(); - for (let { value: key, done } = iterator.next(); !done; { value: key, done } = iterator.next()) { - const result = callback(key as string & __String); - if (result) { - return result; - } - } - return undefined; - } - - /** Copy entries from `source` to `target`. */ - export function copyEntries(source: ReadonlyUnderscoreEscapedMap, target: UnderscoreEscapedMap): void; - export function copyEntries(source: ReadonlyMap, target: Map): void; - export function copyEntries | Map>(source: U, target: U): void { - (source as Map).forEach((value, key) => { - (target as Map).set(key, value); - }); - } export function assign(t: T, ...args: (T | undefined)[]) { for (const arg of args) { @@ -1401,18 +1331,6 @@ namespace ts { return result; } - /** - * Creates a set from the elements of an array. - * - * @param array the array of input elements. - */ - export function arrayToSet(array: ReadonlyArray): Map; - export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => string | undefined): Map; - export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => __String | undefined): UnderscoreEscapedMap; - export function arrayToSet(array: ReadonlyArray, makeKey?: (value: any) => string | __String | undefined): Map | UnderscoreEscapedMap { - return arrayToMap(array, makeKey || (s => s), () => true); - } - export function arrayToMultiMap(values: ReadonlyArray, makeKey: (value: T) => string): MultiMap; export function arrayToMultiMap(values: ReadonlyArray, makeKey: (value: T) => string, makeValue: (value: T) => U): MultiMap; export function arrayToMultiMap(values: ReadonlyArray, makeKey: (value: T) => string, makeValue: (value: T) => T | U = identity): MultiMap { @@ -1427,15 +1345,6 @@ namespace ts { return arrayFrom(arrayToMultiMap(values, getGroupId).values()); } - export function cloneMap(map: SymbolTable): SymbolTable; - export function cloneMap(map: ReadonlyMap): Map; - export function cloneMap(map: ReadonlyUnderscoreEscapedMap): UnderscoreEscapedMap; - export function cloneMap(map: ReadonlyMap | ReadonlyUnderscoreEscapedMap | SymbolTable): Map | UnderscoreEscapedMap | SymbolTable { - const clone = createMap(); - copyEntries(map as Map, clone); - return clone; - } - export function clone(object: T): T { const result: any = {}; for (const id in object) { @@ -1530,12 +1439,7 @@ namespace ts { export function cast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut { if (value !== undefined && test(value)) return value; - if (value && typeof (value as any).kind === "number") { - return Debug.fail(`Invalid cast. The supplied ${Debug.showSyntaxKind(value as any as Node)} did not pass the test '${Debug.getFunctionName(test)}'.`); - } - else { - return Debug.fail(`Invalid cast. The supplied value did not pass the test '${Debug.getFunctionName(test)}'.`); - } + return Debug.fail(`Invalid cast. The supplied value ${value} did not pass the test '${Debug.getFunctionName(test)}'.`); } /** Does nothing. */ @@ -1635,112 +1539,99 @@ namespace ts { } } - export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => Debug.assertDefined(args[+index + baseIndex])); + export const enum AssertionLevel { + None = 0, + Normal = 1, + Aggressive = 2, + VeryAggressive = 3, } - export let localizedDiagnosticMessages: MapLike | undefined; + /** + * Safer version of `Function` which should not be called. + * Every function should be assignable to this, but this should not be assignable to every function. + */ + export type AnyFunction = (...args: never[]) => void; - export function getLocaleSpecificMessage(message: DiagnosticMessage) { - return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; - } + export namespace Debug { + export let currentAssertionLevel = AssertionLevel.None; + export let isDebugging = false; - export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticWithLocation; - export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): DiagnosticWithLocation { - Debug.assertGreaterThanOrEqual(start, 0); - Debug.assertGreaterThanOrEqual(length, 0); - - if (file) { - Debug.assertLessThanOrEqual(start, file.text.length); - Debug.assertLessThanOrEqual(start + length, file.text.length); + export function shouldAssert(level: AssertionLevel): boolean { + return currentAssertionLevel >= level; } - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + export function assert(expression: boolean, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): void { + if (!expression) { + if (verboseDebugInfo) { + message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); + } + fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); + } } - return { - file, - start, - length, - - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - }; - } - - /* internal */ - export function formatMessage(_dummy: any, message: DiagnosticMessage): string { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + export function assertEqual(a: T, b: T, msg?: string, msg2?: string): void { + if (a !== b) { + const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; + fail(`Expected ${a} === ${b}. ${message}`); + } } - return text; - } - - export function createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number | undefined)[]): Diagnostic; - export function createCompilerDiagnostic(message: DiagnosticMessage): Diagnostic { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); + export function assertLessThan(a: number, b: number, msg?: string): void { + if (a >= b) { + fail(`Expected ${a} < ${b}. ${msg || ""}`); + } } - return { - file: undefined, - start: undefined, - length: undefined, - - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - }; - } - - export function createCompilerDiagnosticFromMessageChain(chain: DiagnosticMessageChain): Diagnostic { - return { - file: undefined, - start: undefined, - length: undefined, - - code: chain.code, - category: chain.category, - messageText: chain.next ? chain : chain.messageText, - }; - } - - export function chainDiagnosticMessages(details: DiagnosticMessageChain | undefined, message: DiagnosticMessage, ...args: (string | undefined)[]): DiagnosticMessageChain; - export function chainDiagnosticMessages(details: DiagnosticMessageChain | undefined, message: DiagnosticMessage): DiagnosticMessageChain { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + export function assertLessThanOrEqual(a: number, b: number): void { + if (a > b) { + fail(`Expected ${a} <= ${b}`); + } } - return { - messageText: text, - category: message.category, - code: message.code, - - next: details - }; - } - - export function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain { - let lastChain = headChain; - while (lastChain.next) { - lastChain = lastChain.next; + export function assertGreaterThanOrEqual(a: number, b: number): void { + if (a < b) { + fail(`Expected ${a} >= ${b}`); + } } - lastChain.next = tailChain; - return headChain; + export function fail(message?: string, stackCrawlMark?: AnyFunction): never { + debugger; + const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); + if ((Error).captureStackTrace) { + (Error).captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + + export function assertDefined(value: T | null | undefined, message?: string): T { + if (value === undefined || value === null) return fail(message); + return value; + } + + export function assertEachDefined>(value: A, message?: string): A { + for (const v of value) { + assertDefined(v, message); + } + return value; + } + + export function assertNever(member: never, message?: string, stackCrawlMark?: AnyFunction): never { + return fail(message || `Illegal value: ${member}`, stackCrawlMark || assertNever); + } + + export function getFunctionName(func: AnyFunction) { + if (typeof func !== "function") { + return ""; + } + else if (func.hasOwnProperty("name")) { + return (func).name; + } + else { + const text = Function.prototype.toString.call(func); + const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + return match ? match[1] : ""; + } + } } export function equateValues(a: T, b: T) { @@ -1957,50 +1848,11 @@ namespace ts { comparer(a[key], b[key]); } - function getDiagnosticFilePath(diagnostic: Diagnostic): string | undefined { - return diagnostic.file ? diagnostic.file.path : undefined; - } - - export function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison { - return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || - compareValues(d1.start, d2.start) || - compareValues(d1.length, d2.length) || - compareValues(d1.code, d2.code) || - compareMessageText(d1.messageText, d2.messageText) || - Comparison.EqualTo; - } - /** True is greater than false. */ export function compareBooleans(a: boolean, b: boolean): Comparison { return compareValues(a ? 1 : 0, b ? 1 : 0); } - function compareMessageText(t1: string | DiagnosticMessageChain, t2: string | DiagnosticMessageChain): Comparison { - let text1: string | DiagnosticMessageChain | undefined = t1; - let text2: string | DiagnosticMessageChain | undefined = t2; - while (text1 && text2) { - // We still have both chains. - const string1 = isString(text1) ? text1 : text1.messageText; - const string2 = isString(text2) ? text2 : text2.messageText; - - const res = compareStringsCaseSensitive(string1, string2); - if (res) { - return res; - } - - text1 = isString(text1) ? undefined : text1.next; - text2 = isString(text2) ? undefined : text2.next; - } - - if (!text1 && !text2) { - // if the chains are done, then these messages are the same. - return Comparison.EqualTo; - } - - // We still have one chain remaining. The shorter chain should come first. - return text1 ? Comparison.GreaterThan : Comparison.LessThan; - } - /** * Given a name and a list of names that are *not* equal to the name, return a spelling suggestion if there is one that is close enough. * Names less than length 3 only check for case-insensitive equality, not Levenshtein distance. @@ -2098,621 +1950,6 @@ namespace ts { return res > max ? undefined : res; } - export function getEmitScriptTarget(compilerOptions: CompilerOptions) { - return compilerOptions.target || ScriptTarget.ES3; - } - - export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { - return typeof compilerOptions.module === "number" ? - compilerOptions.module : - getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; - } - - export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { - let moduleResolution = compilerOptions.moduleResolution; - if (moduleResolution === undefined) { - moduleResolution = getEmitModuleKind(compilerOptions) === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; - } - return moduleResolution; - } - - export function unreachableCodeIsError(options: CompilerOptions): boolean { - return options.allowUnreachableCode === false; - } - - export function unusedLabelIsError(options: CompilerOptions): boolean { - return options.allowUnusedLabels === false; - } - - export function getAreDeclarationMapsEnabled(options: CompilerOptions) { - return !!(options.declaration && options.declarationMap); - } - - export function getAllowSyntheticDefaultImports(compilerOptions: CompilerOptions) { - const moduleKind = getEmitModuleKind(compilerOptions); - return compilerOptions.allowSyntheticDefaultImports !== undefined - ? compilerOptions.allowSyntheticDefaultImports - : compilerOptions.esModuleInterop - ? moduleKind !== ModuleKind.None && moduleKind < ModuleKind.ES2015 - : moduleKind === ModuleKind.System; - } - - export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean { - return !!(compilerOptions.declaration || compilerOptions.composite); - } - - export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictPropertyInitialization" | "alwaysStrict"; - - export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean { - return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag]; - } - - export function hasZeroOrOneAsteriskCharacter(str: string): boolean { - let seenAsterisk = false; - for (let i = 0; i < str.length; i++) { - if (str.charCodeAt(i) === CharacterCodes.asterisk) { - if (!seenAsterisk) { - seenAsterisk = true; - } - else { - // have already seen asterisk - return false; - } - } - } - return true; - } - - // - // Paths - // - - - /** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - */ - export const directorySeparator = "/"; - const altDirectorySeparator = "\\"; - const urlSchemeSeparator = "://"; - - const backslashRegExp = /\\/g; - - /** - * Normalize path separators. - */ - export function normalizeSlashes(path: string): string { - return path.replace(backslashRegExp, directorySeparator); - } - - function isVolumeCharacter(charCode: number) { - return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || - (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); - } - - function getFileUrlVolumeSeparatorEnd(url: string, start: number) { - const ch0 = url.charCodeAt(start); - if (ch0 === CharacterCodes.colon) return start + 1; - if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { - const ch2 = url.charCodeAt(start + 2); - if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; - } - return -1; - } - - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ - function getEncodedRootLength(path: string): number { - if (!path) return 0; - const ch0 = path.charCodeAt(0); - - // POSIX or UNC - if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { - if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") - - const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) return path.length; // UNC: "//server" or "\\server" - - return p1 + 1; // UNC: "//server/" or "\\server\" - } - - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { - const ch2 = path.charCodeAt(2); - if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") - } - - // URL - const schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - const authorityStart = schemeEnd + urlSchemeSeparator.length; - const authorityEnd = path.indexOf(directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - const scheme = path.slice(0, schemeEnd); - const authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - - // relative - return 0; - } - - /** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - */ - export function getRootLength(path: string) { - const rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - - // TODO(rbuckton): replace references with `resolvePath` - export function normalizePath(path: string): string { - return resolvePath(path); - } - - export function normalizePathAndParts(path: string): { path: string, parts: string[] } { - path = normalizeSlashes(path); - const [root, ...parts] = reducePathComponents(getPathComponents(path)); - if (parts.length) { - const joinedParts = root + parts.join(directorySeparator); - return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts }; - } - else { - return { path: root, parts }; - } - } - - /** - * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` - * except that we support URL's as well. - * - * ```ts - * getDirectoryPath("/path/to/file.ext") === "/path/to" - * getDirectoryPath("/path/to/") === "/path" - * getDirectoryPath("/") === "/" - * ``` - */ - export function getDirectoryPath(path: Path): Path; - /** - * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` - * except that we support URL's as well. - * - * ```ts - * getDirectoryPath("/path/to/file.ext") === "/path/to" - * getDirectoryPath("/path/to/") === "/path" - * getDirectoryPath("/") === "/" - * ``` - */ - export function getDirectoryPath(path: string): string; - export function getDirectoryPath(path: string): string { - path = normalizeSlashes(path); - - // If the path provided is itself the root, then return it. - const rootLength = getRootLength(path); - if (rootLength === path.length) return path; - - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator))); - } - - export function isUrl(path: string) { - return getEncodedRootLength(path) < 0; - } - - export function pathIsRelative(path: string): boolean { - return /^\.\.?($|[\\/])/.test(path); - } - - /** - * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - */ - export function isRootedDiskPath(path: string) { - return getEncodedRootLength(path) > 0; - } - - /** - * Determines whether a path consists only of a path root. - */ - export function isDiskPathRoot(path: string) { - const rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - - export function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - } - - function pathComponents(path: string, rootLength: number) { - const root = path.substring(0, rootLength); - const rest = path.substring(rootLength).split(directorySeparator); - if (rest.length && !lastOrUndefined(rest)) rest.pop(); - return [root, ...rest]; - } - - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - export function getPathComponents(path: string, currentDirectory = "") { - path = combinePaths(currentDirectory, path); - const rootLength = getRootLength(path); - return pathComponents(path, rootLength); - } - - /** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - */ - export function reducePathComponents(components: ReadonlyArray) { - if (!some(components)) return []; - const reduced = [components[0]]; - for (let i = 1; i < components.length; i++) { - const component = components[i]; - if (!component) continue; - if (component === ".") continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) continue; - } - reduced.push(component); - } - return reduced; - } - - /** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - */ - export function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - - export function getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - - /** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - */ - export function getPathFromPathComponents(pathComponents: ReadonlyArray) { - if (pathComponents.length === 0) return ""; - - const root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); - if (pathComponents.length === 1) return root; - - return root + pathComponents.slice(1).join(directorySeparator); - } - - function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { - const fromComponents = reducePathComponents(getPathComponents(from)); - const toComponents = reducePathComponents(getPathComponents(to)); - - let start: number; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - const fromComponent = getCanonicalFileName(fromComponents[start]); - const toComponent = getCanonicalFileName(toComponents[start]); - const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) break; - } - - if (start === 0) { - return toComponents; - } - - const components = toComponents.slice(start); - const relative: string[] = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return ["", ...relative, ...components]; - } - - export function getRelativePathFromFile(from: string, to: string, getCanonicalFileName: GetCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); - } - - /** - * Gets a relative path that can be used to traverse between `from` and `to`. - */ - export function getRelativePathFromDirectory(from: string, to: string, ignoreCase: boolean): string; - /** - * Gets a relative path that can be used to traverse between `from` and `to`. - */ - // tslint:disable-next-line:unified-signatures - export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileName: GetCanonicalFileName): string; - export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileNameOrIgnoreCase: GetCanonicalFileName | boolean) { - Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity; - const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - const pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName); - return getPathFromPathComponents(pathComponents); - } - - export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: GetCanonicalFileName, isAbsolutePathAnUrl: boolean) { - const pathComponents = getPathComponentsRelativeTo( - resolvePath(currentDirectory, directoryPathOrUrl), - resolvePath(currentDirectory, relativeOrAbsolutePath), - equateStringsCaseSensitive, - getCanonicalFileName - ); - - const firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { - const prefix = firstComponent.charAt(0) === directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - - return getPathFromPathComponents(pathComponents); - } - - /** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - */ - export function ensurePathIsNonModuleName(path: string): string { - return getRootLength(path) === 0 && !pathIsRelative(path) ? "./" + path : path; - } - - /** - * Returns the path except for its containing directory name. - * Semantics align with NodeJS's `path.basename` except that we support URL's as well. - * - * ```ts - * getBaseFileName("/path/to/file.ext") === "file.ext" - * getBaseFileName("/path/to/") === "to" - * getBaseFileName("/") === "" - * ``` - */ - export function getBaseFileName(path: string): string; - /** - * Gets the portion of a path following the last (non-terminal) separator (`/`). - * Semantics align with NodeJS's `path.basename` except that we support URL's as well. - * If the base name has any one of the provided extensions, it is removed. - * - * ```ts - * getBaseFileName("/path/to/file.ext", ".ext", true) === "file" - * getBaseFileName("/path/to/file.js", ".ext", true) === "file.js" - * ``` - */ - export function getBaseFileName(path: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; - export function getBaseFileName(path: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean) { - path = normalizeSlashes(path); - - // if the path provided is itself the root, then it has not file name. - const rootLength = getRootLength(path); - if (rootLength === path.length) return ""; - - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1)); - const extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; - } - - /** - * Combines paths. If a path is absolute, it replaces any previous path. - */ - export function combinePaths(path: string, ...paths: (string | undefined)[]): string { - if (path) path = normalizeSlashes(path); - for (let relativePath of paths) { - if (!relativePath) continue; - relativePath = normalizeSlashes(relativePath); - if (!path || getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - - /** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. - */ - export function resolvePath(path: string, ...paths: (string | undefined)[]): string { - const combined = some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path); - const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(combined))); - return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - - /** - * Determines whether a path has a trailing separator (`/` or `\\`). - */ - export function hasTrailingDirectorySeparator(path: string) { - if (path.length === 0) return false; - const ch = path.charCodeAt(path.length - 1); - return ch === CharacterCodes.slash || ch === CharacterCodes.backslash; - } - - /** - * Removes a trailing directory separator from a path. - * @param path The path. - */ - export function removeTrailingDirectorySeparator(path: Path): Path; - export function removeTrailingDirectorySeparator(path: string): string; - export function removeTrailingDirectorySeparator(path: string) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - - return path; - } - - /** - * Adds a trailing directory separator to a path, if it does not already have one. - * @param path The path. - */ - export function ensureTrailingDirectorySeparator(path: Path): Path; - export function ensureTrailingDirectorySeparator(path: string): string; - export function ensureTrailingDirectorySeparator(path: string) { - if (!hasTrailingDirectorySeparator(path)) { - return path + directorySeparator; - } - - return path; - } - - function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { - if (a === b) return Comparison.EqualTo; - if (a === undefined) return Comparison.LessThan; - if (b === undefined) return Comparison.GreaterThan; - const aComponents = reducePathComponents(getPathComponents(a)); - const bComponents = reducePathComponents(getPathComponents(b)); - const sharedLength = Math.min(aComponents.length, bComponents.length); - for (let i = 0; i < sharedLength; i++) { - const stringComparer = i === 0 ? compareStringsCaseInsensitive : componentComparer; - const result = stringComparer(aComponents[i], bComponents[i]); - if (result !== Comparison.EqualTo) { - return result; - } - } - return compareValues(aComponents.length, bComponents.length); - } - - /** - * Performs a case-sensitive comparison of two paths. - */ - export function comparePathsCaseSensitive(a: string, b: string) { - return comparePathsWorker(a, b, compareStringsCaseSensitive); - } - - /** - * Performs a case-insensitive comparison of two paths. - */ - export function comparePathsCaseInsensitive(a: string, b: string) { - return comparePathsWorker(a, b, compareStringsCaseInsensitive); - } - - export function comparePaths(a: string, b: string, ignoreCase?: boolean): Comparison; - export function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison; - export function comparePaths(a: string, b: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, getStringComparer(ignoreCase)); - } - - export function containsPath(parent: string, child: string, ignoreCase?: boolean): boolean; - export function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean; - export function containsPath(parent: string, child: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) return false; - if (parent === child) return true; - const parentComponents = reducePathComponents(getPathComponents(parent)); - const childComponents = reducePathComponents(getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - - const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive; - for (let i = 0; i < parentComponents.length; i++) { - const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - - return true; - } - - export function startsWith(str: string, prefix: string): boolean { - return str.lastIndexOf(prefix, 0) === 0; - } - - export function removePrefix(str: string, prefix: string): string { - return startsWith(str, prefix) ? str.substr(prefix.length) : str; - } - - export function tryRemovePrefix(str: string, prefix: string): string | undefined { - return startsWith(str, prefix) ? str.substring(prefix.length) : undefined; - } - - export function tryRemoveDirectoryPrefix(path: string, dirPath: string): string | undefined { - const a = tryRemovePrefix(path, dirPath); - if (a === undefined) return undefined; - switch (a.charCodeAt(0)) { - case CharacterCodes.slash: - case CharacterCodes.backslash: - return a.slice(1); - default: - return undefined; - } - } - export function endsWith(str: string, suffix: string): boolean { const expectedPos = str.length - suffix.length; return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; @@ -2730,10 +1967,6 @@ namespace ts { return str.indexOf(substring) !== -1; } - export function hasExtension(fileName: string): boolean { - return stringContains(getBaseFileName(fileName), "."); - } - export function fileExtensionIs(path: string, extension: string): boolean { return path.length > extension.length && endsWith(path, extension); } @@ -2748,462 +1981,6 @@ namespace ts { return false; } - // Reserved characters, forces escaping of any non-word (or digit), non-whitespace character. - // It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future - // proof. - const reservedCharacterPattern = /[^\w\s\/]/g; - const wildcardCharCodes = [CharacterCodes.asterisk, CharacterCodes.question]; - - export const commonPackageFolders: ReadonlyArray = ["node_modules", "bower_components", "jspm_packages"]; - - const implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; - - interface WildcardMatcher { - singleAsteriskRegexFragment: string; - doubleAsteriskRegexFragment: string; - replaceWildcardCharacter: (match: string) => string; - } - - const filesMatcher: WildcardMatcher = { - /** - * Matches any single directory segment unless it is the last segment and a .min.js file - * Breakdown: - * [^./] # matches everything up to the first . character (excluding directory separators) - * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension - */ - singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", - /** - * Regex for the ** wildcard. Matches any number of subdirectories. When used for including - * files or directories, does not match subdirectories that start with a . character - */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, - replaceWildcardCharacter: match => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment) - }; - - const directoriesMatcher: WildcardMatcher = { - singleAsteriskRegexFragment: "[^/]*", - /** - * Regex for the ** wildcard. Matches any number of subdirectories. When used for including - * files or directories, does not match subdirectories that start with a . character - */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, - replaceWildcardCharacter: match => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment) - }; - - const excludeMatcher: WildcardMatcher = { - singleAsteriskRegexFragment: "[^/]*", - doubleAsteriskRegexFragment: "(/.+?)?", - replaceWildcardCharacter: match => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment) - }; - - const wildcardMatchers = { - files: filesMatcher, - directories: directoriesMatcher, - exclude: excludeMatcher - }; - - export function getRegularExpressionForWildcard(specs: ReadonlyArray | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined { - const patterns = getRegularExpressionsForWildcards(specs, basePath, usage); - if (!patterns || !patterns.length) { - return undefined; - } - - const pattern = patterns.map(pattern => `(${pattern})`).join("|"); - // If excluding, match "foo/bar/baz...", but if including, only allow "foo". - const terminator = usage === "exclude" ? "($|/)" : "$"; - return `^(${pattern})${terminator}`; - } - - function getRegularExpressionsForWildcards(specs: ReadonlyArray | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string[] | undefined { - if (specs === undefined || specs.length === 0) { - return undefined; - } - - return flatMap(specs, spec => - spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage])); - } - - /** - * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, - * and does not contain any glob characters itself. - */ - export function isImplicitGlob(lastPathComponent: string): boolean { - return !/[.*?]/.test(lastPathComponent); - } - - function getSubPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude", { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter }: WildcardMatcher): string | undefined { - let subpattern = ""; - let hasWrittenComponent = false; - const components = getNormalizedPathComponents(spec, basePath); - const lastComponent = last(components); - if (usage !== "exclude" && lastComponent === "**") { - return undefined; - } - - // getNormalizedPathComponents includes the separator for the root component. - // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); - - if (isImplicitGlob(lastComponent)) { - components.push("**", "*"); - } - - let optionalCount = 0; - for (let component of components) { - if (component === "**") { - subpattern += doubleAsteriskRegexFragment; - } - else { - if (usage === "directories") { - subpattern += "("; - optionalCount++; - } - - if (hasWrittenComponent) { - subpattern += directorySeparator; - } - - if (usage !== "exclude") { - let componentPattern = ""; - // The * and ? wildcards should not match directories or files that start with . if they - // appear first in a component. Dotted directories and files can be included explicitly - // like so: **/.*/.* - if (component.charCodeAt(0) === CharacterCodes.asterisk) { - componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?"; - component = component.substr(1); - } - else if (component.charCodeAt(0) === CharacterCodes.question) { - componentPattern += "[^./]"; - component = component.substr(1); - } - - componentPattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); - - // Patterns should not include subfolders like node_modules unless they are - // explicitly included as part of the path. - // - // As an optimization, if the component pattern is the same as the component, - // then there definitely were no wildcard characters and we do not need to - // add the exclusion pattern. - if (componentPattern !== component) { - subpattern += implicitExcludePathRegexPattern; - } - - subpattern += componentPattern; - } - else { - subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); - } - } - - hasWrittenComponent = true; - } - - while (optionalCount > 0) { - subpattern += ")?"; - optionalCount--; - } - - return subpattern; - } - - function replaceWildcardCharacter(match: string, singleAsteriskRegexFragment: string) { - return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; - } - - export interface FileSystemEntries { - readonly files: ReadonlyArray; - readonly directories: ReadonlyArray; - } - - export interface FileMatcherPatterns { - /** One pattern for each "include" spec. */ - includeFilePatterns: ReadonlyArray | undefined; - /** One pattern matching one of any of the "include" specs. */ - includeFilePattern: string | undefined; - includeDirectoryPattern: string | undefined; - excludePattern: string | undefined; - basePaths: ReadonlyArray; - } - - /** @param path directory of the tsconfig.json */ - export function getFileMatcherPatterns(path: string, excludes: ReadonlyArray | undefined, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string): FileMatcherPatterns { - path = normalizePath(path); - currentDirectory = normalizePath(currentDirectory); - const absolutePath = combinePaths(currentDirectory, path); - - return { - includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), pattern => `^${pattern}$`), - includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), - includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), - excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) - }; - } - - export function getRegexFromPattern(pattern: string, useCaseSensitiveFileNames: boolean): RegExp { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); - } - - /** @param path directory of the tsconfig.json */ - export function matchFiles(path: string, extensions: ReadonlyArray | undefined, excludes: ReadonlyArray | undefined, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string, depth: number | undefined, getFileSystemEntries: (path: string) => FileSystemEntries): string[] { - path = normalizePath(path); - currentDirectory = normalizePath(currentDirectory); - - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(pattern => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); - - // Associate an array of results with each include regex. This keeps results in order of the "include" order. - // If there are no "includes", then just put everything in results[0]. - const results: string[][] = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; - - for (const basePath of patterns.basePaths) { - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); - } - - return flatten(results); - - function visitDirectory(path: string, absolutePath: string, depth: number | undefined) { - const { files, directories } = getFileSystemEntries(path); - - for (const current of sort(files, compareStringsCaseSensitive)) { - const name = combinePaths(path, current); - const absoluteName = combinePaths(absolutePath, current); - if (extensions && !fileExtensionIsOneOf(name, extensions)) continue; - if (excludeRegex && excludeRegex.test(absoluteName)) continue; - if (!includeFileRegexes) { - results[0].push(name); - } - else { - const includeIndex = findIndex(includeFileRegexes, re => re.test(absoluteName)); - if (includeIndex !== -1) { - results[includeIndex].push(name); - } - } - } - - if (depth !== undefined) { - depth--; - if (depth === 0) { - return; - } - } - - for (const current of sort(directories, compareStringsCaseSensitive)) { - const name = combinePaths(path, current); - const absoluteName = combinePaths(absolutePath, current); - if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && - (!excludeRegex || !excludeRegex.test(absoluteName))) { - visitDirectory(name, absoluteName, depth); - } - } - } - } - - /** - * Computes the unique non-wildcard base paths amongst the provided include patterns. - */ - function getBasePaths(path: string, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean): string[] { - // Storage for our results in the form of literal paths (e.g. the paths as written by the user). - const basePaths: string[] = [path]; - - if (includes) { - // Storage for literal base paths amongst the include patterns. - const includeBasePaths: string[] = []; - for (const include of includes) { - // We also need to check the relative paths by converting them to absolute and normalizing - // in case they escape the base path (e.g "..\somedirectory") - const absolute: string = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); - // Append the literal and canonical candidate base paths. - includeBasePaths.push(getIncludeBasePath(absolute)); - } - - // Sort the offsets array using either the literal or canonical path representations. - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); - - // Iterate over each include base path and include unique base paths that are not a - // subpath of an existing base path - for (const includeBasePath of includeBasePaths) { - if (every(basePaths, basePath => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { - basePaths.push(includeBasePath); - } - } - } - - return basePaths; - } - - function getIncludeBasePath(absolute: string): string { - const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); - if (wildcardOffset < 0) { - // No "*" or "?" in the path - return !hasExtension(absolute) - ? absolute - : removeTrailingDirectorySeparator(getDirectoryPath(absolute)); - } - return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset)); - } - - export function ensureScriptKind(fileName: string, scriptKind: ScriptKind | undefined): ScriptKind { - // Using scriptKind as a condition handles both: - // - 'scriptKind' is unspecified and thus it is `undefined` - // - 'scriptKind' is set and it is `Unknown` (0) - // If the 'scriptKind' is 'undefined' or 'Unknown' then we attempt - // to get the ScriptKind from the file name. If it cannot be resolved - // from the file name then the default 'TS' script kind is returned. - return scriptKind || getScriptKindFromFileName(fileName) || ScriptKind.TS; - } - - export function getScriptKindFromFileName(fileName: string): ScriptKind { - const ext = fileName.substr(fileName.lastIndexOf(".")); - switch (ext.toLowerCase()) { - case Extension.Js: - return ScriptKind.JS; - case Extension.Jsx: - return ScriptKind.JSX; - case Extension.Ts: - return ScriptKind.TS; - case Extension.Tsx: - return ScriptKind.TSX; - case Extension.Json: - return ScriptKind.JSON; - default: - return ScriptKind.Unknown; - } - } - - /** - * List of supported extensions in order of file resolution precedence. - */ - export const supportedTypeScriptExtensions: ReadonlyArray = [Extension.Ts, Extension.Tsx, Extension.Dts]; - /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */ - export const supportedTypescriptExtensionsForExtractExtension: ReadonlyArray = [Extension.Dts, Extension.Ts, Extension.Tsx]; - export const supportedJavascriptExtensions: ReadonlyArray = [Extension.Js, Extension.Jsx]; - const allSupportedExtensions: ReadonlyArray = [...supportedTypeScriptExtensions, ...supportedJavascriptExtensions]; - - export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: ReadonlyArray): ReadonlyArray { - const needJsExtensions = options && options.allowJs; - - if (!extraFileExtensions || extraFileExtensions.length === 0) { - return needJsExtensions ? allSupportedExtensions : supportedTypeScriptExtensions; - } - - const extensions = [ - ...needJsExtensions ? allSupportedExtensions : supportedTypeScriptExtensions, - ...mapDefined(extraFileExtensions, x => x.scriptKind === ScriptKind.Deferred || needJsExtensions && isJavaScriptLike(x.scriptKind) ? x.extension : undefined) - ]; - - return deduplicate(extensions, equateStringsCaseSensitive, compareStringsCaseSensitive); - } - - function isJavaScriptLike(scriptKind: ScriptKind | undefined): boolean { - return scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSX; - } - - export function hasJavaScriptFileExtension(fileName: string): boolean { - return some(supportedJavascriptExtensions, extension => fileExtensionIs(fileName, extension)); - } - - export function hasTypeScriptFileExtension(fileName: string): boolean { - return some(supportedTypeScriptExtensions, extension => fileExtensionIs(fileName, extension)); - } - - export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions, extraFileExtensions?: ReadonlyArray) { - if (!fileName) { return false; } - - for (const extension of getSupportedExtensions(compilerOptions, extraFileExtensions)) { - if (fileExtensionIs(fileName, extension)) { - return true; - } - } - return false; - } - - /** - * Extension boundaries by priority. Lower numbers indicate higher priorities, and are - * aligned to the offset of the highest priority extension in the - * allSupportedExtensions array. - */ - export const enum ExtensionPriority { - TypeScriptFiles = 0, - DeclarationAndJavaScriptFiles = 2, - - Highest = TypeScriptFiles, - Lowest = DeclarationAndJavaScriptFiles, - } - - export function getExtensionPriority(path: string, supportedExtensions: ReadonlyArray): ExtensionPriority { - for (let i = supportedExtensions.length - 1; i >= 0; i--) { - if (fileExtensionIs(path, supportedExtensions[i])) { - return adjustExtensionPriority(i, supportedExtensions); - } - } - - // If its not in the list of supported extensions, this is likely a - // TypeScript file with a non-ts extension - return ExtensionPriority.Highest; - } - - /** - * Adjusts an extension priority to be the highest priority within the same range. - */ - export function adjustExtensionPriority(extensionPriority: ExtensionPriority, supportedExtensions: ReadonlyArray): ExtensionPriority { - if (extensionPriority < ExtensionPriority.DeclarationAndJavaScriptFiles) { - return ExtensionPriority.TypeScriptFiles; - } - else if (extensionPriority < supportedExtensions.length) { - return ExtensionPriority.DeclarationAndJavaScriptFiles; - } - else { - return supportedExtensions.length; - } - } - - /** - * Gets the next lowest extension priority for a given priority. - */ - export function getNextLowestExtensionPriority(extensionPriority: ExtensionPriority, supportedExtensions: ReadonlyArray): ExtensionPriority { - if (extensionPriority < ExtensionPriority.DeclarationAndJavaScriptFiles) { - return ExtensionPriority.DeclarationAndJavaScriptFiles; - } - else { - return supportedExtensions.length; - } - } - - const extensionsToRemove = [Extension.Dts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; - export function removeFileExtension(path: string): string { - for (const ext of extensionsToRemove) { - const extensionless = tryRemoveExtension(path, ext); - if (extensionless !== undefined) { - return extensionless; - } - } - return path; - } - - export function tryRemoveExtension(path: string, extension: string): string | undefined { - return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined; - } - - export function removeExtension(path: string, extension: string): string { - return path.substring(0, path.length - extension.length); - } - - export function changeExtension(path: T, newExtension: string): T { - return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); - } - - export function changeAnyExtension(path: string, ext: string): string; - export function changeAnyExtension(path: string, ext: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; - export function changeAnyExtension(path: string, ext: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean) { - const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path; - } - /** * Takes a string like "jquery-min.4.2.3" and returns "jquery" */ @@ -3215,181 +1992,6 @@ namespace ts { return fileName.replace(trailingMinOrVersion, "").replace(trailingMinOrVersion, ""); } - export interface ObjectAllocator { - getNodeConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Node; - getTokenConstructor(): new (kind: TKind, pos?: number, end?: number) => Token; - getIdentifierConstructor(): new (kind: SyntaxKind.Identifier, pos?: number, end?: number) => Identifier; - getSourceFileConstructor(): new (kind: SyntaxKind.SourceFile, pos?: number, end?: number) => SourceFile; - getSymbolConstructor(): new (flags: SymbolFlags, name: __String) => Symbol; - getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type; - getSignatureConstructor(): new (checker: TypeChecker) => Signature; - getSourceMapSourceConstructor(): new (fileName: string, text: string, skipTrivia?: (pos: number) => number) => SourceMapSource; - } - - function Symbol(this: Symbol, flags: SymbolFlags, name: __String) { - this.flags = flags; - this.escapedName = name; - this.declarations = undefined!; - this.valueDeclaration = undefined!; - this.id = undefined; - this.mergeId = undefined; - this.parent = undefined; - } - - function Type(this: Type, checker: TypeChecker, flags: TypeFlags) { - this.flags = flags; - if (Debug.isDebugging) { - this.checker = checker; - } - } - - function Signature() {} // tslint:disable-line no-empty - - function Node(this: Node, kind: SyntaxKind, pos: number, end: number) { - this.pos = pos; - this.end = end; - this.kind = kind; - this.id = 0; - this.flags = NodeFlags.None; - this.modifierFlagsCache = ModifierFlags.None; - this.transformFlags = TransformFlags.None; - this.parent = undefined!; - this.original = undefined; - } - - function SourceMapSource(this: SourceMapSource, fileName: string, text: string, skipTrivia?: (pos: number) => number) { - this.fileName = fileName; - this.text = text; - this.skipTrivia = skipTrivia || (pos => pos); - } - - export let objectAllocator: ObjectAllocator = { - getNodeConstructor: () => Node, - getTokenConstructor: () => Node, - getIdentifierConstructor: () => Node, - getSourceFileConstructor: () => Node, - getSymbolConstructor: () => Symbol, - getTypeConstructor: () => Type, - getSignatureConstructor: () => Signature, - getSourceMapSourceConstructor: () => SourceMapSource, - }; - - export const enum AssertionLevel { - None = 0, - Normal = 1, - Aggressive = 2, - VeryAggressive = 3, - } - - /** - * Safer version of `Function` which should not be called. - * Every function should be assignable to this, but this should not be assignable to every function. - */ - export type AnyFunction = (...args: never[]) => void; - - export namespace Debug { - export let currentAssertionLevel = AssertionLevel.None; - export let isDebugging = false; - - export function shouldAssert(level: AssertionLevel): boolean { - return currentAssertionLevel >= level; - } - - export function assert(expression: boolean, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): void { - if (!expression) { - if (verboseDebugInfo) { - message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); - } - fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert); - } - } - - export function assertEqual(a: T, b: T, msg?: string, msg2?: string): void { - if (a !== b) { - const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; - fail(`Expected ${a} === ${b}. ${message}`); - } - } - - export function assertLessThan(a: number, b: number, msg?: string): void { - if (a >= b) { - fail(`Expected ${a} < ${b}. ${msg || ""}`); - } - } - - export function assertLessThanOrEqual(a: number, b: number): void { - if (a > b) { - fail(`Expected ${a} <= ${b}`); - } - } - - export function assertGreaterThanOrEqual(a: number, b: number): void { - if (a < b) { - fail(`Expected ${a} >= ${b}`); - } - } - - export function fail(message?: string, stackCrawlMark?: AnyFunction): never { - debugger; - const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); - if ((Error).captureStackTrace) { - (Error).captureStackTrace(e, stackCrawlMark || fail); - } - throw e; - } - - export function assertDefined(value: T | null | undefined, message?: string): T { - if (value === undefined || value === null) return fail(message); - return value; - } - - export function assertEachDefined>(value: A, message?: string): A { - for (const v of value) { - assertDefined(v, message); - } - return value; - } - - export function assertNever(member: never, message?: string, stackCrawlMark?: AnyFunction): never { - return fail(message || `Illegal value: ${member}`, stackCrawlMark || assertNever); - } - - export function getFunctionName(func: AnyFunction) { - if (typeof func !== "function") { - return ""; - } - else if (func.hasOwnProperty("name")) { - return (func).name; - } - else { - const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); - return match ? match[1] : ""; - } - } - - export function showSymbol(symbol: Symbol): string { - const symbolFlags = (ts as any).SymbolFlags; - return `{ flags: ${symbolFlags ? showFlags(symbol.flags, symbolFlags) : symbol.flags}; declarations: ${map(symbol.declarations, showSyntaxKind)} }`; - } - - function showFlags(flags: number, flagsEnum: { [flag: number]: string }): string { - const out: string[] = []; - for (let pow = 0; pow <= 30; pow++) { - const n = 1 << pow; - if (flags & n) { - out.push(flagsEnum[n]); - } - } - return out.join("|"); - } - - export function showSyntaxKind(node: Node): string { - const syntaxKind = (ts as any).SyntaxKind; - return syntaxKind ? syntaxKind[node.kind] : node.kind.toString(); - } - } - /** Remove an item from an array, moving everything to its right one space left. */ export function orderedRemoveItem(array: T[], item: T): boolean { for (let i = 0; i < array.length; i++) { @@ -3437,25 +2039,11 @@ namespace ts { return useCaseSensitiveFileNames ? identity : toLowerCase; } - /** - * patternStrings contains both pattern strings (containing "*") and regular strings. - * Return an exact match if possible, or a pattern match, or undefined. - * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.) - */ - export function matchPatternOrExact(patternStrings: ReadonlyArray, candidate: string): string | Pattern | undefined { - const patterns: Pattern[] = []; - for (const patternString of patternStrings) { - const pattern = tryParsePattern(patternString); - if (pattern) { - patterns.push(pattern); - } - else if (patternString === candidate) { - // pattern was matched as is - no need to search further - return patternString; - } - } - - return findBestPatternMatch(patterns, _ => _, candidate); + /** Represents a "prefix*suffix" pattern. */ + /* @internal */ + export interface Pattern { + prefix: string; + suffix: string; } export function patternText({ prefix, suffix }: Pattern): string { @@ -3488,94 +2076,25 @@ namespace ts { return matchedValue; } + export function startsWith(str: string, prefix: string): boolean { + return str.lastIndexOf(prefix, 0) === 0; + } + + export function removePrefix(str: string, prefix: string): string { + return startsWith(str, prefix) ? str.substr(prefix.length) : str; + } + + export function tryRemovePrefix(str: string, prefix: string): string | undefined { + return startsWith(str, prefix) ? str.substring(prefix.length) : undefined; + } + + function isPatternMatch({ prefix, suffix }: Pattern, candidate: string) { return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix); } - export function tryParsePattern(pattern: string): Pattern | undefined { - // This should be verified outside of here and a proper error thrown. - Debug.assert(hasZeroOrOneAsteriskCharacter(pattern)); - const indexOfStar = pattern.indexOf("*"); - return indexOfStar === -1 ? undefined : { - prefix: pattern.substr(0, indexOfStar), - suffix: pattern.substr(indexOfStar + 1) - }; - } - - export function positionIsSynthesized(pos: number): boolean { - // This is a fast way of testing the following conditions: - // pos === undefined || pos === null || isNaN(pos) || pos < 0; - return !(pos >= 0); - } - - /** True if an extension is one of the supported TypeScript extensions. */ - export function extensionIsTypeScript(ext: Extension): boolean { - return ext === Extension.Ts || ext === Extension.Tsx || ext === Extension.Dts; - } - - export function resolutionExtensionIsTypeScriptOrJson(ext: Extension) { - return extensionIsTypeScript(ext) || ext === Extension.Json; - } - - /** - * Gets the extension from a path. - * Path must have a valid extension. - */ - export function extensionFromPath(path: string): Extension { - const ext = tryGetExtensionFromPath(path); - return ext !== undefined ? ext : Debug.fail(`File ${path} has unknown extension.`); - } - - export function isAnySupportedFileExtension(path: string): boolean { - return tryGetExtensionFromPath(path) !== undefined; - } - - export function tryGetExtensionFromPath(path: string): Extension | undefined { - return find(supportedTypescriptExtensionsForExtractExtension, e => fileExtensionIs(path, e)) || find(supportedJavascriptExtensions, e => fileExtensionIs(path, e)); - } - - function getAnyExtensionFromPathWorker(path: string, extensions: string | ReadonlyArray, stringEqualityComparer: (a: string, b: string) => boolean) { - if (typeof extensions === "string") extensions = [extensions]; - for (let extension of extensions) { - if (!startsWith(extension, ".")) extension = "." + extension; - if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { - const pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - return ""; - } - - /** - * Gets the file extension for a path. - */ - export function getAnyExtensionFromPath(path: string): string; - /** - * Gets the file extension for a path, provided it is one of the provided extensions. - */ - export function getAnyExtensionFromPath(path: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; - export function getAnyExtensionFromPath(path: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean): string { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive); - } - const baseFileName = getBaseFileName(path); - const extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - - export function isCheckJsEnabledForFile(sourceFile: SourceFile, compilerOptions: CompilerOptions) { - return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; - } - export function and(f: (arg: T) => boolean, g: (arg: T) => boolean) { return (arg: T) => f(arg) && g(arg); } @@ -3586,11 +2105,6 @@ namespace ts { export function assertTypeIsNever(_: never): void { } // tslint:disable-line no-empty - export const emptyFileSystemEntries: FileSystemEntries = { - files: emptyArray, - directories: emptyArray - }; - export function singleElementArray(t: T | undefined): T[] | undefined { return t === undefined ? undefined : [t]; } diff --git a/src/compiler/performance.ts b/src/core/performance.ts similarity index 100% rename from src/compiler/performance.ts rename to src/core/performance.ts diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json new file mode 100644 index 00000000000..087aeb81a3a --- /dev/null +++ b/src/core/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/core.js" + }, + "files": [ + "performance.ts", + "core.ts" + ], + "references": [ ] +} diff --git a/src/server/client.ts b/src/harness/client.ts similarity index 100% rename from src/server/client.ts rename to src/harness/client.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 532ce5e0488..86c83bd73e2 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1,30 +1,16 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// -/// -/// -/// -/// - namespace FourSlash { ts.disableIncrementalParsing = false; import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; + export const enum FourSlashTestType { + Native, + Shims, + ShimsWithPreprocess, + Server + } + + // Represents a parsed source file with metadata interface FourSlashFile { // The contents of the file (with markers, etc stripped out) @@ -1317,7 +1303,7 @@ Actual: ${stringify(fullActual)}`); } private testDiagnostics(expected: ReadonlyArray, diagnostics: ReadonlyArray, category: string) { - assert.deepEqual(ts.realizeDiagnostics(diagnostics, ts.newLineCharacter), expected.map((e): ts.RealizedDiagnostic => ({ + assert.deepEqual(ts.realizeDiagnostics(diagnostics, "\n"), expected.map((e): ts.RealizedDiagnostic => ({ message: e.message, category, code: e.code, diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d325883fc11..f86892648c1 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1,31 +1,3 @@ - -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// - - // Block scoped definitions work poorly for global variables, temporarily enable var /* tslint:disable:no-var-keyword */ diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index b2f24175e29..bb476ee699a 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - namespace Harness.LanguageService { export class ScriptInfo { public version = 1; diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index 1e55b3e1a64..236289cb7bb 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -1,9 +1,3 @@ -/// -/// -/// -/// -/// - interface FileInformation { contents?: string; contentsPath?: string; diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts index 0804c281200..9a62da6bb6f 100644 --- a/src/harness/sourceMapRecorder.ts +++ b/src/harness/sourceMapRecorder.ts @@ -1,20 +1,3 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - namespace Harness.SourceMapRecorder { interface SourceMapSpanWithDecodeErrors { diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index a62975b0300..99c36e7f01e 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../tsconfig-base", "compilerOptions": { - "removeComments": false, - "outFile": "../../built/local/run.js", - "declaration": false, + "outFile": "../built/local/harness.js", "types": [ "node", "mocha", "chai" ], @@ -12,138 +10,16 @@ "scripthost" ] }, + "references": [ + { "path": "../core" }, + { "path": "../parser" }, + { "path": "../compiler" }, + { "path": "../services" }, + { "path": "../server" }, + { "path": "../typingsInstallerCore" }, + ], + "files": [ - "../compiler/types.ts", - "../compiler/performance.ts", - "../compiler/core.ts", - "../compiler/sys.ts", - "../compiler/diagnosticInformationMap.generated.ts", - "../compiler/scanner.ts", - "../compiler/utilities.ts", - "../compiler/parser.ts", - "../compiler/binder.ts", - "../compiler/symbolWalker.ts", - "../compiler/moduleNameResolver.ts", - "../compiler/checker.ts", - "../compiler/factory.ts", - "../compiler/visitor.ts", - "../compiler/transformers/utilities.ts", - "../compiler/transformers/destructuring.ts", - "../compiler/transformers/ts.ts", - "../compiler/transformers/es2017.ts", - "../compiler/transformers/esnext.ts", - "../compiler/transformers/jsx.ts", - "../compiler/transformers/es2016.ts", - "../compiler/transformers/es2015.ts", - "../compiler/transformers/es5.ts", - "../compiler/transformers/generators.ts", - "../compiler/transformers/module/module.ts", - "../compiler/transformers/module/system.ts", - "../compiler/transformers/module/es2015.ts", - "../compiler/transformers/declarations/diagnostics.ts", - "../compiler/transformers/declarations.ts", - "../compiler/transformer.ts", - "../compiler/sourcemap.ts", - "../compiler/comments.ts", - "../compiler/emitter.ts", - "../compiler/watchUtilities.ts", - "../compiler/program.ts", - "../compiler/builderState.ts", - "../compiler/builder.ts", - "../compiler/resolutionCache.ts", - "../compiler/moduleSpecifiers.ts", - "../compiler/watch.ts", - "../compiler/tsbuild.ts", - "../compiler/commandLineParser.ts", - - "../services/types.ts", - "../services/utilities.ts", - "../services/classifier.ts", - "../services/pathCompletions.ts", - "../services/completions.ts", - "../services/documentHighlights.ts", - "../services/documentRegistry.ts", - "../services/importTracker.ts", - "../services/findAllReferences.ts", - "../services/getEditsForFileRename.ts", - "../services/goToDefinition.ts", - "../services/jsDoc.ts", - "../services/semver.ts", - "../services/jsTyping.ts", - "../services/navigateTo.ts", - "../services/navigationBar.ts", - "../services/organizeImports.ts", - "../services/getEditsForFileRename.ts", - "../services/outliningElementsCollector.ts", - "../services/patternMatcher.ts", - "../services/preProcess.ts", - "../services/rename.ts", - "../services/signatureHelp.ts", - "../services/suggestionDiagnostics.ts", - "../services/symbolDisplay.ts", - "../services/transpile.ts", - "../services/formatting/formattingContext.ts", - "../services/formatting/formattingScanner.ts", - "../services/formatting/rule.ts", - "../services/formatting/rules.ts", - "../services/formatting/rulesMap.ts", - "../services/formatting/formatting.ts", - "../services/formatting/smartIndenter.ts", - "../services/textChanges.ts", - "../services/codeFixProvider.ts", - "../services/refactorProvider.ts", - "../services/codefixes/addMissingInvocationForDecorator.ts", - "../services/codefixes/annotateWithTypeFromJSDoc.ts", - "../services/codefixes/convertFunctionToEs6Class.ts", - "../services/codefixes/convertToEs6Module.ts", - "../services/codefixes/correctQualifiedNameToIndexedAccessType.ts", - "../services/codefixes/fixClassIncorrectlyImplementsInterface.ts", - "../services/codefixes/importFixes.ts", - "../services/codefixes/fixSpelling.ts", - "../services/codefixes/fixAddMissingMember.ts", - "../services/codefixes/fixCannotFindModule.ts", - "../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts", - "../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts", - "../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts", - "../services/codefixes/fixExtendsInterfaceBecomesImplements.ts", - "../services/codefixes/fixForgottenThisPropertyAccess.ts", - "../services/codefixes/fixUnusedIdentifier.ts", - "../services/codefixes/fixUnreachableCode.ts", - "../services/codefixes/fixUnusedLabel.ts", - "../services/codefixes/fixJSDocTypes.ts", - "../services/codefixes/fixAwaitInSyncFunction.ts", - "../services/codefixes/disableJsDiagnostics.ts", - "../services/codefixes/helpers.ts", - "../services/codefixes/inferFromUsage.ts", - "../services/codefixes/fixInvalidImportSyntax.ts", - "../services/codefixes/fixStrictClassInitialization.ts", - "../services/codefixes/requireInTs.ts", - "../services/codefixes/useDefaultImport.ts", - "../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts", - "../services/codefixes/convertToMappedObjectType.ts", - "../services/refactors/convertImport.ts", - "../services/refactors/extractSymbol.ts", - "../services/refactors/generateGetAccessorAndSetAccessor.ts", - "../services/refactors/moveToNewFile.ts", - "../services/sourcemaps.ts", - "../services/services.ts", - "../services/breakpoints.ts", - "../services/transform.ts", - "../services/shims.ts", - - "../server/typingsInstaller/typingsInstaller.ts", - - "../server/types.ts", - "../server/shared.ts", - "../server/utilities.ts", - "../server/protocol.ts", - "../server/scriptInfo.ts", - "../server/typingsCache.ts", - "../server/project.ts", - "../server/editorServices.ts", - "../server/session.ts", - "../server/scriptVersionCache.ts", - "collections.ts", "utils.ts", "documents.ts", @@ -152,25 +28,15 @@ "compiler.ts", "evaluator.ts", "fakes.ts", + "client.ts", - "sourceMapRecorder.ts", "runnerbase.ts", + "sourceMapRecorder.ts", "harness.ts", "harnessLanguageService.ts", "virtualFileSystemWithWatch.ts", - "fourslashRunner.ts", "fourslash.ts", "typeWriter.ts", - "compilerRunner.ts", - "projectsRunner.ts", - "loggedIO.ts", - "rwcRunner.ts", - "externalCompileRunner.ts", - "test262Runner.ts", - "parallel/host.ts", - "parallel/worker.ts", - "parallel/shared.ts", - "runner.ts" - ], - "include": ["unittests/**/*.ts"] + "loggedIO.ts" + ] } diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index 484d3302c1b..467a3474100 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -1,5 +1,3 @@ -/// - namespace ts.TestFSWithWatch { export const libFile: File = { path: "/a/lib/lib.d.ts", diff --git a/src/compiler/commandLineParser.ts b/src/parser/commandLineParser.ts similarity index 100% rename from src/compiler/commandLineParser.ts rename to src/parser/commandLineParser.ts diff --git a/src/parser/diagnosticInformationMap.generated.ts b/src/parser/diagnosticInformationMap.generated.ts new file mode 100644 index 00000000000..55d7e087b8a --- /dev/null +++ b/src/parser/diagnosticInformationMap.generated.ts @@ -0,0 +1,1107 @@ +// +// generated from './diagnosticInformationMap.generated.ts' by '../../scripts/processDiagnosticMessages.js' +/* @internal */ +namespace ts { + function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}): DiagnosticMessage { + return { code, category, key, message, reportsUnnecessary }; + } + // tslint:disable-next-line variable-name + export const Diagnostics = { + Unterminated_string_literal: diag(1002, DiagnosticCategory.Error, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: diag(1003, DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."), + _0_expected: diag(1005, DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: diag(1006, DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + Trailing_comma_not_allowed: diag(1009, DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: diag(1010, DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: diag(1011, DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: diag(1012, DiagnosticCategory.Error, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, DiagnosticCategory.Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, DiagnosticCategory.Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: diag(1015, DiagnosticCategory.Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, DiagnosticCategory.Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: diag(1017, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: diag(1020, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: diag(1021, DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: diag(1022, DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + An_index_signature_parameter_type_must_be_string_or_number: diag(1023, DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_or_number_1023", "An index signature parameter type must be 'string' or 'number'."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + Accessibility_modifier_already_seen: diag(1028, DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: diag(1029, DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: diag(1030, DiagnosticCategory.Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_a_class_element: diag(1031, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_class_element_1031", "'{0}' modifier cannot appear on a class element."), + super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, DiagnosticCategory.Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: diag(1035, DiagnosticCategory.Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: diag(1036, DiagnosticCategory.Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: diag(1039, DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_with_a_class_declaration: diag(1041, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_class_declaration_1041", "'{0}' modifier cannot be used with a class declaration."), + _0_modifier_cannot_be_used_here: diag(1042, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_data_property: diag(1043, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_data_property_1043", "'{0}' modifier cannot appear on a data property."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + A_0_modifier_cannot_be_used_with_an_interface_declaration: diag(1045, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045", "A '{0}' modifier cannot be used with an interface declaration."), + A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: diag(1046, DiagnosticCategory.Error, "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046", "A 'declare' modifier is required for a top level declaration in a .d.ts file."), + A_rest_parameter_cannot_be_optional: diag(1047, DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: diag(1048, DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: diag(1049, DiagnosticCategory.Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: diag(1051, DiagnosticCategory.Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, DiagnosticCategory.Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: diag(1053, DiagnosticCategory.Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: diag(1054, DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + An_async_function_or_method_must_have_a_valid_awaitable_return_type: diag(1057, DiagnosticCategory.Error, "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", "An async function or method must have a valid awaitable return type."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: diag(1059, DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: diag(1061, DiagnosticCategory.Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, DiagnosticCategory.Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1064, DiagnosticCategory.Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", "The return type of an async function or method must be the global Promise type."), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, DiagnosticCategory.Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, DiagnosticCategory.Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, DiagnosticCategory.Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: diag(1070, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: diag(1071, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: diag(1084, DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), + An_accessor_cannot_be_declared_in_an_ambient_context: diag(1086, DiagnosticCategory.Error, "An_accessor_cannot_be_declared_in_an_ambient_context_1086", "An accessor cannot be declared in an ambient context."), + _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: diag(1090, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, DiagnosticCategory.Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, DiagnosticCategory.Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: diag(1094, DiagnosticCategory.Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, DiagnosticCategory.Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: diag(1096, DiagnosticCategory.Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: diag(1097, DiagnosticCategory.Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: diag(1098, DiagnosticCategory.Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: diag(1099, DiagnosticCategory.Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: diag(1100, DiagnosticCategory.Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: diag(1101, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, DiagnosticCategory.Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator: diag(1103, DiagnosticCategory.Error, "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103", "A 'for-await-of' statement is only allowed within an async function or async generator."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + Jump_target_cannot_cross_function_boundary: diag(1107, DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: diag(1108, DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: diag(1109, DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."), + Type_expected: diag(1110, DiagnosticCategory.Error, "Type_expected_1110", "Type expected."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, DiagnosticCategory.Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: diag(1114, DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: diag(1117, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", "An object literal cannot have multiple properties with the same name in strict mode."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: diag(1120, DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_in_strict_mode: diag(1121, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."), + A_tuple_type_element_list_cannot_be_empty: diag(1122, DiagnosticCategory.Error, "A_tuple_type_element_list_cannot_be_empty_1122", "A tuple type element list cannot be empty."), + Variable_declaration_list_cannot_be_empty: diag(1123, DiagnosticCategory.Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: diag(1124, DiagnosticCategory.Error, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: diag(1125, DiagnosticCategory.Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: diag(1126, DiagnosticCategory.Error, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: diag(1127, DiagnosticCategory.Error, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: diag(1128, DiagnosticCategory.Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: diag(1129, DiagnosticCategory.Error, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: diag(1130, DiagnosticCategory.Error, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: diag(1131, DiagnosticCategory.Error, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: diag(1132, DiagnosticCategory.Error, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: diag(1134, DiagnosticCategory.Error, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: diag(1135, DiagnosticCategory.Error, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: diag(1136, DiagnosticCategory.Error, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: diag(1137, DiagnosticCategory.Error, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: diag(1138, DiagnosticCategory.Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: diag(1139, DiagnosticCategory.Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: diag(1140, DiagnosticCategory.Error, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: diag(1141, DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: diag(1142, DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: diag(1144, DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."), + Declaration_expected: diag(1146, DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, DiagnosticCategory.Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: diag(1150, DiagnosticCategory.Error, "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", "'new T[]' cannot be used to create an array. Use 'new Array()' instead."), + const_declarations_must_be_initialized: diag(1155, DiagnosticCategory.Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), + const_declarations_can_only_be_declared_inside_a_block: diag(1156, DiagnosticCategory.Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), + let_declarations_can_only_be_declared_inside_a_block: diag(1157, DiagnosticCategory.Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + Unterminated_template_literal: diag(1160, DiagnosticCategory.Error, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: diag(1161, DiagnosticCategory.Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: diag(1162, DiagnosticCategory.Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: diag(1164, DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1166, DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166", "A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, DiagnosticCategory.Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: diag(1172, DiagnosticCategory.Error, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: diag(1173, DiagnosticCategory.Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: diag(1174, DiagnosticCategory.Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: diag(1175, DiagnosticCategory.Error, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: diag(1176, DiagnosticCategory.Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: diag(1177, DiagnosticCategory.Error, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: diag(1178, DiagnosticCategory.Error, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: diag(1179, DiagnosticCategory.Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: diag(1180, DiagnosticCategory.Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: diag(1181, DiagnosticCategory.Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: diag(1182, DiagnosticCategory.Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, DiagnosticCategory.Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: diag(1184, DiagnosticCategory.Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: diag(1185, DiagnosticCategory.Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: diag(1186, DiagnosticCategory.Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, DiagnosticCategory.Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: diag(1191, DiagnosticCategory.Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: diag(1192, DiagnosticCategory.Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: diag(1193, DiagnosticCategory.Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: diag(1194, DiagnosticCategory.Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + Catch_clause_variable_cannot_have_a_type_annotation: diag(1196, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_a_type_annotation_1196", "Catch clause variable cannot have a type annotation."), + Catch_clause_variable_cannot_have_an_initializer: diag(1197, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, DiagnosticCategory.Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: diag(1199, DiagnosticCategory.Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: diag(1200, DiagnosticCategory.Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, DiagnosticCategory.Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, DiagnosticCategory.Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: diag(1205, DiagnosticCategory.Error, "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", "Cannot re-export a type when the '--isolatedModules' flag is provided."), + Decorators_are_not_valid_here: diag(1206, DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: diag(1208, DiagnosticCategory.Error, "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", "Cannot compile namespaces when the '--isolatedModules' flag is provided."), + Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: diag(1209, DiagnosticCategory.Error, "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", "Ambient const enums are not allowed when the '--isolatedModules' flag is provided."), + Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: diag(1210, DiagnosticCategory.Error, "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", "Invalid use of '{0}'. Class definitions are automatically in strict mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, DiagnosticCategory.Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: diag(1219, DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."), + Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: diag(1220, DiagnosticCategory.Error, "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", "Generators are only available when targeting ECMAScript 2015 or higher."), + Generators_are_not_allowed_in_an_ambient_context: diag(1221, DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: diag(1223, DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: diag(1224, DiagnosticCategory.Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: diag(1225, DiagnosticCategory.Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: diag(1226, DiagnosticCategory.Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, DiagnosticCategory.Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_can_only_be_used_in_a_module: diag(1231, DiagnosticCategory.Error, "An_export_assignment_can_only_be_used_in_a_module_1231", "An export assignment can only be used in a module."), + An_import_declaration_can_only_be_used_in_a_namespace_or_module: diag(1232, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232", "An import declaration can only be used in a namespace or module."), + An_export_declaration_can_only_be_used_in_a_module: diag(1233, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_in_a_module_1233", "An export declaration can only be used in a module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: diag(1235, DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235", "A namespace declaration is only allowed in a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, DiagnosticCategory.Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: diag(1243, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, DiagnosticCategory.Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, DiagnosticCategory.Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: diag(1246, DiagnosticCategory.Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: diag(1247, DiagnosticCategory.Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: diag(1248, DiagnosticCategory.Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, DiagnosticCategory.Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."), + _0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag: diag(1253, DiagnosticCategory.Error, "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253", "'{0}' tag cannot be used independently as a top level JSDoc tag."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal: diag(1254, DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254", "A 'const' initializer in an ambient context must be a string or numeric literal."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + with_statements_are_not_allowed_in_an_async_function_block: diag(1300, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expression_is_only_allowed_within_an_async_function: diag(1308, DiagnosticCategory.Error, "await_expression_is_only_allowed_within_an_async_function_1308", "'await' expression is only allowed within an async function."), + can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment: diag(1312, DiagnosticCategory.Error, "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312", "'=' can only be used in an object literal property inside a destructuring assignment."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: diag(1314, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: diag(1315, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: diag(1316, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, DiagnosticCategory.Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: diag(1318, DiagnosticCategory.Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, DiagnosticCategory.Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext: diag(1323, DiagnosticCategory.Error, "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323", "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."), + Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."), + Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."), + Dynamic_import_cannot_have_type_arguments: diag(1326, DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments"), + String_literal_with_double_quotes_expected: diag(1327, DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, DiagnosticCategory.Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, DiagnosticCategory.Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, DiagnosticCategory.Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: diag(1335, DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead: diag(1336, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336", "An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."), + An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead: diag(1337, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337", "An index signature parameter type cannot be a union type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here: diag(1340, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340", "Module '{0}' does not refer to a type, but is used as a type here."), + Type_arguments_cannot_be_used_here: diag(1342, DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), + The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options: diag(1343, DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343", "The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options."), + Duplicate_identifier_0: diag(2300, DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: diag(2302, DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: diag(2303, DiagnosticCategory.Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: diag(2304, DiagnosticCategory.Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: diag(2305, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: diag(2306, DiagnosticCategory.Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0: diag(2307, DiagnosticCategory.Error, "Cannot_find_module_0_2307", "Cannot find module '{0}'."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: diag(2310, DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + A_class_may_only_extend_another_class: diag(2311, DiagnosticCategory.Error, "A_class_may_only_extend_another_class_2311", "A class may only extend another class."), + An_interface_may_only_extend_a_class_or_another_interface: diag(2312, DiagnosticCategory.Error, "An_interface_may_only_extend_a_class_or_another_interface_2312", "An interface may only extend a class or another interface."), + Type_parameter_0_has_a_circular_constraint: diag(2313, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: diag(2314, DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: diag(2315, DiagnosticCategory.Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: diag(2316, DiagnosticCategory.Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: diag(2317, DiagnosticCategory.Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: diag(2318, DiagnosticCategory.Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, DiagnosticCategory.Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, DiagnosticCategory.Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: diag(2321, DiagnosticCategory.Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: diag(2322, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: diag(2323, DiagnosticCategory.Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: diag(2324, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, DiagnosticCategory.Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: diag(2326, DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: diag(2328, DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_is_missing_in_type_0: diag(2329, DiagnosticCategory.Error, "Index_signature_is_missing_in_type_0_2329", "Index signature is missing in type '{0}'."), + Index_signatures_are_incompatible: diag(2330, DiagnosticCategory.Error, "Index_signatures_are_incompatible_2330", "Index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: diag(2332, DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_constructor_arguments: diag(2333, DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."), + this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: diag(2335, DiagnosticCategory.Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: diag(2336, DiagnosticCategory.Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, DiagnosticCategory.Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, DiagnosticCategory.Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: diag(2339, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: diag(2341, DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: diag(2342, DiagnosticCategory.Error, "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."), + This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: diag(2343, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'."), + Type_0_does_not_satisfy_the_constraint_1: diag(2344, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Call_target_does_not_contain_any_signatures: diag(2346, DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), + Untyped_function_calls_may_not_accept_type_arguments: diag(2347, DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: diag(2349, DiagnosticCategory.Error, "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures."), + Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: diag(2351, DiagnosticCategory.Error, "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", "Cannot use 'new' with an expression whose type lacks a call or construct signature."), + Type_0_cannot_be_converted_to_type_1: diag(2352, DiagnosticCategory.Error, "Type_0_cannot_be_converted_to_type_1_2352", "Type '{0}' cannot be converted to type '{1}'."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: diag(2355, DiagnosticCategory.Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: diag(2356, DiagnosticCategory.Error, "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."), + The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: diag(2360, DiagnosticCategory.Error, "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."), + The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2361, DiagnosticCategory.Error, "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: diag(2362, DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: diag(2363, DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, DiagnosticCategory.Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + Type_parameter_name_cannot_be_0: diag(2368, DiagnosticCategory.Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, DiagnosticCategory.Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: diag(2370, DiagnosticCategory.Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_be_referenced_in_its_initializer: diag(2372, DiagnosticCategory.Error, "Parameter_0_cannot_be_referenced_in_its_initializer_2372", "Parameter '{0}' cannot be referenced in its initializer."), + Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, DiagnosticCategory.Error, "Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_string_index_signature: diag(2374, DiagnosticCategory.Error, "Duplicate_string_index_signature_2374", "Duplicate string index signature."), + Duplicate_number_index_signature: diag(2375, DiagnosticCategory.Error, "Duplicate_number_index_signature_2375", "Duplicate number index signature."), + A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: diag(2376, DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376", "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties."), + Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: diag(2378, DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Getter_and_setter_accessors_do_not_agree_in_visibility: diag(2379, DiagnosticCategory.Error, "Getter_and_setter_accessors_do_not_agree_in_visibility_2379", "Getter and setter accessors do not agree in visibility."), + get_and_set_accessor_must_have_the_same_type: diag(2380, DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_type_2380", "'get' and 'set' accessor must have the same type."), + A_signature_with_an_implementation_cannot_use_a_string_literal_type: diag(2381, DiagnosticCategory.Error, "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381", "A signature with an implementation cannot use a string literal type."), + Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: diag(2382, DiagnosticCategory.Error, "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382", "Specialized overload signature is not assignable to any non-specialized signature."), + Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: diag(2385, DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: diag(2386, DiagnosticCategory.Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: diag(2387, DiagnosticCategory.Error, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: diag(2388, DiagnosticCategory.Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: diag(2389, DiagnosticCategory.Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: diag(2390, DiagnosticCategory.Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, DiagnosticCategory.Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: diag(2392, DiagnosticCategory.Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: diag(2393, DiagnosticCategory.Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + Overload_signature_is_not_compatible_with_function_implementation: diag(2394, DiagnosticCategory.Error, "Overload_signature_is_not_compatible_with_function_implementation_2394", "Overload signature is not compatible with function implementation."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, DiagnosticCategory.Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, DiagnosticCategory.Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, DiagnosticCategory.Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: diag(2401, DiagnosticCategory.Error, "Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401", "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, DiagnosticCategory.Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: diag(2408, DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Property_0_of_type_1_is_not_assignable_to_string_index_type_2: diag(2411, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", "Property '{0}' of type '{1}' is not assignable to string index type '{2}'."), + Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: diag(2412, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."), + Numeric_index_type_0_is_not_assignable_to_string_index_type_1: diag(2413, DiagnosticCategory.Error, "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", "Numeric index type '{0}' is not assignable to string index type '{1}'."), + Class_name_cannot_be_0: diag(2414, DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: diag(2415, DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, DiagnosticCategory.Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Class_0_incorrectly_implements_interface_1: diag(2420, DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_may_only_implement_another_class_or_interface: diag(2422, DiagnosticCategory.Error, "A_class_may_only_implement_another_class_or_interface_2422", "A class may only implement another class or interface."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: diag(2424, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: diag(2427, DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: diag(2428, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: diag(2430, DiagnosticCategory.Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: diag(2431, DiagnosticCategory.Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, DiagnosticCategory.Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, DiagnosticCategory.Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, DiagnosticCategory.Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, DiagnosticCategory.Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: diag(2438, DiagnosticCategory.Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, DiagnosticCategory.Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, DiagnosticCategory.Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: diag(2442, DiagnosticCategory.Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: diag(2446, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: diag(2448, DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: diag(2449, DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: diag(2450, DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: diag(2451, DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: diag(2452, DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: diag(2453, DiagnosticCategory.Error, "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."), + Variable_0_is_used_before_being_assigned: diag(2454, DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: diag(2455, DiagnosticCategory.Error, "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."), + Type_alias_0_circularly_references_itself: diag(2456, DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: diag(2457, DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Type_0_has_no_property_1_and_no_string_index_signature: diag(2459, DiagnosticCategory.Error, "Type_0_has_no_property_1_and_no_string_index_signature_2459", "Type '{0}' has no property '{1}' and no string index signature."), + Type_0_has_no_property_1: diag(2460, DiagnosticCategory.Error, "Type_0_has_no_property_1_2460", "Type '{0}' has no property '{1}'."), + Type_0_is_not_an_array_type: diag(2461, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, DiagnosticCategory.Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: diag(2465, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: diag(2466, DiagnosticCategory.Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: diag(2468, DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: diag(2470, DiagnosticCategory.Error, "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470", "'Symbol' reference does not refer to the global Symbol constructor object."), + A_computed_property_name_of_the_form_0_must_be_of_type_symbol: diag(2471, DiagnosticCategory.Error, "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471", "A computed property name of the form '{0}' must be of type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: diag(2473, DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + In_const_enum_declarations_member_initializer_must_be_constant_expression: diag(2474, DiagnosticCategory.Error, "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474", "In 'const' enum declarations member initializer must be constant expression."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, DiagnosticCategory.Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + Property_0_does_not_exist_on_const_enum_1: diag(2479, DiagnosticCategory.Error, "Property_0_does_not_exist_on_const_enum_1_2479", "Property '{0}' does not exist on 'const' enum '{1}'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, DiagnosticCategory.Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: diag(2489, DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: diag(2490, DiagnosticCategory.Error, "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the 'next()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: diag(2493, DiagnosticCategory.Error, "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, DiagnosticCategory.Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: diag(2495, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: diag(2496, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."), + Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: diag(2497, DiagnosticCategory.Error, "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497", "Module '{0}' resolves to a non-module entity and cannot be imported using this construct."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, DiagnosticCategory.Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, DiagnosticCategory.Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, DiagnosticCategory.Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: diag(2501, DiagnosticCategory.Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: diag(2503, DiagnosticCategory.Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: diag(2505, DiagnosticCategory.Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: diag(2507, DiagnosticCategory.Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, DiagnosticCategory.Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_a_class_or_interface_type: diag(2509, DiagnosticCategory.Error, "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509", "Base constructor return type '{0}' is not a class or interface type."), + Base_constructors_must_all_have_the_same_return_type: diag(2510, DiagnosticCategory.Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: diag(2511, DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + Classes_containing_abstract_methods_must_be_marked_abstract: diag(2514, DiagnosticCategory.Error, "Classes_containing_abstract_methods_must_be_marked_abstract_2514", "Classes containing abstract methods must be marked abstract."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: diag(2519, DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: diag(2521, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", "Expression resolves to variable declaration '{0}' that compiler uses to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, DiagnosticCategory.Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, DiagnosticCategory.Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, DiagnosticCategory.Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: diag(2528, DiagnosticCategory.Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: diag(2530, DiagnosticCategory.Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: diag(2531, DiagnosticCategory.Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: diag(2532, DiagnosticCategory.Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: diag(2533, DiagnosticCategory.Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, DiagnosticCategory.Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Enum_type_0_has_members_with_initializers_that_are_not_literals: diag(2535, DiagnosticCategory.Error, "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", "Enum type '{0}' has members with initializers that are not literals."), + Type_0_cannot_be_used_to_index_type_1: diag(2536, DiagnosticCategory.Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: diag(2537, DiagnosticCategory.Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: diag(2538, DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: diag(2540, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", "Cannot assign to '{0}' because it is a constant or a read-only property."), + The_target_of_an_assignment_must_be_a_variable_or_a_property_access: diag(2541, DiagnosticCategory.Error, "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", "The target of an assignment must be a variable or a property access."), + Index_signature_in_type_0_only_permits_reading: diag(2542, DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: diag(2546, DiagnosticCategory.Error, "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."), + The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, DiagnosticCategory.Error, "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Generic_type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2550, DiagnosticCategory.Error, "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550", "Generic type instantiation is excessively deep and possibly infinite."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: diag(2552, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: diag(2554, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: diag(2555, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + Expected_0_arguments_but_got_1_or_more: diag(2556, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_or_more_2556", "Expected {0} arguments, but got {1} or more."), + Expected_at_least_0_arguments_but_got_1_or_more: diag(2557, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_or_more_2557", "Expected at least {0} arguments, but got {1} or more."), + Expected_0_type_arguments_but_got_1: diag(2558, DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: diag(2559, DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, DiagnosticCategory.Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, DiagnosticCategory.Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: diag(2565, DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: diag(2566, DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2568, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568", "Type '{0}' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators."), + Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2569, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."), + Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await: diag(2570, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570", "Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?"), + Object_is_of_type_unknown: diag(2571, DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + JSX_element_attributes_type_0_may_not_be_a_union_type: diag(2600, DiagnosticCategory.Error, "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", "JSX element attributes type '{0}' may not be a union type."), + The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: diag(2601, DiagnosticCategory.Error, "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", "The return type of a JSX element constructor must return an object type."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: diag(2605, DiagnosticCategory.Error, "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", "JSX element type '{0}' is not a constructor function for JSX elements."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: diag(2609, DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: diag(2654, DiagnosticCategory.Error, "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."), + Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: diag(2656, DiagnosticCategory.Error, "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."), + JSX_expressions_must_have_one_parent_element: diag(2657, DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: diag(2658, DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, DiagnosticCategory.Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, DiagnosticCategory.Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, DiagnosticCategory.Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, DiagnosticCategory.Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, DiagnosticCategory.Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, DiagnosticCategory.Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, DiagnosticCategory.Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, DiagnosticCategory.Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, DiagnosticCategory.Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, DiagnosticCategory.Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: diag(2676, DiagnosticCategory.Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, DiagnosticCategory.Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: diag(2678, DiagnosticCategory.Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: diag(2680, DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: diag(2681, DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + get_and_set_accessor_must_have_the_same_this_type: diag(2682, DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_this_type_2682", "'get' and 'set' accessor must have the same 'this' type."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: diag(2685, DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, DiagnosticCategory.Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: diag(2687, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: diag(2688, DiagnosticCategory.Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, DiagnosticCategory.Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, DiagnosticCategory.Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: diag(2694, DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."), + Spread_types_may_only_be_created_from_object_types: diag(2698, DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: diag(2700, DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a delete operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a delete operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."), + Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: diag(2708, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: diag(2709, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."), + A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: diag(2716, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, DiagnosticCategory.Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_declaration_0: diag(2718, DiagnosticCategory.Error, "Duplicate_declaration_0_2718", "Duplicate declaration '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, DiagnosticCategory.Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: diag(2721, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + Module_0_has_no_exported_member_1_Did_you_mean_2: diag(2724, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_2_2724", "Module '{0}' has no exported member '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Cannot_find_lib_definition_for_0: diag(2726, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + Import_declaration_0_is_using_private_name_1: diag(4000, DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, DiagnosticCategory.Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, DiagnosticCategory.Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, DiagnosticCategory.Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, DiagnosticCategory.Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, DiagnosticCategory.Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, DiagnosticCategory.Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, DiagnosticCategory.Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, DiagnosticCategory.Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, DiagnosticCategory.Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: diag(4025, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, DiagnosticCategory.Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, DiagnosticCategory.Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, DiagnosticCategory.Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, DiagnosticCategory.Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + The_current_host_does_not_support_the_0_option: diag(5001, DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: diag(5012, DiagnosticCategory.Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Failed_to_parse_file_0_Colon_1: diag(5014, DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), + Unknown_compiler_option_0: diag(5023, DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: diag(5024, DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Could_not_write_file_0_Colon_1: diag(5033, DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, DiagnosticCategory.Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: diag(5053, DiagnosticCategory.Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, DiagnosticCategory.Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: diag(5058, DiagnosticCategory.Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, DiagnosticCategory.Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Option_paths_cannot_be_used_without_specifying_baseUrl_option: diag(5060, DiagnosticCategory.Error, "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", "Option 'paths' cannot be used without specifying '--baseUrl' option."), + Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, DiagnosticCategory.Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: diag(5062, DiagnosticCategory.Error, "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' in can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: diag(5063, DiagnosticCategory.Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, DiagnosticCategory.Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, DiagnosticCategory.Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, DiagnosticCategory.Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, DiagnosticCategory.Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, DiagnosticCategory.Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, DiagnosticCategory.Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: diag(6001, DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: diag(6002, DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6003, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: diag(6005, DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: diag(6006, DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, DiagnosticCategory.Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, DiagnosticCategory.Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: diag(6009, DiagnosticCategory.Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: diag(6010, DiagnosticCategory.Message, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, DiagnosticCategory.Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: diag(6012, DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: diag(6013, DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: diag(6014, DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT: diag(6015, DiagnosticCategory.Message, "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015", "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'."), + Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext: diag(6016, DiagnosticCategory.Message, "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016", "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'."), + Print_this_message: diag(6017, DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: diag(6019, DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: diag(6023, DiagnosticCategory.Message, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: diag(6024, DiagnosticCategory.Message, "options_6024", "options"), + file: diag(6025, DiagnosticCategory.Message, "file_6025", "file"), + Examples_Colon_0: diag(6026, DiagnosticCategory.Message, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: diag(6027, DiagnosticCategory.Message, "Options_Colon_6027", "Options:"), + Version_0: diag(6029, DiagnosticCategory.Message, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: diag(6030, DiagnosticCategory.Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: diag(6031, DiagnosticCategory.Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: diag(6032, DiagnosticCategory.Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: diag(6034, DiagnosticCategory.Message, "KIND_6034", "KIND"), + FILE: diag(6035, DiagnosticCategory.Message, "FILE_6035", "FILE"), + VERSION: diag(6036, DiagnosticCategory.Message, "VERSION_6036", "VERSION"), + LOCATION: diag(6037, DiagnosticCategory.Message, "LOCATION_6037", "LOCATION"), + DIRECTORY: diag(6038, DiagnosticCategory.Message, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: diag(6039, DiagnosticCategory.Message, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: diag(6040, DiagnosticCategory.Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Generates_corresponding_map_file: diag(6043, DiagnosticCategory.Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: diag(6044, DiagnosticCategory.Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: diag(6045, DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: diag(6046, DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unsupported_locale_0: diag(6049, DiagnosticCategory.Error, "Unsupported_locale_0_6049", "Unsupported locale '{0}'."), + Unable_to_open_file_0: diag(6050, DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: diag(6051, DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: diag(6053, DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, DiagnosticCategory.Error, "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: diag(6061, DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file: diag(6064, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", "Option '{0}' can only be specified in 'tsconfig.json' file."), + Enables_experimental_support_for_ES7_decorators: diag(6065, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Enables_experimental_support_for_ES7_async_functions: diag(6068, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."), + Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: diag(6071, DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: diag(6072, DiagnosticCategory.Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, DiagnosticCategory.Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: diag(6074, DiagnosticCategory.Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, DiagnosticCategory.Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, DiagnosticCategory.Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: diag(6077, DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: diag(6079, DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation_Colon_preserve_react_native_or_react: diag(6080, DiagnosticCategory.Message, "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", "Specify JSX code generation: 'preserve', 'react-native', or 'react'."), + File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."), + Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: diag(6083, DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, DiagnosticCategory.Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: diag(6085, DiagnosticCategory.Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: diag(6086, DiagnosticCategory.Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, DiagnosticCategory.Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: diag(6088, DiagnosticCategory.Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: diag(6089, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: diag(6090, DiagnosticCategory.Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, DiagnosticCategory.Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: diag(6092, DiagnosticCategory.Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, DiagnosticCategory.Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, DiagnosticCategory.Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: diag(6095, DiagnosticCategory.Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", "Loading module as file / folder, candidate module location '{0}', target file type '{1}'."), + File_0_does_not_exist: diag(6096, DiagnosticCategory.Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exist_use_it_as_a_name_resolution_result: diag(6097, DiagnosticCategory.Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_type_1: diag(6098, DiagnosticCategory.Message, "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", "Loading module '{0}' from 'node_modules' folder, target file type '{1}'."), + Found_package_json_at_0: diag(6099, DiagnosticCategory.Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: diag(6100, DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: diag(6101, DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: diag(6102, DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Option_0_should_have_array_of_strings_as_a_value: diag(6103, DiagnosticCategory.Error, "Option_0_should_have_array_of_strings_as_a_value_6103", "Option '{0}' should have array of strings as a value."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_string_got_1: diag(6105, DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, DiagnosticCategory.Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: diag(6108, DiagnosticCategory.Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, DiagnosticCategory.Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: diag(6110, DiagnosticCategory.Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: diag(6111, DiagnosticCategory.Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: diag(6112, DiagnosticCategory.Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: diag(6113, DiagnosticCategory.Message, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: diag(6114, DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Resolving_using_primary_search_paths: diag(6117, DiagnosticCategory.Message, "Resolving_using_primary_search_paths_6117", "Resolving using primary search paths..."), + Resolving_from_node_modules_folder: diag(6118, DiagnosticCategory.Message, "Resolving_from_node_modules_folder_6118", "Resolving from node_modules folder..."), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: diag(6120, DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: diag(6121, DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, DiagnosticCategory.Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: diag(6124, DiagnosticCategory.Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: diag(6125, DiagnosticCategory.Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, DiagnosticCategory.Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: diag(6130, DiagnosticCategory.Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, DiagnosticCategory.Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: diag(6132, DiagnosticCategory.Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: diag(6133, DiagnosticCategory.Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Report_errors_on_unused_locals: diag(6134, DiagnosticCategory.Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: diag(6135, DiagnosticCategory.Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, DiagnosticCategory.Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, DiagnosticCategory.Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: diag(6138, DiagnosticCategory.Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Import_emit_helpers_from_tslib: diag(6139, DiagnosticCategory.Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, DiagnosticCategory.Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, DiagnosticCategory.Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), + Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, DiagnosticCategory.Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, DiagnosticCategory.Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, DiagnosticCategory.Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, DiagnosticCategory.Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: diag(6149, DiagnosticCategory.Message, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: diag(6150, DiagnosticCategory.Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, DiagnosticCategory.Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, DiagnosticCategory.Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, DiagnosticCategory.Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: diag(6154, DiagnosticCategory.Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: diag(6155, DiagnosticCategory.Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, DiagnosticCategory.Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, DiagnosticCategory.Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: diag(6158, DiagnosticCategory.Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, DiagnosticCategory.Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, DiagnosticCategory.Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: diag(6161, DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: diag(6162, DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: diag(6163, DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6164, DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Do_not_truncate_error_messages: diag(6165, DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: diag(6166, DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, DiagnosticCategory.Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: diag(6169, DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: diag(6171, DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"), + Basic_Options: diag(6172, DiagnosticCategory.Message, "Basic_Options_6172", "Basic Options"), + Strict_Type_Checking_Options: diag(6173, DiagnosticCategory.Message, "Strict_Type_Checking_Options_6173", "Strict Type-Checking Options"), + Module_Resolution_Options: diag(6174, DiagnosticCategory.Message, "Module_Resolution_Options_6174", "Module Resolution Options"), + Source_Map_Options: diag(6175, DiagnosticCategory.Message, "Source_Map_Options_6175", "Source Map Options"), + Additional_Checks: diag(6176, DiagnosticCategory.Message, "Additional_Checks_6176", "Additional Checks"), + Experimental_Options: diag(6177, DiagnosticCategory.Message, "Experimental_Options_6177", "Experimental Options"), + Advanced_Options: diag(6178, DiagnosticCategory.Message, "Advanced_Options_6178", "Advanced Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."), + Enable_all_strict_type_checking_options: diag(6180, DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + List_of_language_service_plugins: diag(6181, DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."), + Scoped_package_detected_looking_in_0: diag(6182, DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_to_file_1_from_old_program: diag(6183, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", "Reusing resolution of module '{0}' to file '{1}' from old program."), + Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: diag(6184, DiagnosticCategory.Message, "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."), + Disable_strict_checking_of_generic_signatures_in_function_types: diag(6185, DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6185", "Disable strict checking of generic signatures in function types."), + Enable_strict_checking_of_function_types: diag(6186, DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: diag(6187, DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: diag(6188, DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, DiagnosticCategory.Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Found_package_json_at_0_Package_ID_is_1: diag(6190, DiagnosticCategory.Message, "Found_package_json_at_0_Package_ID_is_1_6190", "Found 'package.json' at '{0}'. Package ID is '{1}'."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, DiagnosticCategory.Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: diag(6192, DiagnosticCategory.Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true), + Found_1_error_Watching_for_file_changes: diag(6193, DiagnosticCategory.Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: diag(6194, DiagnosticCategory.Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, DiagnosticCategory.Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: diag(6196, DiagnosticCategory.Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true), + Include_modules_imported_with_json_extension: diag(6197, DiagnosticCategory.Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: diag(6198, DiagnosticCategory.Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true), + All_variables_are_unused: diag(6199, DiagnosticCategory.Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true), + Projects_to_reference: diag(6300, DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"), + Enable_project_compilation: diag(6302, DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, DiagnosticCategory.Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + Composite_projects_may_not_disable_declaration_emit: diag(6304, DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: diag(6305, DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), + File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, DiagnosticCategory.Error, "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307", "File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern."), + Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), + Output_file_0_from_project_1_does_not_exist: diag(6309, DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), + Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2: diag(6351, DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: diag(6355, DiagnosticCategory.Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, DiagnosticCategory.Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: diag(6357, DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: diag(6358, DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: diag(6359, DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + delete_this_Project_0_is_up_to_date_because_it_was_previously_built: diag(6360, DiagnosticCategory.Message, "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360", "delete this - Project '{0}' is up to date because it was previously built"), + Project_0_is_up_to_date: diag(6361, DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: diag(6365, DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"), + Enable_verbose_logging: diag(6366, DiagnosticCategory.Message, "Enable_verbose_logging_6366", "Enable verbose logging"), + Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6368, DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368", "Build all projects, including those that appear to be up to date"), + Option_build_must_be_the_first_command_line_argument: diag(6369, DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: diag(6370, DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Skipping_clean_because_not_all_projects_could_be_located: diag(6371, DiagnosticCategory.Error, "Skipping_clean_because_not_all_projects_could_be_located_6371", "Skipping clean because not all projects could be located"), + Variable_0_implicitly_has_an_1_type: diag(7005, DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: diag(7006, DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: diag(7008, DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, DiagnosticCategory.Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, DiagnosticCategory.Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, DiagnosticCategory.Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, DiagnosticCategory.Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, DiagnosticCategory.Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: diag(7019, DiagnosticCategory.Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, DiagnosticCategory.Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: diag(7025, DiagnosticCategory.Error, "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: diag(7027, DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), + Unused_label: diag(7028, DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), + Fallthrough_case_in_switch: diag(7029, DiagnosticCategory.Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: diag(7030, DiagnosticCategory.Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: diag(7031, DiagnosticCategory.Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, DiagnosticCategory.Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, DiagnosticCategory.Error, "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, DiagnosticCategory.Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime: diag(7038, DiagnosticCategory.Error, "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038", "A namespace-style import cannot be called or constructed, and will cause a failure at runtime."), + Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + You_cannot_rename_this_element: diag(8000, DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_a_ts_file: diag(8002, DiagnosticCategory.Error, "import_can_only_be_used_in_a_ts_file_8002", "'import ... =' can only be used in a .ts file."), + export_can_only_be_used_in_a_ts_file: diag(8003, DiagnosticCategory.Error, "export_can_only_be_used_in_a_ts_file_8003", "'export=' can only be used in a .ts file."), + type_parameter_declarations_can_only_be_used_in_a_ts_file: diag(8004, DiagnosticCategory.Error, "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004", "'type parameter declarations' can only be used in a .ts file."), + implements_clauses_can_only_be_used_in_a_ts_file: diag(8005, DiagnosticCategory.Error, "implements_clauses_can_only_be_used_in_a_ts_file_8005", "'implements clauses' can only be used in a .ts file."), + interface_declarations_can_only_be_used_in_a_ts_file: diag(8006, DiagnosticCategory.Error, "interface_declarations_can_only_be_used_in_a_ts_file_8006", "'interface declarations' can only be used in a .ts file."), + module_declarations_can_only_be_used_in_a_ts_file: diag(8007, DiagnosticCategory.Error, "module_declarations_can_only_be_used_in_a_ts_file_8007", "'module declarations' can only be used in a .ts file."), + type_aliases_can_only_be_used_in_a_ts_file: diag(8008, DiagnosticCategory.Error, "type_aliases_can_only_be_used_in_a_ts_file_8008", "'type aliases' can only be used in a .ts file."), + _0_can_only_be_used_in_a_ts_file: diag(8009, DiagnosticCategory.Error, "_0_can_only_be_used_in_a_ts_file_8009", "'{0}' can only be used in a .ts file."), + types_can_only_be_used_in_a_ts_file: diag(8010, DiagnosticCategory.Error, "types_can_only_be_used_in_a_ts_file_8010", "'types' can only be used in a .ts file."), + type_arguments_can_only_be_used_in_a_ts_file: diag(8011, DiagnosticCategory.Error, "type_arguments_can_only_be_used_in_a_ts_file_8011", "'type arguments' can only be used in a .ts file."), + parameter_modifiers_can_only_be_used_in_a_ts_file: diag(8012, DiagnosticCategory.Error, "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", "'parameter modifiers' can only be used in a .ts file."), + non_null_assertions_can_only_be_used_in_a_ts_file: diag(8013, DiagnosticCategory.Error, "non_null_assertions_can_only_be_used_in_a_ts_file_8013", "'non-null assertions' can only be used in a .ts file."), + enum_declarations_can_only_be_used_in_a_ts_file: diag(8015, DiagnosticCategory.Error, "enum_declarations_can_only_be_used_in_a_ts_file_8015", "'enum declarations' can only be used in a .ts file."), + type_assertion_expressions_can_only_be_used_in_a_ts_file: diag(8016, DiagnosticCategory.Error, "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", "'type assertion expressions' can only be used in a .ts file."), + Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, DiagnosticCategory.Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."), + Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."), + Report_errors_in_js_files: diag(8019, DiagnosticCategory.Message, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, DiagnosticCategory.Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, DiagnosticCategory.Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: diag(8022, DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one `@augments` or `@extends` tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: diag(9002, DiagnosticCategory.Error, "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."), + class_expressions_are_not_currently_supported: diag(9003, DiagnosticCategory.Error, "class_expressions_are_not_currently_supported_9003", "'class' expressions are not currently supported."), + Language_service_is_disabled: diag(9004, DiagnosticCategory.Error, "Language_service_is_disabled_9004", "Language service is disabled."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: diag(17002, DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + JSX_attribute_expected: diag(17003, DiagnosticCategory.Error, "JSX_attribute_expected_17003", "JSX attribute expected."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, DiagnosticCategory.Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: diag(17008, DiagnosticCategory.Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, DiagnosticCategory.Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: diag(17010, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, DiagnosticCategory.Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, DiagnosticCategory.Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, DiagnosticCategory.Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: diag(17014, DiagnosticCategory.Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + JSX_fragment_is_not_supported_when_using_jsxFactory: diag(17016, DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_jsxFactory_17016", "JSX fragment is not supported when using --jsxFactory"), + JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma: diag(17017, DiagnosticCategory.Error, "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017", "JSX fragment is not supported when using an inline JSX factory pragma"), + Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."), + The_files_list_in_config_file_0_is_empty: diag(18002, DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module: diag(80001, DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001", "File is a CommonJS module; it may be converted to an ES6 module."), + This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: diag(80003, DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: diag(80005, DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + Add_missing_super_call: diag(90001, DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: diag(90002, DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: diag(90003, DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_declaration_for_Colon_0: diag(90004, DiagnosticCategory.Message, "Remove_declaration_for_Colon_0_90004", "Remove declaration for: '{0}'"), + Remove_import_from_0: diag(90005, DiagnosticCategory.Message, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: diag(90006, DiagnosticCategory.Message, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: diag(90007, DiagnosticCategory.Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: diag(90008, DiagnosticCategory.Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_destructuring: diag(90009, DiagnosticCategory.Message, "Remove_destructuring_90009", "Remove destructuring"), + Remove_variable_statement: diag(90010, DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"), + Import_0_from_module_1: diag(90013, DiagnosticCategory.Message, "Import_0_from_module_1_90013", "Import '{0}' from module \"{1}\""), + Change_0_to_1: diag(90014, DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Add_0_to_existing_import_declaration_from_1: diag(90015, DiagnosticCategory.Message, "Add_0_to_existing_import_declaration_from_1_90015", "Add '{0}' to existing import declaration from \"{1}\""), + Declare_property_0: diag(90016, DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: diag(90017, DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: diag(90018, DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: diag(90019, DiagnosticCategory.Message, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: diag(90020, DiagnosticCategory.Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: diag(90021, DiagnosticCategory.Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: diag(90022, DiagnosticCategory.Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: diag(90023, DiagnosticCategory.Message, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: diag(90024, DiagnosticCategory.Message, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: diag(90025, DiagnosticCategory.Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: diag(90026, DiagnosticCategory.Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: diag(90027, DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: diag(90028, DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: diag(90029, DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Convert_function_to_an_ES2015_class: diag(95001, DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_function_0_to_class: diag(95002, DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"), + Extract_to_0_in_1: diag(95004, DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: diag(95005, DiagnosticCategory.Message, "Extract_function_95005", "Extract function"), + Extract_constant: diag(95006, DiagnosticCategory.Message, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: diag(95007, DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: diag(95008, DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: diag(95009, DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Annotate_with_types_from_JSDoc: diag(95010, DiagnosticCategory.Message, "Annotate_with_types_from_JSDoc_95010", "Annotate with types from JSDoc"), + Infer_type_of_0_from_usage: diag(95011, DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: diag(95012, DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: diag(95013, DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: diag(95014, DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: diag(95015, DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: diag(95016, DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES6_module: diag(95017, DiagnosticCategory.Message, "Convert_to_ES6_module_95017", "Convert to ES6 module"), + Add_undefined_type_to_property_0: diag(95018, DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: diag(95019, DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: diag(95020, DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Add_all_missing_members: diag(95022, DiagnosticCategory.Message, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: diag(95023, DiagnosticCategory.Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: diag(95024, DiagnosticCategory.Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: diag(95025, DiagnosticCategory.Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: diag(95026, DiagnosticCategory.Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: diag(95027, DiagnosticCategory.Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, DiagnosticCategory.Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: diag(95029, DiagnosticCategory.Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: diag(95030, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: diag(95032, DiagnosticCategory.Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: diag(95033, DiagnosticCategory.Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: diag(95034, DiagnosticCategory.Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: diag(95035, DiagnosticCategory.Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, DiagnosticCategory.Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, DiagnosticCategory.Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: diag(95038, DiagnosticCategory.Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: diag(95039, DiagnosticCategory.Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: diag(95040, DiagnosticCategory.Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: diag(95041, DiagnosticCategory.Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: diag(95042, DiagnosticCategory.Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: diag(95043, DiagnosticCategory.Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: diag(95044, DiagnosticCategory.Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: diag(95045, DiagnosticCategory.Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: diag(95046, DiagnosticCategory.Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: diag(95047, DiagnosticCategory.Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: diag(95048, DiagnosticCategory.Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: diag(95049, DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: diag(95050, DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: diag(95051, DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: diag(95052, DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: diag(95053, DiagnosticCategory.Message, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: diag(95054, DiagnosticCategory.Message, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: diag(95055, DiagnosticCategory.Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: diag(95056, DiagnosticCategory.Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: diag(95057, DiagnosticCategory.Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + }; +} \ No newline at end of file diff --git a/src/parser/diagnosticMessages.generated.json b/src/parser/diagnosticMessages.generated.json new file mode 100644 index 00000000000..1869d9e43e7 --- /dev/null +++ b/src/parser/diagnosticMessages.generated.json @@ -0,0 +1,1098 @@ +{ + "Unterminated_string_literal_1002" : "Unterminated string literal.", + "Identifier_expected_1003" : "Identifier expected.", + "_0_expected_1005" : "'{0}' expected.", + "A_file_cannot_have_a_reference_to_itself_1006" : "A file cannot have a reference to itself.", + "Trailing_comma_not_allowed_1009" : "Trailing comma not allowed.", + "Asterisk_Slash_expected_1010" : "'*/' expected.", + "An_element_access_expression_should_take_an_argument_1011" : "An element access expression should take an argument.", + "Unexpected_token_1012" : "Unexpected token.", + "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013" : "A rest parameter or binding pattern may not have a trailing comma.", + "A_rest_parameter_must_be_last_in_a_parameter_list_1014" : "A rest parameter must be last in a parameter list.", + "Parameter_cannot_have_question_mark_and_initializer_1015" : "Parameter cannot have question mark and initializer.", + "A_required_parameter_cannot_follow_an_optional_parameter_1016" : "A required parameter cannot follow an optional parameter.", + "An_index_signature_cannot_have_a_rest_parameter_1017" : "An index signature cannot have a rest parameter.", + "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018" : "An index signature parameter cannot have an accessibility modifier.", + "An_index_signature_parameter_cannot_have_a_question_mark_1019" : "An index signature parameter cannot have a question mark.", + "An_index_signature_parameter_cannot_have_an_initializer_1020" : "An index signature parameter cannot have an initializer.", + "An_index_signature_must_have_a_type_annotation_1021" : "An index signature must have a type annotation.", + "An_index_signature_parameter_must_have_a_type_annotation_1022" : "An index signature parameter must have a type annotation.", + "An_index_signature_parameter_type_must_be_string_or_number_1023" : "An index signature parameter type must be 'string' or 'number'.", + "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024" : "'readonly' modifier can only appear on a property declaration or index signature.", + "Accessibility_modifier_already_seen_1028" : "Accessibility modifier already seen.", + "_0_modifier_must_precede_1_modifier_1029" : "'{0}' modifier must precede '{1}' modifier.", + "_0_modifier_already_seen_1030" : "'{0}' modifier already seen.", + "_0_modifier_cannot_appear_on_a_class_element_1031" : "'{0}' modifier cannot appear on a class element.", + "super_must_be_followed_by_an_argument_list_or_member_access_1034" : "'super' must be followed by an argument list or member access.", + "Only_ambient_modules_can_use_quoted_names_1035" : "Only ambient modules can use quoted names.", + "Statements_are_not_allowed_in_ambient_contexts_1036" : "Statements are not allowed in ambient contexts.", + "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038" : "A 'declare' modifier cannot be used in an already ambient context.", + "Initializers_are_not_allowed_in_ambient_contexts_1039" : "Initializers are not allowed in ambient contexts.", + "_0_modifier_cannot_be_used_in_an_ambient_context_1040" : "'{0}' modifier cannot be used in an ambient context.", + "_0_modifier_cannot_be_used_with_a_class_declaration_1041" : "'{0}' modifier cannot be used with a class declaration.", + "_0_modifier_cannot_be_used_here_1042" : "'{0}' modifier cannot be used here.", + "_0_modifier_cannot_appear_on_a_data_property_1043" : "'{0}' modifier cannot appear on a data property.", + "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044" : "'{0}' modifier cannot appear on a module or namespace element.", + "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045" : "A '{0}' modifier cannot be used with an interface declaration.", + "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046" : "A 'declare' modifier is required for a top level declaration in a .d.ts file.", + "A_rest_parameter_cannot_be_optional_1047" : "A rest parameter cannot be optional.", + "A_rest_parameter_cannot_have_an_initializer_1048" : "A rest parameter cannot have an initializer.", + "A_set_accessor_must_have_exactly_one_parameter_1049" : "A 'set' accessor must have exactly one parameter.", + "A_set_accessor_cannot_have_an_optional_parameter_1051" : "A 'set' accessor cannot have an optional parameter.", + "A_set_accessor_parameter_cannot_have_an_initializer_1052" : "A 'set' accessor parameter cannot have an initializer.", + "A_set_accessor_cannot_have_rest_parameter_1053" : "A 'set' accessor cannot have rest parameter.", + "A_get_accessor_cannot_have_parameters_1054" : "A 'get' accessor cannot have parameters.", + "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055" : "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.", + "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056" : "Accessors are only available when targeting ECMAScript 5 and higher.", + "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057" : "An async function or method must have a valid awaitable return type.", + "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058" : "The return type of an async function must either be a valid promise or must not contain a callable 'then' member.", + "A_promise_must_have_a_then_method_1059" : "A promise must have a 'then' method.", + "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060" : "The first parameter of the 'then' method of a promise must be a callback.", + "Enum_member_must_have_initializer_1061" : "Enum member must have initializer.", + "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062" : "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method.", + "An_export_assignment_cannot_be_used_in_a_namespace_1063" : "An export assignment cannot be used in a namespace.", + "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064" : "The return type of an async function or method must be the global Promise type.", + "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066" : "In ambient enum declarations member initializer must be constant expression.", + "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068" : "Unexpected token. A constructor, method, accessor, or property was expected.", + "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069" : "Unexpected token. A type parameter name was expected without curly braces.", + "_0_modifier_cannot_appear_on_a_type_member_1070" : "'{0}' modifier cannot appear on a type member.", + "_0_modifier_cannot_appear_on_an_index_signature_1071" : "'{0}' modifier cannot appear on an index signature.", + "A_0_modifier_cannot_be_used_with_an_import_declaration_1079" : "A '{0}' modifier cannot be used with an import declaration.", + "Invalid_reference_directive_syntax_1084" : "Invalid 'reference' directive syntax.", + "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085" : "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'.", + "An_accessor_cannot_be_declared_in_an_ambient_context_1086" : "An accessor cannot be declared in an ambient context.", + "_0_modifier_cannot_appear_on_a_constructor_declaration_1089" : "'{0}' modifier cannot appear on a constructor declaration.", + "_0_modifier_cannot_appear_on_a_parameter_1090" : "'{0}' modifier cannot appear on a parameter.", + "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091" : "Only a single variable declaration is allowed in a 'for...in' statement.", + "Type_parameters_cannot_appear_on_a_constructor_declaration_1092" : "Type parameters cannot appear on a constructor declaration.", + "Type_annotation_cannot_appear_on_a_constructor_declaration_1093" : "Type annotation cannot appear on a constructor declaration.", + "An_accessor_cannot_have_type_parameters_1094" : "An accessor cannot have type parameters.", + "A_set_accessor_cannot_have_a_return_type_annotation_1095" : "A 'set' accessor cannot have a return type annotation.", + "An_index_signature_must_have_exactly_one_parameter_1096" : "An index signature must have exactly one parameter.", + "_0_list_cannot_be_empty_1097" : "'{0}' list cannot be empty.", + "Type_parameter_list_cannot_be_empty_1098" : "Type parameter list cannot be empty.", + "Type_argument_list_cannot_be_empty_1099" : "Type argument list cannot be empty.", + "Invalid_use_of_0_in_strict_mode_1100" : "Invalid use of '{0}' in strict mode.", + "with_statements_are_not_allowed_in_strict_mode_1101" : "'with' statements are not allowed in strict mode.", + "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102" : "'delete' cannot be called on an identifier in strict mode.", + "A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103" : "A 'for-await-of' statement is only allowed within an async function or async generator.", + "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104" : "A 'continue' statement can only be used within an enclosing iteration statement.", + "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105" : "A 'break' statement can only be used within an enclosing iteration or switch statement.", + "Jump_target_cannot_cross_function_boundary_1107" : "Jump target cannot cross function boundary.", + "A_return_statement_can_only_be_used_within_a_function_body_1108" : "A 'return' statement can only be used within a function body.", + "Expression_expected_1109" : "Expression expected.", + "Type_expected_1110" : "Type expected.", + "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113" : "A 'default' clause cannot appear more than once in a 'switch' statement.", + "Duplicate_label_0_1114" : "Duplicate label '{0}'.", + "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115" : "A 'continue' statement can only jump to a label of an enclosing iteration statement.", + "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116" : "A 'break' statement can only jump to a label of an enclosing statement.", + "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" : "An object literal cannot have multiple properties with the same name in strict mode.", + "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118" : "An object literal cannot have multiple get/set accessors with the same name.", + "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119" : "An object literal cannot have property and accessor with the same name.", + "An_export_assignment_cannot_have_modifiers_1120" : "An export assignment cannot have modifiers.", + "Octal_literals_are_not_allowed_in_strict_mode_1121" : "Octal literals are not allowed in strict mode.", + "A_tuple_type_element_list_cannot_be_empty_1122" : "A tuple type element list cannot be empty.", + "Variable_declaration_list_cannot_be_empty_1123" : "Variable declaration list cannot be empty.", + "Digit_expected_1124" : "Digit expected.", + "Hexadecimal_digit_expected_1125" : "Hexadecimal digit expected.", + "Unexpected_end_of_text_1126" : "Unexpected end of text.", + "Invalid_character_1127" : "Invalid character.", + "Declaration_or_statement_expected_1128" : "Declaration or statement expected.", + "Statement_expected_1129" : "Statement expected.", + "case_or_default_expected_1130" : "'case' or 'default' expected.", + "Property_or_signature_expected_1131" : "Property or signature expected.", + "Enum_member_expected_1132" : "Enum member expected.", + "Variable_declaration_expected_1134" : "Variable declaration expected.", + "Argument_expression_expected_1135" : "Argument expression expected.", + "Property_assignment_expected_1136" : "Property assignment expected.", + "Expression_or_comma_expected_1137" : "Expression or comma expected.", + "Parameter_declaration_expected_1138" : "Parameter declaration expected.", + "Type_parameter_declaration_expected_1139" : "Type parameter declaration expected.", + "Type_argument_expected_1140" : "Type argument expected.", + "String_literal_expected_1141" : "String literal expected.", + "Line_break_not_permitted_here_1142" : "Line break not permitted here.", + "or_expected_1144" : "'{' or ';' expected.", + "Declaration_expected_1146" : "Declaration expected.", + "Import_declarations_in_a_namespace_cannot_reference_a_module_1147" : "Import declarations in a namespace cannot reference a module.", + "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148" : "Cannot use imports, exports, or module augmentations when '--module' is 'none'.", + "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149" : "File name '{0}' differs from already included file name '{1}' only in casing.", + "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150" : "'new T[]' cannot be used to create an array. Use 'new Array()' instead.", + "const_declarations_must_be_initialized_1155" : "'const' declarations must be initialized.", + "const_declarations_can_only_be_declared_inside_a_block_1156" : "'const' declarations can only be declared inside a block.", + "let_declarations_can_only_be_declared_inside_a_block_1157" : "'let' declarations can only be declared inside a block.", + "Unterminated_template_literal_1160" : "Unterminated template literal.", + "Unterminated_regular_expression_literal_1161" : "Unterminated regular expression literal.", + "An_object_member_cannot_be_declared_optional_1162" : "An object member cannot be declared optional.", + "A_yield_expression_is_only_allowed_in_a_generator_body_1163" : "A 'yield' expression is only allowed in a generator body.", + "Computed_property_names_are_not_allowed_in_enums_1164" : "Computed property names are not allowed in enums.", + "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165" : "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.", + "A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166" : "A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.", + "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168" : "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.", + "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169" : "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.", + "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170" : "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.", + "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171" : "A comma expression is not allowed in a computed property name.", + "extends_clause_already_seen_1172" : "'extends' clause already seen.", + "extends_clause_must_precede_implements_clause_1173" : "'extends' clause must precede 'implements' clause.", + "Classes_can_only_extend_a_single_class_1174" : "Classes can only extend a single class.", + "implements_clause_already_seen_1175" : "'implements' clause already seen.", + "Interface_declaration_cannot_have_implements_clause_1176" : "Interface declaration cannot have 'implements' clause.", + "Binary_digit_expected_1177" : "Binary digit expected.", + "Octal_digit_expected_1178" : "Octal digit expected.", + "Unexpected_token_expected_1179" : "Unexpected token. '{' expected.", + "Property_destructuring_pattern_expected_1180" : "Property destructuring pattern expected.", + "Array_element_destructuring_pattern_expected_1181" : "Array element destructuring pattern expected.", + "A_destructuring_declaration_must_have_an_initializer_1182" : "A destructuring declaration must have an initializer.", + "An_implementation_cannot_be_declared_in_ambient_contexts_1183" : "An implementation cannot be declared in ambient contexts.", + "Modifiers_cannot_appear_here_1184" : "Modifiers cannot appear here.", + "Merge_conflict_marker_encountered_1185" : "Merge conflict marker encountered.", + "A_rest_element_cannot_have_an_initializer_1186" : "A rest element cannot have an initializer.", + "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187" : "A parameter property may not be declared using a binding pattern.", + "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188" : "Only a single variable declaration is allowed in a 'for...of' statement.", + "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189" : "The variable declaration of a 'for...in' statement cannot have an initializer.", + "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190" : "The variable declaration of a 'for...of' statement cannot have an initializer.", + "An_import_declaration_cannot_have_modifiers_1191" : "An import declaration cannot have modifiers.", + "Module_0_has_no_default_export_1192" : "Module '{0}' has no default export.", + "An_export_declaration_cannot_have_modifiers_1193" : "An export declaration cannot have modifiers.", + "Export_declarations_are_not_permitted_in_a_namespace_1194" : "Export declarations are not permitted in a namespace.", + "Catch_clause_variable_cannot_have_a_type_annotation_1196" : "Catch clause variable cannot have a type annotation.", + "Catch_clause_variable_cannot_have_an_initializer_1197" : "Catch clause variable cannot have an initializer.", + "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198" : "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.", + "Unterminated_Unicode_escape_sequence_1199" : "Unterminated Unicode escape sequence.", + "Line_terminator_not_permitted_before_arrow_1200" : "Line terminator not permitted before arrow.", + "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202" : "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead.", + "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203" : "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.", + "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205" : "Cannot re-export a type when the '--isolatedModules' flag is provided.", + "Decorators_are_not_valid_here_1206" : "Decorators are not valid here.", + "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207" : "Decorators cannot be applied to multiple get/set accessors of the same name.", + "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208" : "Cannot compile namespaces when the '--isolatedModules' flag is provided.", + "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209" : "Ambient const enums are not allowed when the '--isolatedModules' flag is provided.", + "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210" : "Invalid use of '{0}'. Class definitions are automatically in strict mode.", + "A_class_declaration_without_the_default_modifier_must_have_a_name_1211" : "A class declaration without the 'default' modifier must have a name.", + "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212" : "Identifier expected. '{0}' is a reserved word in strict mode.", + "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213" : "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.", + "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214" : "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.", + "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215" : "Invalid use of '{0}'. Modules are automatically in strict mode.", + "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216" : "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules.", + "Export_assignment_is_not_supported_when_module_flag_is_system_1218" : "Export assignment is not supported when '--module' flag is 'system'.", + "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219" : "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.", + "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220" : "Generators are only available when targeting ECMAScript 2015 or higher.", + "Generators_are_not_allowed_in_an_ambient_context_1221" : "Generators are not allowed in an ambient context.", + "An_overload_signature_cannot_be_declared_as_a_generator_1222" : "An overload signature cannot be declared as a generator.", + "_0_tag_already_specified_1223" : "'{0}' tag already specified.", + "Signature_0_must_be_a_type_predicate_1224" : "Signature '{0}' must be a type predicate.", + "Cannot_find_parameter_0_1225" : "Cannot find parameter '{0}'.", + "Type_predicate_0_is_not_assignable_to_1_1226" : "Type predicate '{0}' is not assignable to '{1}'.", + "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227" : "Parameter '{0}' is not in the same position as parameter '{1}'.", + "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228" : "A type predicate is only allowed in return type position for functions and methods.", + "A_type_predicate_cannot_reference_a_rest_parameter_1229" : "A type predicate cannot reference a rest parameter.", + "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230" : "A type predicate cannot reference element '{0}' in a binding pattern.", + "An_export_assignment_can_only_be_used_in_a_module_1231" : "An export assignment can only be used in a module.", + "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232" : "An import declaration can only be used in a namespace or module.", + "An_export_declaration_can_only_be_used_in_a_module_1233" : "An export declaration can only be used in a module.", + "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234" : "An ambient module declaration is only allowed at the top level in a file.", + "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235" : "A namespace declaration is only allowed in a namespace or module.", + "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236" : "The return type of a property decorator function must be either 'void' or 'any'.", + "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237" : "The return type of a parameter decorator function must be either 'void' or 'any'.", + "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238" : "Unable to resolve signature of class decorator when called as an expression.", + "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239" : "Unable to resolve signature of parameter decorator when called as an expression.", + "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240" : "Unable to resolve signature of property decorator when called as an expression.", + "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241" : "Unable to resolve signature of method decorator when called as an expression.", + "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242" : "'abstract' modifier can only appear on a class, method, or property declaration.", + "_0_modifier_cannot_be_used_with_1_modifier_1243" : "'{0}' modifier cannot be used with '{1}' modifier.", + "Abstract_methods_can_only_appear_within_an_abstract_class_1244" : "Abstract methods can only appear within an abstract class.", + "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245" : "Method '{0}' cannot have an implementation because it is marked abstract.", + "An_interface_property_cannot_have_an_initializer_1246" : "An interface property cannot have an initializer.", + "A_type_literal_property_cannot_have_an_initializer_1247" : "A type literal property cannot have an initializer.", + "A_class_member_cannot_have_the_0_keyword_1248" : "A class member cannot have the '{0}' keyword.", + "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249" : "A decorator can only decorate a method implementation, not an overload.", + "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250" : "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'.", + "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251" : "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode.", + "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252" : "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode.", + "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253" : "'{0}' tag cannot be used independently as a top level JSDoc tag.", + "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254" : "A 'const' initializer in an ambient context must be a string or numeric literal.", + "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255" : "A definite assignment assertion '!' is not permitted in this context.", + "with_statements_are_not_allowed_in_an_async_function_block_1300" : "'with' statements are not allowed in an async function block.", + "await_expression_is_only_allowed_within_an_async_function_1308" : "'await' expression is only allowed within an async function.", + "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312" : "'=' can only be used in an object literal property inside a destructuring assignment.", + "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313" : "The body of an 'if' statement cannot be the empty statement.", + "Global_module_exports_may_only_appear_in_module_files_1314" : "Global module exports may only appear in module files.", + "Global_module_exports_may_only_appear_in_declaration_files_1315" : "Global module exports may only appear in declaration files.", + "Global_module_exports_may_only_appear_at_top_level_1316" : "Global module exports may only appear at top level.", + "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317" : "A parameter property cannot be declared using a rest parameter.", + "An_abstract_accessor_cannot_have_an_implementation_1318" : "An abstract accessor cannot have an implementation.", + "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319" : "A default export can only be used in an ECMAScript-style module.", + "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320" : "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.", + "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321" : "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member.", + "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322" : "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member.", + "Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323" : "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.", + "Dynamic_import_must_have_one_specifier_as_an_argument_1324" : "Dynamic import must have one specifier as an argument.", + "Specifier_of_dynamic_import_cannot_be_spread_element_1325" : "Specifier of dynamic import cannot be spread element.", + "Dynamic_import_cannot_have_type_arguments_1326" : "Dynamic import cannot have type arguments", + "String_literal_with_double_quotes_expected_1327" : "String literal with double quotes expected.", + "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328" : "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.", + "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329" : "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?", + "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330" : "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.", + "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331" : "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.", + "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332" : "A variable whose type is a 'unique symbol' type must be 'const'.", + "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333" : "'unique symbol' types may not be used on a variable declaration with a binding name.", + "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334" : "'unique symbol' types are only allowed on variables in a variable statement.", + "unique_symbol_types_are_not_allowed_here_1335" : "'unique symbol' types are not allowed here.", + "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336" : "An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead.", + "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337" : "An index signature parameter type cannot be a union type. Consider using a mapped object type instead.", + "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338" : "'infer' declarations are only permitted in the 'extends' clause of a conditional type.", + "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339" : "Module '{0}' does not refer to a value, but is used as a value here.", + "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_1340" : "Module '{0}' does not refer to a type, but is used as a type here.", + "Type_arguments_cannot_be_used_here_1342" : "Type arguments cannot be used here.", + "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343" : "The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.", + "Duplicate_identifier_0_2300" : "Duplicate identifier '{0}'.", + "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301" : "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.", + "Static_members_cannot_reference_class_type_parameters_2302" : "Static members cannot reference class type parameters.", + "Circular_definition_of_import_alias_0_2303" : "Circular definition of import alias '{0}'.", + "Cannot_find_name_0_2304" : "Cannot find name '{0}'.", + "Module_0_has_no_exported_member_1_2305" : "Module '{0}' has no exported member '{1}'.", + "File_0_is_not_a_module_2306" : "File '{0}' is not a module.", + "Cannot_find_module_0_2307" : "Cannot find module '{0}'.", + "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308" : "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity.", + "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309" : "An export assignment cannot be used in a module with other exported elements.", + "Type_0_recursively_references_itself_as_a_base_type_2310" : "Type '{0}' recursively references itself as a base type.", + "A_class_may_only_extend_another_class_2311" : "A class may only extend another class.", + "An_interface_may_only_extend_a_class_or_another_interface_2312" : "An interface may only extend a class or another interface.", + "Type_parameter_0_has_a_circular_constraint_2313" : "Type parameter '{0}' has a circular constraint.", + "Generic_type_0_requires_1_type_argument_s_2314" : "Generic type '{0}' requires {1} type argument(s).", + "Type_0_is_not_generic_2315" : "Type '{0}' is not generic.", + "Global_type_0_must_be_a_class_or_interface_type_2316" : "Global type '{0}' must be a class or interface type.", + "Global_type_0_must_have_1_type_parameter_s_2317" : "Global type '{0}' must have {1} type parameter(s).", + "Cannot_find_global_type_0_2318" : "Cannot find global type '{0}'.", + "Named_property_0_of_types_1_and_2_are_not_identical_2319" : "Named property '{0}' of types '{1}' and '{2}' are not identical.", + "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320" : "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.", + "Excessive_stack_depth_comparing_types_0_and_1_2321" : "Excessive stack depth comparing types '{0}' and '{1}'.", + "Type_0_is_not_assignable_to_type_1_2322" : "Type '{0}' is not assignable to type '{1}'.", + "Cannot_redeclare_exported_variable_0_2323" : "Cannot redeclare exported variable '{0}'.", + "Property_0_is_missing_in_type_1_2324" : "Property '{0}' is missing in type '{1}'.", + "Property_0_is_private_in_type_1_but_not_in_type_2_2325" : "Property '{0}' is private in type '{1}' but not in type '{2}'.", + "Types_of_property_0_are_incompatible_2326" : "Types of property '{0}' are incompatible.", + "Property_0_is_optional_in_type_1_but_required_in_type_2_2327" : "Property '{0}' is optional in type '{1}' but required in type '{2}'.", + "Types_of_parameters_0_and_1_are_incompatible_2328" : "Types of parameters '{0}' and '{1}' are incompatible.", + "Index_signature_is_missing_in_type_0_2329" : "Index signature is missing in type '{0}'.", + "Index_signatures_are_incompatible_2330" : "Index signatures are incompatible.", + "this_cannot_be_referenced_in_a_module_or_namespace_body_2331" : "'this' cannot be referenced in a module or namespace body.", + "this_cannot_be_referenced_in_current_location_2332" : "'this' cannot be referenced in current location.", + "this_cannot_be_referenced_in_constructor_arguments_2333" : "'this' cannot be referenced in constructor arguments.", + "this_cannot_be_referenced_in_a_static_property_initializer_2334" : "'this' cannot be referenced in a static property initializer.", + "super_can_only_be_referenced_in_a_derived_class_2335" : "'super' can only be referenced in a derived class.", + "super_cannot_be_referenced_in_constructor_arguments_2336" : "'super' cannot be referenced in constructor arguments.", + "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337" : "Super calls are not permitted outside constructors or in nested functions inside constructors.", + "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338" : "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.", + "Property_0_does_not_exist_on_type_1_2339" : "Property '{0}' does not exist on type '{1}'.", + "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" : "Only public and protected methods of the base class are accessible via the 'super' keyword.", + "Property_0_is_private_and_only_accessible_within_class_1_2341" : "Property '{0}' is private and only accessible within class '{1}'.", + "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342" : "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'.", + "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343" : "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'.", + "Type_0_does_not_satisfy_the_constraint_1_2344" : "Type '{0}' does not satisfy the constraint '{1}'.", + "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345" : "Argument of type '{0}' is not assignable to parameter of type '{1}'.", + "Call_target_does_not_contain_any_signatures_2346" : "Call target does not contain any signatures.", + "Untyped_function_calls_may_not_accept_type_arguments_2347" : "Untyped function calls may not accept type arguments.", + "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348" : "Value of type '{0}' is not callable. Did you mean to include 'new'?", + "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349" : "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures.", + "Only_a_void_function_can_be_called_with_the_new_keyword_2350" : "Only a void function can be called with the 'new' keyword.", + "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351" : "Cannot use 'new' with an expression whose type lacks a call or construct signature.", + "Type_0_cannot_be_converted_to_type_1_2352" : "Type '{0}' cannot be converted to type '{1}'.", + "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353" : "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'.", + "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354" : "This syntax requires an imported helper but module '{0}' cannot be found.", + "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355" : "A function whose declared type is neither 'void' nor 'any' must return a value.", + "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356" : "An arithmetic operand must be of type 'any', 'number' or an enum type.", + "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357" : "The operand of an increment or decrement operator must be a variable or a property access.", + "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358" : "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.", + "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359" : "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.", + "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360" : "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'.", + "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361" : "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.", + "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362" : "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.", + "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363" : "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.", + "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364" : "The left-hand side of an assignment expression must be a variable or a property access.", + "Operator_0_cannot_be_applied_to_types_1_and_2_2365" : "Operator '{0}' cannot be applied to types '{1}' and '{2}'.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366" : "Function lacks ending return statement and return type does not include 'undefined'.", + "Type_parameter_name_cannot_be_0_2368" : "Type parameter name cannot be '{0}'.", + "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369" : "A parameter property is only allowed in a constructor implementation.", + "A_rest_parameter_must_be_of_an_array_type_2370" : "A rest parameter must be of an array type.", + "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371" : "A parameter initializer is only allowed in a function or constructor implementation.", + "Parameter_0_cannot_be_referenced_in_its_initializer_2372" : "Parameter '{0}' cannot be referenced in its initializer.", + "Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" : "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.", + "Duplicate_string_index_signature_2374" : "Duplicate string index signature.", + "Duplicate_number_index_signature_2375" : "Duplicate number index signature.", + "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" : "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.", + "Constructors_for_derived_classes_must_contain_a_super_call_2377" : "Constructors for derived classes must contain a 'super' call.", + "A_get_accessor_must_return_a_value_2378" : "A 'get' accessor must return a value.", + "Getter_and_setter_accessors_do_not_agree_in_visibility_2379" : "Getter and setter accessors do not agree in visibility.", + "get_and_set_accessor_must_have_the_same_type_2380" : "'get' and 'set' accessor must have the same type.", + "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381" : "A signature with an implementation cannot use a string literal type.", + "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382" : "Specialized overload signature is not assignable to any non-specialized signature.", + "Overload_signatures_must_all_be_exported_or_non_exported_2383" : "Overload signatures must all be exported or non-exported.", + "Overload_signatures_must_all_be_ambient_or_non_ambient_2384" : "Overload signatures must all be ambient or non-ambient.", + "Overload_signatures_must_all_be_public_private_or_protected_2385" : "Overload signatures must all be public, private or protected.", + "Overload_signatures_must_all_be_optional_or_required_2386" : "Overload signatures must all be optional or required.", + "Function_overload_must_be_static_2387" : "Function overload must be static.", + "Function_overload_must_not_be_static_2388" : "Function overload must not be static.", + "Function_implementation_name_must_be_0_2389" : "Function implementation name must be '{0}'.", + "Constructor_implementation_is_missing_2390" : "Constructor implementation is missing.", + "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391" : "Function implementation is missing or not immediately following the declaration.", + "Multiple_constructor_implementations_are_not_allowed_2392" : "Multiple constructor implementations are not allowed.", + "Duplicate_function_implementation_2393" : "Duplicate function implementation.", + "Overload_signature_is_not_compatible_with_function_implementation_2394" : "Overload signature is not compatible with function implementation.", + "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395" : "Individual declarations in merged declaration '{0}' must be all exported or all local.", + "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396" : "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "Declaration_name_conflicts_with_built_in_global_identifier_0_2397" : "Declaration name conflicts with built-in global identifier '{0}'.", + "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399" : "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.", + "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400" : "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.", + "Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401" : "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.", + "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402" : "Expression resolves to '_super' that compiler uses to capture base class reference.", + "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403" : "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.", + "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404" : "The left-hand side of a 'for...in' statement cannot use a type annotation.", + "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405" : "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.", + "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406" : "The left-hand side of a 'for...in' statement must be a variable or a property access.", + "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407" : "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'.", + "Setters_cannot_return_a_value_2408" : "Setters cannot return a value.", + "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409" : "Return type of constructor signature must be assignable to the instance type of the class.", + "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410" : "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.", + "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411" : "Property '{0}' of type '{1}' is not assignable to string index type '{2}'.", + "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412" : "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'.", + "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413" : "Numeric index type '{0}' is not assignable to string index type '{1}'.", + "Class_name_cannot_be_0_2414" : "Class name cannot be '{0}'.", + "Class_0_incorrectly_extends_base_class_1_2415" : "Class '{0}' incorrectly extends base class '{1}'.", + "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416" : "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.", + "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417" : "Class static side '{0}' incorrectly extends base class static side '{1}'.", + "Class_0_incorrectly_implements_interface_1_2420" : "Class '{0}' incorrectly implements interface '{1}'.", + "A_class_may_only_implement_another_class_or_interface_2422" : "A class may only implement another class or interface.", + "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423" : "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.", + "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424" : "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.", + "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425" : "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.", + "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426" : "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.", + "Interface_name_cannot_be_0_2427" : "Interface name cannot be '{0}'.", + "All_declarations_of_0_must_have_identical_type_parameters_2428" : "All declarations of '{0}' must have identical type parameters.", + "Interface_0_incorrectly_extends_interface_1_2430" : "Interface '{0}' incorrectly extends interface '{1}'.", + "Enum_name_cannot_be_0_2431" : "Enum name cannot be '{0}'.", + "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432" : "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.", + "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433" : "A namespace declaration cannot be in a different file from a class or function with which it is merged.", + "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434" : "A namespace declaration cannot be located prior to a class or function with which it is merged.", + "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435" : "Ambient modules cannot be nested in other modules or namespaces.", + "Ambient_module_declaration_cannot_specify_relative_module_name_2436" : "Ambient module declaration cannot specify relative module name.", + "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437" : "Module '{0}' is hidden by a local declaration with the same name.", + "Import_name_cannot_be_0_2438" : "Import name cannot be '{0}'.", + "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439" : "Import or export declaration in an ambient module declaration cannot reference module through relative module name.", + "Import_declaration_conflicts_with_local_declaration_of_0_2440" : "Import declaration conflicts with local declaration of '{0}'.", + "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441" : "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.", + "Types_have_separate_declarations_of_a_private_property_0_2442" : "Types have separate declarations of a private property '{0}'.", + "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443" : "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.", + "Property_0_is_protected_in_type_1_but_public_in_type_2_2444" : "Property '{0}' is protected in type '{1}' but public in type '{2}'.", + "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445" : "Property '{0}' is protected and only accessible within class '{1}' and its subclasses.", + "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446" : "Property '{0}' is protected and only accessible through an instance of class '{1}'.", + "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447" : "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead.", + "Block_scoped_variable_0_used_before_its_declaration_2448" : "Block-scoped variable '{0}' used before its declaration.", + "Class_0_used_before_its_declaration_2449" : "Class '{0}' used before its declaration.", + "Enum_0_used_before_its_declaration_2450" : "Enum '{0}' used before its declaration.", + "Cannot_redeclare_block_scoped_variable_0_2451" : "Cannot redeclare block-scoped variable '{0}'.", + "An_enum_member_cannot_have_a_numeric_name_2452" : "An enum member cannot have a numeric name.", + "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453" : "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.", + "Variable_0_is_used_before_being_assigned_2454" : "Variable '{0}' is used before being assigned.", + "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455" : "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.", + "Type_alias_0_circularly_references_itself_2456" : "Type alias '{0}' circularly references itself.", + "Type_alias_name_cannot_be_0_2457" : "Type alias name cannot be '{0}'.", + "An_AMD_module_cannot_have_multiple_name_assignments_2458" : "An AMD module cannot have multiple name assignments.", + "Type_0_has_no_property_1_and_no_string_index_signature_2459" : "Type '{0}' has no property '{1}' and no string index signature.", + "Type_0_has_no_property_1_2460" : "Type '{0}' has no property '{1}'.", + "Type_0_is_not_an_array_type_2461" : "Type '{0}' is not an array type.", + "A_rest_element_must_be_last_in_a_destructuring_pattern_2462" : "A rest element must be last in a destructuring pattern.", + "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463" : "A binding pattern parameter cannot be optional in an implementation signature.", + "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464" : "A computed property name must be of type 'string', 'number', 'symbol', or 'any'.", + "this_cannot_be_referenced_in_a_computed_property_name_2465" : "'this' cannot be referenced in a computed property name.", + "super_cannot_be_referenced_in_a_computed_property_name_2466" : "'super' cannot be referenced in a computed property name.", + "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467" : "A computed property name cannot reference a type parameter from its containing type.", + "Cannot_find_global_value_0_2468" : "Cannot find global value '{0}'.", + "The_0_operator_cannot_be_applied_to_type_symbol_2469" : "The '{0}' operator cannot be applied to type 'symbol'.", + "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470" : "'Symbol' reference does not refer to the global Symbol constructor object.", + "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471" : "A computed property name of the form '{0}' must be of type 'symbol'.", + "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472" : "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher.", + "Enum_declarations_must_all_be_const_or_non_const_2473" : "Enum declarations must all be const or non-const.", + "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474" : "In 'const' enum declarations member initializer must be constant expression.", + "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475" : "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.", + "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476" : "A const enum member can only be accessed using a string literal.", + "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477" : "'const' enum member initializer was evaluated to a non-finite value.", + "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478" : "'const' enum member initializer was evaluated to disallowed value 'NaN'.", + "Property_0_does_not_exist_on_const_enum_1_2479" : "Property '{0}' does not exist on 'const' enum '{1}'.", + "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480" : "'let' is not allowed to be used as a name in 'let' or 'const' declarations.", + "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481" : "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'.", + "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483" : "The left-hand side of a 'for...of' statement cannot use a type annotation.", + "Export_declaration_conflicts_with_exported_declaration_of_0_2484" : "Export declaration conflicts with exported declaration of '{0}'.", + "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487" : "The left-hand side of a 'for...of' statement must be a variable or a property access.", + "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488" : "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator.", + "An_iterator_must_have_a_next_method_2489" : "An iterator must have a 'next()' method.", + "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490" : "The type returned by the 'next()' method of an iterator must have a 'value' property.", + "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491" : "The left-hand side of a 'for...in' statement cannot be a destructuring pattern.", + "Cannot_redeclare_identifier_0_in_catch_clause_2492" : "Cannot redeclare identifier '{0}' in catch clause.", + "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493" : "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'.", + "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494" : "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.", + "Type_0_is_not_an_array_type_or_a_string_type_2495" : "Type '{0}' is not an array type or a string type.", + "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496" : "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression.", + "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497" : "Module '{0}' resolves to a non-module entity and cannot be imported using this construct.", + "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498" : "Module '{0}' uses 'export =' and cannot be used with 'export *'.", + "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499" : "An interface can only extend an identifier/qualified-name with optional type arguments.", + "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500" : "A class can only implement an identifier/qualified-name with optional type arguments.", + "A_rest_element_cannot_contain_a_binding_pattern_2501" : "A rest element cannot contain a binding pattern.", + "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502" : "'{0}' is referenced directly or indirectly in its own type annotation.", + "Cannot_find_namespace_0_2503" : "Cannot find namespace '{0}'.", + "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504" : "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.", + "A_generator_cannot_have_a_void_type_annotation_2505" : "A generator cannot have a 'void' type annotation.", + "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506" : "'{0}' is referenced directly or indirectly in its own base expression.", + "Type_0_is_not_a_constructor_function_type_2507" : "Type '{0}' is not a constructor function type.", + "No_base_constructor_has_the_specified_number_of_type_arguments_2508" : "No base constructor has the specified number of type arguments.", + "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509" : "Base constructor return type '{0}' is not a class or interface type.", + "Base_constructors_must_all_have_the_same_return_type_2510" : "Base constructors must all have the same return type.", + "Cannot_create_an_instance_of_an_abstract_class_2511" : "Cannot create an instance of an abstract class.", + "Overload_signatures_must_all_be_abstract_or_non_abstract_2512" : "Overload signatures must all be abstract or non-abstract.", + "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513" : "Abstract method '{0}' in class '{1}' cannot be accessed via super expression.", + "Classes_containing_abstract_methods_must_be_marked_abstract_2514" : "Classes containing abstract methods must be marked abstract.", + "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515" : "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'.", + "All_declarations_of_an_abstract_method_must_be_consecutive_2516" : "All declarations of an abstract method must be consecutive.", + "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517" : "Cannot assign an abstract constructor type to a non-abstract constructor type.", + "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518" : "A 'this'-based type guard is not compatible with a parameter-based type guard.", + "An_async_iterator_must_have_a_next_method_2519" : "An async iterator must have a 'next()' method.", + "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520" : "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.", + "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521" : "Expression resolves to variable declaration '{0}' that compiler uses to support async functions.", + "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522" : "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method.", + "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523" : "'yield' expressions cannot be used in a parameter initializer.", + "await_expressions_cannot_be_used_in_a_parameter_initializer_2524" : "'await' expressions cannot be used in a parameter initializer.", + "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" : "Initializer provides no value for this binding element and the binding element has no default value.", + "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526" : "A 'this' type is available only in a non-static member of a class or interface.", + "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527" : "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.", + "A_module_cannot_have_multiple_default_exports_2528" : "A module cannot have multiple default exports.", + "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529" : "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.", + "Property_0_is_incompatible_with_index_signature_2530" : "Property '{0}' is incompatible with index signature.", + "Object_is_possibly_null_2531" : "Object is possibly 'null'.", + "Object_is_possibly_undefined_2532" : "Object is possibly 'undefined'.", + "Object_is_possibly_null_or_undefined_2533" : "Object is possibly 'null' or 'undefined'.", + "A_function_returning_never_cannot_have_a_reachable_end_point_2534" : "A function returning 'never' cannot have a reachable end point.", + "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535" : "Enum type '{0}' has members with initializers that are not literals.", + "Type_0_cannot_be_used_to_index_type_1_2536" : "Type '{0}' cannot be used to index type '{1}'.", + "Type_0_has_no_matching_index_signature_for_type_1_2537" : "Type '{0}' has no matching index signature for type '{1}'.", + "Type_0_cannot_be_used_as_an_index_type_2538" : "Type '{0}' cannot be used as an index type.", + "Cannot_assign_to_0_because_it_is_not_a_variable_2539" : "Cannot assign to '{0}' because it is not a variable.", + "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540" : "Cannot assign to '{0}' because it is a constant or a read-only property.", + "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541" : "The target of an assignment must be a variable or a property access.", + "Index_signature_in_type_0_only_permits_reading_2542" : "Index signature in type '{0}' only permits reading.", + "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543" : "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference.", + "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544" : "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.", + "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545" : "A mixin class must have a constructor with a single rest parameter of type 'any[]'.", + "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546" : "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.", + "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547" : "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property.", + "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548" : "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.", + "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549" : "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator.", + "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550" : "Generic type instantiation is excessively deep and possibly infinite.", + "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551" : "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?", + "Cannot_find_name_0_Did_you_mean_1_2552" : "Cannot find name '{0}'. Did you mean '{1}'?", + "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553" : "Computed values are not permitted in an enum with string valued members.", + "Expected_0_arguments_but_got_1_2554" : "Expected {0} arguments, but got {1}.", + "Expected_at_least_0_arguments_but_got_1_2555" : "Expected at least {0} arguments, but got {1}.", + "Expected_0_arguments_but_got_1_or_more_2556" : "Expected {0} arguments, but got {1} or more.", + "Expected_at_least_0_arguments_but_got_1_or_more_2557" : "Expected at least {0} arguments, but got {1} or more.", + "Expected_0_type_arguments_but_got_1_2558" : "Expected {0} type arguments, but got {1}.", + "Type_0_has_no_properties_in_common_with_type_1_2559" : "Type '{0}' has no properties in common with type '{1}'.", + "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560" : "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?", + "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561" : "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?", + "Base_class_expressions_cannot_reference_class_type_parameters_2562" : "Base class expressions cannot reference class type parameters.", + "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563" : "The containing function or module body is too large for control flow analysis.", + "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564" : "Property '{0}' has no initializer and is not definitely assigned in the constructor.", + "Property_0_is_used_before_being_assigned_2565" : "Property '{0}' is used before being assigned.", + "A_rest_element_cannot_have_a_property_name_2566" : "A rest element cannot have a property name.", + "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567" : "Enum declarations can only merge with namespace or other enum declarations.", + "Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators_2568" : "Type '{0}' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.", + "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569" : "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.", + "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570" : "Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?", + "Object_is_of_type_unknown_2571" : "Object is of type 'unknown'.", + "JSX_element_attributes_type_0_may_not_be_a_union_type_2600" : "JSX element attributes type '{0}' may not be a union type.", + "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601" : "The return type of a JSX element constructor must return an object type.", + "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602" : "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.", + "Property_0_in_type_1_is_not_assignable_to_type_2_2603" : "Property '{0}' in type '{1}' is not assignable to type '{2}'.", + "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604" : "JSX element type '{0}' does not have any construct or call signatures.", + "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605" : "JSX element type '{0}' is not a constructor function for JSX elements.", + "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606" : "Property '{0}' of JSX spread attribute is not assignable to target property.", + "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607" : "JSX element class does not support attributes because it does not have a '{0}' property.", + "The_global_type_JSX_0_may_not_have_more_than_one_property_2608" : "The global type 'JSX.{0}' may not have more than one property.", + "JSX_spread_child_must_be_an_array_type_2609" : "JSX spread child must be an array type.", + "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649" : "Cannot augment module '{0}' with value exports because it resolves to a non-module entity.", + "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651" : "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.", + "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652" : "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.", + "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653" : "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.", + "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654" : "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.", + "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656" : "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.", + "JSX_expressions_must_have_one_parent_element_2657" : "JSX expressions must have one parent element.", + "Type_0_provides_no_match_for_the_signature_1_2658" : "Type '{0}' provides no match for the signature '{1}'.", + "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659" : "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher.", + "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660" : "'super' can only be referenced in members of derived classes or object literal expressions.", + "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661" : "Cannot export '{0}'. Only local declarations can be exported from a module.", + "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662" : "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?", + "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663" : "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?", + "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664" : "Invalid module name in augmentation, module '{0}' cannot be found.", + "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665" : "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented.", + "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666" : "Exports and export assignments are not permitted in module augmentations.", + "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667" : "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.", + "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668" : "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.", + "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669" : "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.", + "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670" : "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.", + "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671" : "Cannot augment module '{0}' because it resolves to a non-module entity.", + "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672" : "Cannot assign a '{0}' constructor type to a '{1}' constructor type.", + "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673" : "Constructor of class '{0}' is private and only accessible within the class declaration.", + "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674" : "Constructor of class '{0}' is protected and only accessible within the class declaration.", + "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675" : "Cannot extend a class '{0}'. Class constructor is marked as private.", + "Accessors_must_both_be_abstract_or_non_abstract_2676" : "Accessors must both be abstract or non-abstract.", + "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677" : "A type predicate's type must be assignable to its parameter's type.", + "Type_0_is_not_comparable_to_type_1_2678" : "Type '{0}' is not comparable to type '{1}'.", + "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679" : "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'.", + "A_0_parameter_must_be_the_first_parameter_2680" : "A '{0}' parameter must be the first parameter.", + "A_constructor_cannot_have_a_this_parameter_2681" : "A constructor cannot have a 'this' parameter.", + "get_and_set_accessor_must_have_the_same_this_type_2682" : "'get' and 'set' accessor must have the same 'this' type.", + "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683" : "'this' implicitly has type 'any' because it does not have a type annotation.", + "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684" : "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'.", + "The_this_types_of_each_signature_are_incompatible_2685" : "The 'this' types of each signature are incompatible.", + "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686" : "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead.", + "All_declarations_of_0_must_have_identical_modifiers_2687" : "All declarations of '{0}' must have identical modifiers.", + "Cannot_find_type_definition_file_for_0_2688" : "Cannot find type definition file for '{0}'.", + "Cannot_extend_an_interface_0_Did_you_mean_implements_2689" : "Cannot extend an interface '{0}'. Did you mean 'implements'?", + "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691" : "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead.", + "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692" : "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693" : "'{0}' only refers to a type, but is being used as a value here.", + "Namespace_0_has_no_exported_member_1_2694" : "Namespace '{0}' has no exported member '{1}'.", + "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695" : "Left side of comma operator is unused and has no side effects.", + "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696" : "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?", + "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697" : "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.", + "Spread_types_may_only_be_created_from_object_types_2698" : "Spread types may only be created from object types.", + "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699" : "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.", + "Rest_types_may_only_be_created_from_object_types_2700" : "Rest types may only be created from object types.", + "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701" : "The target of an object rest assignment must be a variable or a property access.", + "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702" : "'{0}' only refers to a type, but is being used as a namespace here.", + "The_operand_of_a_delete_operator_must_be_a_property_reference_2703" : "The operand of a delete operator must be a property reference.", + "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704" : "The operand of a delete operator cannot be a read-only property.", + "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705" : "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.", + "Required_type_parameters_may_not_follow_optional_type_parameters_2706" : "Required type parameters may not follow optional type parameters.", + "Generic_type_0_requires_between_1_and_2_type_arguments_2707" : "Generic type '{0}' requires between {1} and {2} type arguments.", + "Cannot_use_namespace_0_as_a_value_2708" : "Cannot use namespace '{0}' as a value.", + "Cannot_use_namespace_0_as_a_type_2709" : "Cannot use namespace '{0}' as a type.", + "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710" : "'{0}' are specified twice. The attribute named '{0}' will be overwritten.", + "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711" : "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.", + "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712" : "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.", + "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713" : "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?", + "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714" : "The expression of an export assignment must be an identifier or qualified name in an ambient context.", + "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715" : "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor.", + "Type_parameter_0_has_a_circular_default_2716" : "Type parameter '{0}' has a circular default.", + "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" : "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.", + "Duplicate_declaration_0_2718" : "Duplicate declaration '{0}'.", + "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" : "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.", + "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" : "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?", + "Cannot_invoke_an_object_which_is_possibly_null_2721" : "Cannot invoke an object which is possibly 'null'.", + "Cannot_invoke_an_object_which_is_possibly_undefined_2722" : "Cannot invoke an object which is possibly 'undefined'.", + "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723" : "Cannot invoke an object which is possibly 'null' or 'undefined'.", + "Module_0_has_no_exported_member_1_Did_you_mean_2_2724" : "Module '{0}' has no exported member '{1}'. Did you mean '{2}'?", + "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725" : "Class name cannot be 'Object' when targeting ES5 with module {0}.", + "Cannot_find_lib_definition_for_0_2726" : "Cannot find lib definition for '{0}'.", + "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727" : "Cannot find lib definition for '{0}'. Did you mean '{1}'?", + "Import_declaration_0_is_using_private_name_1_4000" : "Import declaration '{0}' is using private name '{1}'.", + "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002" : "Type parameter '{0}' of exported class has or is using private name '{1}'.", + "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004" : "Type parameter '{0}' of exported interface has or is using private name '{1}'.", + "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006" : "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.", + "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008" : "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.", + "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010" : "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.", + "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012" : "Type parameter '{0}' of public method from exported class has or is using private name '{1}'.", + "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014" : "Type parameter '{0}' of method from exported interface has or is using private name '{1}'.", + "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016" : "Type parameter '{0}' of exported function has or is using private name '{1}'.", + "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019" : "Implements clause of exported class '{0}' has or is using private name '{1}'.", + "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020" : "'extends' clause of exported class '{0}' has or is using private name '{1}'.", + "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022" : "'extends' clause of exported interface '{0}' has or is using private name '{1}'.", + "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023" : "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.", + "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024" : "Exported variable '{0}' has or is using name '{1}' from private module '{2}'.", + "Exported_variable_0_has_or_is_using_private_name_1_4025" : "Exported variable '{0}' has or is using private name '{1}'.", + "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026" : "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027" : "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'.", + "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028" : "Public static property '{0}' of exported class has or is using private name '{1}'.", + "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029" : "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030" : "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'.", + "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031" : "Public property '{0}' of exported class has or is using private name '{1}'.", + "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032" : "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'.", + "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033" : "Property '{0}' of exported interface has or is using private name '{1}'.", + "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034" : "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.", + "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035" : "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'.", + "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036" : "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.", + "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037" : "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'.", + "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038" : "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039" : "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.", + "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040" : "Return type of public static getter '{0}' from exported class has or is using private name '{1}'.", + "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041" : "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042" : "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.", + "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043" : "Return type of public getter '{0}' from exported class has or is using private name '{1}'.", + "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044" : "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'.", + "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045" : "Return type of constructor signature from exported interface has or is using private name '{0}'.", + "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046" : "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'.", + "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047" : "Return type of call signature from exported interface has or is using private name '{0}'.", + "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048" : "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'.", + "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049" : "Return type of index signature from exported interface has or is using private name '{0}'.", + "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050" : "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.", + "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051" : "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'.", + "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052" : "Return type of public static method from exported class has or is using private name '{0}'.", + "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053" : "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.", + "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054" : "Return type of public method from exported class has or is using name '{0}' from private module '{1}'.", + "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055" : "Return type of public method from exported class has or is using private name '{0}'.", + "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056" : "Return type of method from exported interface has or is using name '{0}' from private module '{1}'.", + "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057" : "Return type of method from exported interface has or is using private name '{0}'.", + "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058" : "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.", + "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059" : "Return type of exported function has or is using name '{0}' from private module '{1}'.", + "Return_type_of_exported_function_has_or_is_using_private_name_0_4060" : "Return type of exported function has or is using private name '{0}'.", + "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061" : "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062" : "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063" : "Parameter '{0}' of constructor from exported class has or is using private name '{1}'.", + "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064" : "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065" : "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.", + "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066" : "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067" : "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'.", + "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068" : "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069" : "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070" : "Parameter '{0}' of public static method from exported class has or is using private name '{1}'.", + "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071" : "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072" : "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073" : "Parameter '{0}' of public method from exported class has or is using private name '{1}'.", + "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074" : "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075" : "Parameter '{0}' of method from exported interface has or is using private name '{1}'.", + "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076" : "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.", + "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077" : "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078" : "Parameter '{0}' of exported function has or is using private name '{1}'.", + "Exported_type_alias_0_has_or_is_using_private_name_1_4081" : "Exported type alias '{0}' has or is using private name '{1}'.", + "Default_export_of_the_module_has_or_is_using_private_name_0_4082" : "Default export of the module has or is using private name '{0}'.", + "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083" : "Type parameter '{0}' of exported type alias has or is using private name '{1}'.", + "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090" : "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict.", + "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091" : "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'.", + "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092" : "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'.", + "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094" : "Property '{0}' of exported class expression may not be private or protected.", + "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095" : "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096" : "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'.", + "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097" : "Public static method '{0}' of exported class has or is using private name '{1}'.", + "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098" : "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.", + "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099" : "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'.", + "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100" : "Public method '{0}' of exported class has or is using private name '{1}'.", + "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101" : "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'.", + "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102" : "Method '{0}' of exported interface has or is using private name '{1}'.", + "The_current_host_does_not_support_the_0_option_5001" : "The current host does not support the '{0}' option.", + "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009" : "Cannot find the common subdirectory path for the input files.", + "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" : "File specification cannot end in a recursive directory wildcard ('**'): '{0}'.", + "Cannot_read_file_0_Colon_1_5012" : "Cannot read file '{0}': {1}.", + "Failed_to_parse_file_0_Colon_1_5014" : "Failed to parse file '{0}': {1}.", + "Unknown_compiler_option_0_5023" : "Unknown compiler option '{0}'.", + "Compiler_option_0_requires_a_value_of_type_1_5024" : "Compiler option '{0}' requires a value of type {1}.", + "Could_not_write_file_0_Colon_1_5033" : "Could not write file '{0}': {1}.", + "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042" : "Option 'project' cannot be mixed with source files on a command line.", + "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047" : "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.", + "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051" : "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.", + "Option_0_cannot_be_specified_without_specifying_option_1_5052" : "Option '{0}' cannot be specified without specifying option '{1}'.", + "Option_0_cannot_be_specified_with_option_1_5053" : "Option '{0}' cannot be specified with option '{1}'.", + "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054" : "A 'tsconfig.json' file is already defined at: '{0}'.", + "Cannot_write_file_0_because_it_would_overwrite_input_file_5055" : "Cannot write file '{0}' because it would overwrite input file.", + "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056" : "Cannot write file '{0}' because it would be overwritten by multiple input files.", + "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057" : "Cannot find a tsconfig.json file at the specified directory: '{0}'.", + "The_specified_path_does_not_exist_Colon_0_5058" : "The specified path does not exist: '{0}'.", + "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059" : "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier.", + "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060" : "Option 'paths' cannot be used without specifying '--baseUrl' option.", + "Pattern_0_can_have_at_most_one_Asterisk_character_5061" : "Pattern '{0}' can have at most one '*' character.", + "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062" : "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.", + "Substitutions_for_pattern_0_should_be_an_array_5063" : "Substitutions for pattern '{0}' should be an array.", + "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064" : "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'.", + "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065" : "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'.", + "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066" : "Substitutions for pattern '{0}' shouldn't be an empty array.", + "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067" : "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name.", + "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" : "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.", + "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069" : "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'.", + "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070" : "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.", + "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000" : "Generates a sourcemap for each corresponding '.d.ts' file.", + "Concatenate_and_emit_output_to_single_file_6001" : "Concatenate and emit output to single file.", + "Generates_corresponding_d_ts_file_6002" : "Generates corresponding '.d.ts' file.", + "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003" : "Specify the location where debugger should locate map files instead of generated locations.", + "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004" : "Specify the location where debugger should locate TypeScript files instead of source locations.", + "Watch_input_files_6005" : "Watch input files.", + "Redirect_output_structure_to_the_directory_6006" : "Redirect output structure to the directory.", + "Do_not_erase_const_enum_declarations_in_generated_code_6007" : "Do not erase const enum declarations in generated code.", + "Do_not_emit_outputs_if_any_errors_were_reported_6008" : "Do not emit outputs if any errors were reported.", + "Do_not_emit_comments_to_output_6009" : "Do not emit comments to output.", + "Do_not_emit_outputs_6010" : "Do not emit outputs.", + "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" : "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.", + "Skip_type_checking_of_declaration_files_6012" : "Skip type checking of declaration files.", + "Do_not_resolve_the_real_path_of_symlinks_6013" : "Do not resolve the real path of symlinks.", + "Only_emit_d_ts_declaration_files_6014" : "Only emit '.d.ts' declaration files.", + "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" : "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.", + "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016" : "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.", + "Print_this_message_6017" : "Print this message.", + "Print_the_compiler_s_version_6019" : "Print the compiler's version.", + "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020" : "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.", + "Syntax_Colon_0_6023" : "Syntax: {0}", + "options_6024" : "options", + "file_6025" : "file", + "Examples_Colon_0_6026" : "Examples: {0}", + "Options_Colon_6027" : "Options:", + "Version_0_6029" : "Version {0}", + "Insert_command_line_options_and_files_from_a_file_6030" : "Insert command line options and files from a file.", + "Starting_compilation_in_watch_mode_6031" : "Starting compilation in watch mode...", + "File_change_detected_Starting_incremental_compilation_6032" : "File change detected. Starting incremental compilation...", + "KIND_6034" : "KIND", + "FILE_6035" : "FILE", + "VERSION_6036" : "VERSION", + "LOCATION_6037" : "LOCATION", + "DIRECTORY_6038" : "DIRECTORY", + "STRATEGY_6039" : "STRATEGY", + "FILE_OR_DIRECTORY_6040" : "FILE OR DIRECTORY", + "Generates_corresponding_map_file_6043" : "Generates corresponding '.map' file.", + "Compiler_option_0_expects_an_argument_6044" : "Compiler option '{0}' expects an argument.", + "Unterminated_quoted_string_in_response_file_0_6045" : "Unterminated quoted string in response file '{0}'.", + "Argument_for_0_option_must_be_Colon_1_6046" : "Argument for '{0}' option must be: {1}.", + "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048" : "Locale must be of the form or -. For example '{0}' or '{1}'.", + "Unsupported_locale_0_6049" : "Unsupported locale '{0}'.", + "Unable_to_open_file_0_6050" : "Unable to open file '{0}'.", + "Corrupted_locale_file_0_6051" : "Corrupted locale file {0}.", + "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052" : "Raise error on expressions and declarations with an implied 'any' type.", + "File_0_not_found_6053" : "File '{0}' not found.", + "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054" : "File '{0}' has unsupported extension. The only supported extensions are {1}.", + "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055" : "Suppress noImplicitAny errors for indexing objects lacking index signatures.", + "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056" : "Do not emit declarations for code that has an '@internal' annotation.", + "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058" : "Specify the root directory of input files. Use to control the output directory structure with --outDir.", + "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059" : "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.", + "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060" : "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).", + "NEWLINE_6061" : "NEWLINE", + "Option_0_can_only_be_specified_in_tsconfig_json_file_6064" : "Option '{0}' can only be specified in 'tsconfig.json' file.", + "Enables_experimental_support_for_ES7_decorators_6065" : "Enables experimental support for ES7 decorators.", + "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066" : "Enables experimental support for emitting type metadata for decorators.", + "Enables_experimental_support_for_ES7_async_functions_6068" : "Enables experimental support for ES7 async functions.", + "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069" : "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).", + "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070" : "Initializes a TypeScript project and creates a tsconfig.json file.", + "Successfully_created_a_tsconfig_json_file_6071" : "Successfully created a tsconfig.json file.", + "Suppress_excess_property_checks_for_object_literals_6072" : "Suppress excess property checks for object literals.", + "Stylize_errors_and_messages_using_color_and_context_experimental_6073" : "Stylize errors and messages using color and context (experimental).", + "Do_not_report_errors_on_unused_labels_6074" : "Do not report errors on unused labels.", + "Report_error_when_not_all_code_paths_in_function_return_a_value_6075" : "Report error when not all code paths in function return a value.", + "Report_errors_for_fallthrough_cases_in_switch_statement_6076" : "Report errors for fallthrough cases in switch statement.", + "Do_not_report_errors_on_unreachable_code_6077" : "Do not report errors on unreachable code.", + "Disallow_inconsistently_cased_references_to_the_same_file_6078" : "Disallow inconsistently-cased references to the same file.", + "Specify_library_files_to_be_included_in_the_compilation_6079" : "Specify library files to be included in the compilation.", + "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080" : "Specify JSX code generation: 'preserve', 'react-native', or 'react'.", + "File_0_has_an_unsupported_extension_so_skipping_it_6081" : "File '{0}' has an unsupported extension, so skipping it.", + "Only_amd_and_system_modules_are_supported_alongside_0_6082" : "Only 'amd' and 'system' modules are supported alongside --{0}.", + "Base_directory_to_resolve_non_absolute_module_names_6083" : "Base directory to resolve non-absolute module names.", + "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084" : "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit", + "Enable_tracing_of_the_name_resolution_process_6085" : "Enable tracing of the name resolution process.", + "Resolving_module_0_from_1_6086" : "======== Resolving module '{0}' from '{1}'. ========", + "Explicitly_specified_module_resolution_kind_Colon_0_6087" : "Explicitly specified module resolution kind: '{0}'.", + "Module_resolution_kind_is_not_specified_using_0_6088" : "Module resolution kind is not specified, using '{0}'.", + "Module_name_0_was_successfully_resolved_to_1_6089" : "======== Module name '{0}' was successfully resolved to '{1}'. ========", + "Module_name_0_was_not_resolved_6090" : "======== Module name '{0}' was not resolved. ========", + "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091" : "'paths' option is specified, looking for a pattern to match module name '{0}'.", + "Module_name_0_matched_pattern_1_6092" : "Module name '{0}', matched pattern '{1}'.", + "Trying_substitution_0_candidate_module_location_Colon_1_6093" : "Trying substitution '{0}', candidate module location: '{1}'.", + "Resolving_module_name_0_relative_to_base_url_1_2_6094" : "Resolving module name '{0}' relative to base url '{1}' - '{2}'.", + "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095" : "Loading module as file / folder, candidate module location '{0}', target file type '{1}'.", + "File_0_does_not_exist_6096" : "File '{0}' does not exist.", + "File_0_exist_use_it_as_a_name_resolution_result_6097" : "File '{0}' exist - use it as a name resolution result.", + "Loading_module_0_from_node_modules_folder_target_file_type_1_6098" : "Loading module '{0}' from 'node_modules' folder, target file type '{1}'.", + "Found_package_json_at_0_6099" : "Found 'package.json' at '{0}'.", + "package_json_does_not_have_a_0_field_6100" : "'package.json' does not have a '{0}' field.", + "package_json_has_0_field_1_that_references_2_6101" : "'package.json' has '{0}' field '{1}' that references '{2}'.", + "Allow_javascript_files_to_be_compiled_6102" : "Allow javascript files to be compiled.", + "Option_0_should_have_array_of_strings_as_a_value_6103" : "Option '{0}' should have array of strings as a value.", + "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104" : "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.", + "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105" : "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'.", + "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106" : "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.", + "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107" : "'rootDirs' option is set, using it to resolve relative module name '{0}'.", + "Longest_matching_prefix_for_0_is_1_6108" : "Longest matching prefix for '{0}' is '{1}'.", + "Loading_0_from_the_root_dir_1_candidate_location_2_6109" : "Loading '{0}' from the root dir '{1}', candidate location '{2}'.", + "Trying_other_entries_in_rootDirs_6110" : "Trying other entries in 'rootDirs'.", + "Module_resolution_using_rootDirs_has_failed_6111" : "Module resolution using 'rootDirs' has failed.", + "Do_not_emit_use_strict_directives_in_module_output_6112" : "Do not emit 'use strict' directives in module output.", + "Enable_strict_null_checks_6113" : "Enable strict null checks.", + "Unknown_option_excludes_Did_you_mean_exclude_6114" : "Unknown option 'excludes'. Did you mean 'exclude'?", + "Raise_error_on_this_expressions_with_an_implied_any_type_6115" : "Raise error on 'this' expressions with an implied 'any' type.", + "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116" : "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========", + "Resolving_using_primary_search_paths_6117" : "Resolving using primary search paths...", + "Resolving_from_node_modules_folder_6118" : "Resolving from node_modules folder...", + "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119" : "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========", + "Type_reference_directive_0_was_not_resolved_6120" : "======== Type reference directive '{0}' was not resolved. ========", + "Resolving_with_primary_search_path_0_6121" : "Resolving with primary search path '{0}'.", + "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122" : "Root directory cannot be determined, skipping primary search paths.", + "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123" : "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========", + "Type_declaration_files_to_be_included_in_compilation_6124" : "Type declaration files to be included in compilation.", + "Looking_up_in_node_modules_folder_initial_location_0_6125" : "Looking up in 'node_modules' folder, initial location '{0}'.", + "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126" : "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder.", + "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127" : "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========", + "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128" : "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========", + "Resolving_real_path_for_0_result_1_6130" : "Resolving real path for '{0}', result '{1}'.", + "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131" : "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'.", + "File_name_0_has_a_1_extension_stripping_it_6132" : "File name '{0}' has a '{1}' extension - stripping it.", + "_0_is_declared_but_its_value_is_never_read_6133" : "'{0}' is declared but its value is never read.", + "Report_errors_on_unused_locals_6134" : "Report errors on unused locals.", + "Report_errors_on_unused_parameters_6135" : "Report errors on unused parameters.", + "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136" : "The maximum dependency depth to search under node_modules and load JavaScript files.", + "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137" : "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'.", + "Property_0_is_declared_but_its_value_is_never_read_6138" : "Property '{0}' is declared but its value is never read.", + "Import_emit_helpers_from_tslib_6139" : "Import emit helpers from 'tslib'.", + "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140" : "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'.", + "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141" : "Parse in strict mode and emit \"use strict\" for each source file.", + "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142" : "Module '{0}' was resolved to '{1}', but '--jsx' is not set.", + "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144" : "Module '{0}' was resolved as locally declared ambient module in file '{1}'.", + "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145" : "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified.", + "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146" : "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'.", + "Resolution_for_module_0_was_found_in_cache_from_location_1_6147" : "Resolution for module '{0}' was found in cache from location '{1}'.", + "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148" : "Directory '{0}' does not exist, skipping all lookups in it.", + "Show_diagnostic_information_6149" : "Show diagnostic information.", + "Show_verbose_diagnostic_information_6150" : "Show verbose diagnostic information.", + "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151" : "Emit a single file with source maps instead of having a separate file.", + "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152" : "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.", + "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153" : "Transpile each file as a separate module (similar to 'ts.transpileModule').", + "Print_names_of_generated_files_part_of_the_compilation_6154" : "Print names of generated files part of the compilation.", + "Print_names_of_files_part_of_the_compilation_6155" : "Print names of files part of the compilation.", + "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156" : "The locale used when displaying messages to the user (e.g. 'en-us')", + "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157" : "Do not generate custom helper functions like '__extends' in compiled output.", + "Do_not_include_the_default_library_file_lib_d_ts_6158" : "Do not include the default library file (lib.d.ts).", + "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159" : "Do not add triple-slash references or imported modules to the list of compiled files.", + "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160" : "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files.", + "List_of_folders_to_include_type_definitions_from_6161" : "List of folders to include type definitions from.", + "Disable_size_limitations_on_JavaScript_projects_6162" : "Disable size limitations on JavaScript projects.", + "The_character_set_of_the_input_files_6163" : "The character set of the input files.", + "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164" : "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.", + "Do_not_truncate_error_messages_6165" : "Do not truncate error messages.", + "Output_directory_for_generated_declaration_files_6166" : "Output directory for generated declaration files.", + "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167" : "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.", + "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168" : "List of root folders whose combined content represents the structure of the project at runtime.", + "Show_all_compiler_options_6169" : "Show all compiler options.", + "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170" : "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file", + "Command_line_Options_6171" : "Command-line Options", + "Basic_Options_6172" : "Basic Options", + "Strict_Type_Checking_Options_6173" : "Strict Type-Checking Options", + "Module_Resolution_Options_6174" : "Module Resolution Options", + "Source_Map_Options_6175" : "Source Map Options", + "Additional_Checks_6176" : "Additional Checks", + "Experimental_Options_6177" : "Experimental Options", + "Advanced_Options_6178" : "Advanced Options", + "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179" : "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.", + "Enable_all_strict_type_checking_options_6180" : "Enable all strict type-checking options.", + "List_of_language_service_plugins_6181" : "List of language service plugins.", + "Scoped_package_detected_looking_in_0_6182" : "Scoped package detected, looking in '{0}'", + "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183" : "Reusing resolution of module '{0}' to file '{1}' from old program.", + "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184" : "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program.", + "Disable_strict_checking_of_generic_signatures_in_function_types_6185" : "Disable strict checking of generic signatures in function types.", + "Enable_strict_checking_of_function_types_6186" : "Enable strict checking of function types.", + "Enable_strict_checking_of_property_initialization_in_classes_6187" : "Enable strict checking of property initialization in classes.", + "Numeric_separators_are_not_allowed_here_6188" : "Numeric separators are not allowed here.", + "Multiple_consecutive_numeric_separators_are_not_permitted_6189" : "Multiple consecutive numeric separators are not permitted.", + "Found_package_json_at_0_Package_ID_is_1_6190" : "Found 'package.json' at '{0}'. Package ID is '{1}'.", + "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191" : "Whether to keep outdated console output in watch mode instead of clearing the screen.", + "All_imports_in_import_declaration_are_unused_6192" : "All imports in import declaration are unused.", + "Found_1_error_Watching_for_file_changes_6193" : "Found 1 error. Watching for file changes.", + "Found_0_errors_Watching_for_file_changes_6194" : "Found {0} errors. Watching for file changes.", + "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195" : "Resolve 'keyof' to string valued property names only (no numbers or symbols).", + "_0_is_declared_but_never_used_6196" : "'{0}' is declared but never used.", + "Include_modules_imported_with_json_extension_6197" : "Include modules imported with '.json' extension", + "All_destructured_elements_are_unused_6198" : "All destructured elements are unused.", + "All_variables_are_unused_6199" : "All variables are unused.", + "Projects_to_reference_6300" : "Projects to reference", + "Enable_project_compilation_6302" : "Enable project compilation", + "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202" : "Project references may not form a circular graph. Cycle detected: {0}", + "Composite_projects_may_not_disable_declaration_emit_6304" : "Composite projects may not disable declaration emit.", + "Output_file_0_has_not_been_built_from_source_file_1_6305" : "Output file '{0}' has not been built from source file '{1}'.", + "Referenced_project_0_must_have_setting_composite_Colon_true_6306" : "Referenced project '{0}' must have setting \"composite\": true.", + "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307" : "File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern.", + "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308" : "Cannot prepend project '{0}' because it does not have 'outFile' set", + "Output_file_0_from_project_1_does_not_exist_6309" : "Output file '{0}' from project '{1}' does not exist", + "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350" : "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'", + "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351" : "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'", + "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352" : "Project '{0}' is out of date because output file '{1}' does not exist", + "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353" : "Project '{0}' is out of date because its dependency '{1}' is out of date", + "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354" : "Project '{0}' is up to date with .d.ts files from its dependencies", + "Projects_in_this_build_Colon_0_6355" : "Projects in this build: {0}", + "A_non_dry_build_would_delete_the_following_files_Colon_0_6356" : "A non-dry build would delete the following files: {0}", + "A_non_dry_build_would_build_project_0_6357" : "A non-dry build would build project '{0}'", + "Building_project_0_6358" : "Building project '{0}'...", + "Updating_output_timestamps_of_project_0_6359" : "Updating output timestamps of project '{0}'...", + "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360" : "delete this - Project '{0}' is up to date because it was previously built", + "Project_0_is_up_to_date_6361" : "Project '{0}' is up to date", + "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362" : "Skipping build of project '{0}' because its dependency '{1}' has errors", + "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363" : "Project '{0}' can't be built because its dependency '{1}' has errors", + "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364" : "Build one or more projects and their dependencies, if out of date", + "Delete_the_outputs_of_all_projects_6365" : "Delete the outputs of all projects", + "Enable_verbose_logging_6366" : "Enable verbose logging", + "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367" : "Show what would be built (or deleted, if specified with '--clean')", + "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368" : "Build all projects, including those that appear to be up to date", + "Option_build_must_be_the_first_command_line_argument_6369" : "Option '--build' must be the first command line argument.", + "Options_0_and_1_cannot_be_combined_6370" : "Options '{0}' and '{1}' cannot be combined.", + "Skipping_clean_because_not_all_projects_could_be_located_6371" : "Skipping clean because not all projects could be located", + "Variable_0_implicitly_has_an_1_type_7005" : "Variable '{0}' implicitly has an '{1}' type.", + "Parameter_0_implicitly_has_an_1_type_7006" : "Parameter '{0}' implicitly has an '{1}' type.", + "Member_0_implicitly_has_an_1_type_7008" : "Member '{0}' implicitly has an '{1}' type.", + "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009" : "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.", + "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010" : "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type.", + "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011" : "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type.", + "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013" : "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.", + "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015" : "Element implicitly has an 'any' type because index expression is not of type 'number'.", + "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016" : "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.", + "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017" : "Element implicitly has an 'any' type because type '{0}' has no index signature.", + "Object_literal_s_property_0_implicitly_has_an_1_type_7018" : "Object literal's property '{0}' implicitly has an '{1}' type.", + "Rest_parameter_0_implicitly_has_an_any_type_7019" : "Rest parameter '{0}' implicitly has an 'any[]' type.", + "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020" : "Call signature, which lacks return-type annotation, implicitly has an 'any' return type.", + "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022" : "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023" : "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.", + "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024" : "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.", + "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025" : "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type.", + "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026" : "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.", + "Unreachable_code_detected_7027" : "Unreachable code detected.", + "Unused_label_7028" : "Unused label.", + "Fallthrough_case_in_switch_7029" : "Fallthrough case in switch.", + "Not_all_code_paths_return_a_value_7030" : "Not all code paths return a value.", + "Binding_element_0_implicitly_has_an_1_type_7031" : "Binding element '{0}' implicitly has an '{1}' type.", + "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032" : "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.", + "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033" : "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.", + "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034" : "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined.", + "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035" : "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`", + "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036" : "Dynamic import's specifier must be of type 'string', but here has type '{0}'.", + "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037" : "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.", + "A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038" : "A namespace-style import cannot be called or constructed, and will cause a failure at runtime.", + "Mapped_object_type_implicitly_has_an_any_template_type_7039" : "Mapped object type implicitly has an 'any' template type.", + "You_cannot_rename_this_element_8000" : "You cannot rename this element.", + "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001" : "You cannot rename elements that are defined in the standard TypeScript library.", + "import_can_only_be_used_in_a_ts_file_8002" : "'import ... =' can only be used in a .ts file.", + "export_can_only_be_used_in_a_ts_file_8003" : "'export=' can only be used in a .ts file.", + "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004" : "'type parameter declarations' can only be used in a .ts file.", + "implements_clauses_can_only_be_used_in_a_ts_file_8005" : "'implements clauses' can only be used in a .ts file.", + "interface_declarations_can_only_be_used_in_a_ts_file_8006" : "'interface declarations' can only be used in a .ts file.", + "module_declarations_can_only_be_used_in_a_ts_file_8007" : "'module declarations' can only be used in a .ts file.", + "type_aliases_can_only_be_used_in_a_ts_file_8008" : "'type aliases' can only be used in a .ts file.", + "_0_can_only_be_used_in_a_ts_file_8009" : "'{0}' can only be used in a .ts file.", + "types_can_only_be_used_in_a_ts_file_8010" : "'types' can only be used in a .ts file.", + "type_arguments_can_only_be_used_in_a_ts_file_8011" : "'type arguments' can only be used in a .ts file.", + "parameter_modifiers_can_only_be_used_in_a_ts_file_8012" : "'parameter modifiers' can only be used in a .ts file.", + "non_null_assertions_can_only_be_used_in_a_ts_file_8013" : "'non-null assertions' can only be used in a .ts file.", + "enum_declarations_can_only_be_used_in_a_ts_file_8015" : "'enum declarations' can only be used in a .ts file.", + "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016" : "'type assertion expressions' can only be used in a .ts file.", + "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017" : "Octal literal types must use ES2015 syntax. Use the syntax '{0}'.", + "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018" : "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'.", + "Report_errors_in_js_files_8019" : "Report errors in .js files.", + "JSDoc_types_can_only_be_used_inside_documentation_comments_8020" : "JSDoc types can only be used inside documentation comments.", + "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021" : "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.", + "JSDoc_0_is_not_attached_to_a_class_8022" : "JSDoc '@{0}' is not attached to a class.", + "JSDoc_0_1_does_not_match_the_extends_2_clause_8023" : "JSDoc '@{0} {1}' does not match the 'extends {2}' clause.", + "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024" : "JSDoc '@param' tag has name '{0}', but there is no parameter with that name.", + "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025" : "Class declarations cannot have more than one `@augments` or `@extends` tag.", + "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026" : "Expected {0} type arguments; provide these with an '@extends' tag.", + "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027" : "Expected {0}-{1} type arguments; provide these with an '@extends' tag.", + "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028" : "JSDoc '...' may only appear in the last parameter of a signature.", + "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029" : "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type.", + "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002" : "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause.", + "class_expressions_are_not_currently_supported_9003" : "'class' expressions are not currently supported.", + "Language_service_is_disabled_9004" : "Language service is disabled.", + "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" : "JSX attributes must only be assigned a non-empty 'expression'.", + "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001" : "JSX elements cannot have multiple attributes with the same name.", + "Expected_corresponding_JSX_closing_tag_for_0_17002" : "Expected corresponding JSX closing tag for '{0}'.", + "JSX_attribute_expected_17003" : "JSX attribute expected.", + "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004" : "Cannot use JSX unless the '--jsx' flag is provided.", + "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005" : "A constructor cannot contain a 'super' call when its class extends 'null'.", + "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006" : "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.", + "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007" : "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.", + "JSX_element_0_has_no_corresponding_closing_tag_17008" : "JSX element '{0}' has no corresponding closing tag.", + "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009" : "'super' must be called before accessing 'this' in the constructor of a derived class.", + "Unknown_type_acquisition_option_0_17010" : "Unknown type acquisition option '{0}'.", + "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011" : "'super' must be called before accessing a property of 'super' in the constructor of a derived class.", + "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012" : "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?", + "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013" : "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor.", + "JSX_fragment_has_no_corresponding_closing_tag_17014" : "JSX fragment has no corresponding closing tag.", + "Expected_corresponding_closing_tag_for_JSX_fragment_17015" : "Expected corresponding closing tag for JSX fragment.", + "JSX_fragment_is_not_supported_when_using_jsxFactory_17016" : "JSX fragment is not supported when using --jsxFactory", + "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017" : "JSX fragment is not supported when using an inline JSX factory pragma", + "Circularity_detected_while_resolving_configuration_Colon_0_18000" : "Circularity detected while resolving configuration: {0}", + "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001" : "A path in an 'extends' option must be relative or rooted, but '{0}' is not.", + "The_files_list_in_config_file_0_is_empty_18002" : "The 'files' list in config file '{0}' is empty.", + "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003" : "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'.", + "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001" : "File is a CommonJS module; it may be converted to an ES6 module.", + "This_constructor_function_may_be_converted_to_a_class_declaration_80002" : "This constructor function may be converted to a class declaration.", + "Import_may_be_converted_to_a_default_import_80003" : "Import may be converted to a default import.", + "JSDoc_types_may_be_moved_to_TypeScript_types_80004" : "JSDoc types may be moved to TypeScript types.", + "require_call_may_be_converted_to_an_import_80005" : "'require' call may be converted to an import.", + "Add_missing_super_call_90001" : "Add missing 'super()' call", + "Make_super_call_the_first_statement_in_the_constructor_90002" : "Make 'super()' call the first statement in the constructor", + "Change_extends_to_implements_90003" : "Change 'extends' to 'implements'", + "Remove_declaration_for_Colon_0_90004" : "Remove declaration for: '{0}'", + "Remove_import_from_0_90005" : "Remove import from '{0}'", + "Implement_interface_0_90006" : "Implement interface '{0}'", + "Implement_inherited_abstract_class_90007" : "Implement inherited abstract class", + "Add_0_to_unresolved_variable_90008" : "Add '{0}.' to unresolved variable", + "Remove_destructuring_90009" : "Remove destructuring", + "Remove_variable_statement_90010" : "Remove variable statement", + "Import_0_from_module_1_90013" : "Import '{0}' from module \"{1}\"", + "Change_0_to_1_90014" : "Change '{0}' to '{1}'", + "Add_0_to_existing_import_declaration_from_1_90015" : "Add '{0}' to existing import declaration from \"{1}\"", + "Declare_property_0_90016" : "Declare property '{0}'", + "Add_index_signature_for_property_0_90017" : "Add index signature for property '{0}'", + "Disable_checking_for_this_file_90018" : "Disable checking for this file", + "Ignore_this_error_message_90019" : "Ignore this error message", + "Initialize_property_0_in_the_constructor_90020" : "Initialize property '{0}' in the constructor", + "Initialize_static_property_0_90021" : "Initialize static property '{0}'", + "Change_spelling_to_0_90022" : "Change spelling to '{0}'", + "Declare_method_0_90023" : "Declare method '{0}'", + "Declare_static_method_0_90024" : "Declare static method '{0}'", + "Prefix_0_with_an_underscore_90025" : "Prefix '{0}' with an underscore", + "Rewrite_as_the_indexed_access_type_0_90026" : "Rewrite as the indexed access type '{0}'", + "Declare_static_property_0_90027" : "Declare static property '{0}'", + "Call_decorator_expression_90028" : "Call decorator expression", + "Add_async_modifier_to_containing_function_90029" : "Add async modifier to containing function", + "Convert_function_to_an_ES2015_class_95001" : "Convert function to an ES2015 class", + "Convert_function_0_to_class_95002" : "Convert function '{0}' to class", + "Extract_to_0_in_1_95004" : "Extract to {0} in {1}", + "Extract_function_95005" : "Extract function", + "Extract_constant_95006" : "Extract constant", + "Extract_to_0_in_enclosing_scope_95007" : "Extract to {0} in enclosing scope", + "Extract_to_0_in_1_scope_95008" : "Extract to {0} in {1} scope", + "Annotate_with_type_from_JSDoc_95009" : "Annotate with type from JSDoc", + "Annotate_with_types_from_JSDoc_95010" : "Annotate with types from JSDoc", + "Infer_type_of_0_from_usage_95011" : "Infer type of '{0}' from usage", + "Infer_parameter_types_from_usage_95012" : "Infer parameter types from usage", + "Convert_to_default_import_95013" : "Convert to default import", + "Install_0_95014" : "Install '{0}'", + "Replace_import_with_0_95015" : "Replace import with '{0}'.", + "Use_synthetic_default_member_95016" : "Use synthetic 'default' member.", + "Convert_to_ES6_module_95017" : "Convert to ES6 module", + "Add_undefined_type_to_property_0_95018" : "Add 'undefined' type to property '{0}'", + "Add_initializer_to_property_0_95019" : "Add initializer to property '{0}'", + "Add_definite_assignment_assertion_to_property_0_95020" : "Add definite assignment assertion to property '{0}'", + "Add_all_missing_members_95022" : "Add all missing members", + "Infer_all_types_from_usage_95023" : "Infer all types from usage", + "Delete_all_unused_declarations_95024" : "Delete all unused declarations", + "Prefix_all_unused_declarations_with_where_possible_95025" : "Prefix all unused declarations with '_' where possible", + "Fix_all_detected_spelling_errors_95026" : "Fix all detected spelling errors", + "Add_initializers_to_all_uninitialized_properties_95027" : "Add initializers to all uninitialized properties", + "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028" : "Add definite assignment assertions to all uninitialized properties", + "Add_undefined_type_to_all_uninitialized_properties_95029" : "Add undefined type to all uninitialized properties", + "Change_all_jsdoc_style_types_to_TypeScript_95030" : "Change all jsdoc-style types to TypeScript", + "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031" : "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)", + "Implement_all_unimplemented_interfaces_95032" : "Implement all unimplemented interfaces", + "Install_all_missing_types_packages_95033" : "Install all missing types packages", + "Rewrite_all_as_indexed_access_types_95034" : "Rewrite all as indexed access types", + "Convert_all_to_default_imports_95035" : "Convert all to default imports", + "Make_all_super_calls_the_first_statement_in_their_constructor_95036" : "Make all 'super()' calls the first statement in their constructor", + "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" : "Add qualifier to all unresolved variables matching a member name", + "Change_all_extended_interfaces_to_implements_95038" : "Change all extended interfaces to 'implements'", + "Add_all_missing_super_calls_95039" : "Add all missing super calls", + "Implement_all_inherited_abstract_classes_95040" : "Implement all inherited abstract classes", + "Add_all_missing_async_modifiers_95041" : "Add all missing 'async' modifiers", + "Add_ts_ignore_to_all_error_messages_95042" : "Add '@ts-ignore' to all error messages", + "Annotate_everything_with_types_from_JSDoc_95043" : "Annotate everything with types from JSDoc", + "Add_to_all_uncalled_decorators_95044" : "Add '()' to all uncalled decorators", + "Convert_all_constructor_functions_to_classes_95045" : "Convert all constructor functions to classes", + "Generate_get_and_set_accessors_95046" : "Generate 'get' and 'set' accessors", + "Convert_require_to_import_95047" : "Convert 'require' to 'import'", + "Convert_all_require_to_import_95048" : "Convert all 'require' to 'import'", + "Move_to_a_new_file_95049" : "Move to a new file", + "Remove_unreachable_code_95050" : "Remove unreachable code", + "Remove_all_unreachable_code_95051" : "Remove all unreachable code", + "Add_missing_typeof_95052" : "Add missing 'typeof'", + "Remove_unused_label_95053" : "Remove unused label", + "Remove_all_unused_labels_95054" : "Remove all unused labels", + "Convert_0_to_mapped_object_type_95055" : "Convert '{0}' to mapped object type", + "Convert_namespace_import_to_named_imports_95056" : "Convert namespace import to named imports", + "Convert_named_imports_to_namespace_import_95057" : "Convert named imports to namespace import" +} \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/parser/diagnosticMessages.json similarity index 100% rename from src/compiler/diagnosticMessages.json rename to src/parser/diagnosticMessages.json diff --git a/src/compiler/parser.ts b/src/parser/parser.ts similarity index 100% rename from src/compiler/parser.ts rename to src/parser/parser.ts diff --git a/src/compiler/scanner.ts b/src/parser/scanner.ts similarity index 100% rename from src/compiler/scanner.ts rename to src/parser/scanner.ts diff --git a/src/compiler/sys.ts b/src/parser/sys.ts similarity index 100% rename from src/compiler/sys.ts rename to src/parser/sys.ts diff --git a/src/parser/tsconfig.json b/src/parser/tsconfig.json new file mode 100644 index 00000000000..4ccdc05fd27 --- /dev/null +++ b/src/parser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/parser.js" + }, + "files": [ + "types.ts", + "sys.ts", + "diagnosticInformationMap.generated.ts", + "scanner.ts", + "utilities.ts", + "parser.ts", + "commandLineParser.ts" + ], + "references": [ + { "path": "../core" } + ] +} diff --git a/src/compiler/types.ts b/src/parser/types.ts similarity index 97% rename from src/compiler/types.ts rename to src/parser/types.ts index 1378be2a724..c6f00da2913 100644 --- a/src/compiler/types.ts +++ b/src/parser/types.ts @@ -1,54 +1,4 @@ namespace ts { - /** - * Type of objects whose values are all of the same type. - * The `in` and `for-in` operators can *not* be safely used, - * since `Object.prototype` may be modified by outside code. - */ - export interface MapLike { - [index: string]: T; - } - - /** ES6 Map interface, only read methods included. */ - export interface ReadonlyMap { - get(key: string): T | undefined; - has(key: string): boolean; - forEach(action: (value: T, key: string) => void): void; - readonly size: number; - keys(): Iterator; - values(): Iterator; - entries(): Iterator<[string, T]>; - } - - /** ES6 Map interface. */ - export interface Map extends ReadonlyMap { - set(key: string, value: T): this; - delete(key: string): boolean; - clear(): void; - } - - /** ES6 Iterator type. */ - export interface Iterator { - next(): { value: T, done: false } | { value: never, done: true }; - } - - /** Array that is only intended to be pushed to, never read. */ - export interface Push { - push(...values: T[]): void; - } - - /* @internal */ - export type EqualityComparer = (a: T, b: T) => boolean; - - /* @internal */ - export type Comparer = (a: T, b: T) => Comparison; - - /* @internal */ - export const enum Comparison { - LessThan = -1, - EqualTo = 0, - GreaterThan = 1 - } - // branded string type used to store absolute, normalized and canonicalized paths // arbitrary file name can be converted to Path via toPath function export type Path = string & { __pathBrand: any }; @@ -3619,13 +3569,6 @@ namespace ts { /** SymbolTable based on ES6 Map interface. */ export type SymbolTable = UnderscoreEscapedMap; - /** Represents a "prefix*suffix" pattern. */ - /* @internal */ - export interface Pattern { - prefix: string; - suffix: string; - } - /** Used to track a `declare module "foo*"`-like declaration. */ /* @internal */ export interface PatternAmbientModule { @@ -5340,10 +5283,6 @@ namespace ts { newLength: number; } - export interface SortedArray extends Array { - " __sortedArrayBrand": any; - } - /* @internal */ export interface DiagnosticCollection { // Adds a diagnostic to this diagnostic collection. diff --git a/src/compiler/utilities.ts b/src/parser/utilities.ts similarity index 77% rename from src/compiler/utilities.ts rename to src/parser/utilities.ts index 156555124bd..52e81dd517c 100644 --- a/src/compiler/utilities.ts +++ b/src/parser/utilities.ts @@ -1,3 +1,33 @@ +/** Non-internal stuff goes here */ +namespace ts { + export const emptyArray: never[] = [] as never[]; + export function closeFileWatcher(watcher: FileWatcher) { + watcher.close(); + } + + export function isExternalModuleNameRelative(moduleName: string): boolean { + // TypeScript 1.0 spec (April 2014): 11.2.1 + // An external module name is "relative" if the first term is "." or "..". + // Update: We also consider a path like `C:\foo.ts` "relative" because we do not search for it in `node_modules` or treat it as an ambient module. + return pathIsRelative(moduleName) || isRootedDiskPath(moduleName); + } + + export function sortAndDeduplicateDiagnostics(diagnostics: ReadonlyArray): T[] { + return sortAndDeduplicate(diagnostics, compareDiagnostics); + } + + export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { + const nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); + } + + export function hasEntries(map: ReadonlyUnderscoreEscapedMap | undefined): map is ReadonlyUnderscoreEscapedMap { + return !!map && !!map.size; + } +} + /* @internal */ namespace ts { export const resolvingEmptyArray: never[] = [] as never[]; @@ -19,6 +49,21 @@ namespace ts { return undefined; } + /** Create a new escaped identifier map. */ + export function createUnderscoreEscapedMap(): UnderscoreEscapedMap { + return new MapCtr() as UnderscoreEscapedMap; + } + + export function createSymbolTable(symbols?: ReadonlyArray): SymbolTable { + const result = createMap() as SymbolTable; + if (symbols) { + for (const symbol of symbols) { + result.set(symbol.escapedName, symbol); + } + } + return result; + } + const stringWriter = createSingleLineStringWriter(); function createSingleLineStringWriter(): EmitTextWriter { @@ -58,6 +103,109 @@ namespace ts { }; } + export function changesAffectModuleResolution(oldOptions: CompilerOptions, newOptions: CompilerOptions): boolean { + return !oldOptions || + (oldOptions.module !== newOptions.module) || + (oldOptions.moduleResolution !== newOptions.moduleResolution) || + (oldOptions.noResolve !== newOptions.noResolve) || + (oldOptions.target !== newOptions.target) || + (oldOptions.noLib !== newOptions.noLib) || + (oldOptions.jsx !== newOptions.jsx) || + (oldOptions.allowJs !== newOptions.allowJs) || + (oldOptions.rootDir !== newOptions.rootDir) || + (oldOptions.configFilePath !== newOptions.configFilePath) || + (oldOptions.baseUrl !== newOptions.baseUrl) || + (oldOptions.maxNodeModuleJsDepth !== newOptions.maxNodeModuleJsDepth) || + !arrayIsEqualTo(oldOptions.lib, newOptions.lib) || + !arrayIsEqualTo(oldOptions.typeRoots, newOptions.typeRoots) || + !arrayIsEqualTo(oldOptions.rootDirs, newOptions.rootDirs) || + !equalOwnProperties(oldOptions.paths, newOptions.paths); + } + + /** + * Iterates through the parent chain of a node and performs the callback on each parent until the callback + * returns a truthy value, then returns that value. + * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" + * At that point findAncestor returns undefined. + */ + export function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; + export function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; + export function findAncestor(node: Node, callback: (element: Node) => boolean | "quit"): Node | undefined { + while (node) { + const result = callback(node); + if (result === "quit") { + return undefined; + } + else if (result) { + return node; + } + node = node.parent; + } + return undefined; + } + + /** + * Calls `callback` for each entry in the map, returning the first truthy result. + * Use `map.forEach` instead for normal iteration. + */ + export function forEachEntry(map: ReadonlyUnderscoreEscapedMap, callback: (value: T, key: __String) => U | undefined): U | undefined; + export function forEachEntry(map: ReadonlyMap, callback: (value: T, key: string) => U | undefined): U | undefined; + export function forEachEntry(map: ReadonlyUnderscoreEscapedMap | ReadonlyMap, callback: (value: T, key: (string & __String)) => U | undefined): U | undefined { + const iterator = map.entries(); + for (let { value: pair, done } = iterator.next(); !done; { value: pair, done } = iterator.next()) { + const [key, value] = pair; + const result = callback(value, key as (string & __String)); + if (result) { + return result; + } + } + return undefined; + } + + /** `forEachEntry` for just keys. */ + export function forEachKey(map: ReadonlyUnderscoreEscapedMap<{}>, callback: (key: __String) => T | undefined): T | undefined; + export function forEachKey(map: ReadonlyMap<{}>, callback: (key: string) => T | undefined): T | undefined; + export function forEachKey(map: ReadonlyUnderscoreEscapedMap<{}> | ReadonlyMap<{}>, callback: (key: string & __String) => T | undefined): T | undefined { + const iterator = map.keys(); + for (let { value: key, done } = iterator.next(); !done; { value: key, done } = iterator.next()) { + const result = callback(key as string & __String); + if (result) { + return result; + } + } + return undefined; + } + + /** Copy entries from `source` to `target`. */ + export function copyEntries(source: ReadonlyUnderscoreEscapedMap, target: UnderscoreEscapedMap): void; + export function copyEntries(source: ReadonlyMap, target: Map): void; + export function copyEntries | Map>(source: U, target: U): void { + (source as Map).forEach((value, key) => { + (target as Map).set(key, value); + }); + } + + /** + * Creates a set from the elements of an array. + * + * @param array the array of input elements. + */ + export function arrayToSet(array: ReadonlyArray): Map; + export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => string | undefined): Map; + export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => __String | undefined): UnderscoreEscapedMap; + export function arrayToSet(array: ReadonlyArray, makeKey?: (value: any) => string | __String | undefined): Map | UnderscoreEscapedMap { + return arrayToMap(array, makeKey || (s => s), () => true); + } + + export function cloneMap(map: SymbolTable): SymbolTable; + export function cloneMap(map: ReadonlyMap): Map; + export function cloneMap(map: ReadonlyUnderscoreEscapedMap): UnderscoreEscapedMap; + export function cloneMap(map: ReadonlyMap | ReadonlyUnderscoreEscapedMap | SymbolTable): Map | UnderscoreEscapedMap | SymbolTable { + const clone = createMap(); + copyEntries(map as Map, clone); + return clone; + } + export function usingSingleLineStringWriter(action: (writer: EmitTextWriter) => void): string { const oldString = stringWriter.getText(); try { @@ -843,7 +991,7 @@ namespace ts { // At this point, node is either a qualified name or an identifier Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - // falls through + // falls through case SyntaxKind.QualifiedName: case SyntaxKind.PropertyAccessExpression: case SyntaxKind.ThisKeyword: { @@ -1041,7 +1189,7 @@ namespace ts { export function isValidESSymbolDeclaration(node: Node): node is VariableDeclaration | PropertyDeclaration | SignatureDeclaration { return isVariableDeclaration(node) ? isConst(node) && isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) : isPropertyDeclaration(node) ? hasReadonlyModifier(node) && hasStaticModifier(node) : - isPropertySignature(node) && hasReadonlyModifier(node); + isPropertySignature(node) && hasReadonlyModifier(node); } export function introducesArgumentsExoticObject(node: Node) { @@ -1169,7 +1317,7 @@ namespace ts { if (!includeArrowFunctions) { continue; } - // falls through + // falls through case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.ModuleDeclaration: @@ -1228,7 +1376,7 @@ namespace ts { if (!stopOnFunctions) { continue; } - // falls through + // falls through case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: case SyntaxKind.MethodDeclaration: @@ -1435,7 +1583,7 @@ namespace ts { if (node.parent.kind === SyntaxKind.TypeQuery || isJSXTagName(node)) { return true; } - // falls through + // falls through case SyntaxKind.NumericLiteral: case SyntaxKind.StringLiteral: case SyntaxKind.ThisKeyword: @@ -1668,7 +1816,7 @@ namespace ts { export function isDefaultedJavascriptInitializer(node: BinaryExpression) { const name = isVariableDeclaration(node.parent) ? node.parent.name : isBinaryExpression(node.parent) && node.parent.operatorToken.kind === SyntaxKind.EqualsToken ? node.parent.left : - undefined; + undefined; return name && getJavascriptInitializer(node.right, isPrototypeAccess(name)) && isEntityNameExpression(name) && isSameEntityName(name, node.left); } @@ -1700,10 +1848,10 @@ namespace ts { } if (isIdentifier(name) && isPropertyAccessExpression(initializer)) { return (initializer.expression.kind as SyntaxKind.ThisKeyword === SyntaxKind.ThisKeyword || - isIdentifier(initializer.expression) && - (initializer.expression.escapedText === "window" as __String || - initializer.expression.escapedText === "self" as __String || - initializer.expression.escapedText === "global" as __String)) && + isIdentifier(initializer.expression) && + (initializer.expression.escapedText === "window" as __String || + initializer.expression.escapedText === "self" as __String || + initializer.expression.escapedText === "global" as __String)) && isSameEntityName(name, initializer.name); } if (isPropertyAccessExpression(name) && isPropertyAccessExpression(initializer)) { @@ -2273,7 +2421,7 @@ namespace ts { export function getAllSuperTypeNodes(node: Node): ReadonlyArray { return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getClassExtendsHeritageClauseElement(node)), getClassImplementsHeritageClauseElements(node)) || emptyArray - : emptyArray; + : emptyArray; } export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { @@ -2358,7 +2506,7 @@ namespace ts { if (node.asteriskToken) { flags |= FunctionFlags.Generator; } - // falls through + // falls through case SyntaxKind.ArrowFunction: if (hasModifier(node, ModifierFlags.Async)) { flags |= FunctionFlags.Async; @@ -2803,8 +2951,8 @@ namespace ts { export function escapeString(s: string, quoteChar?: CharacterCodes.doubleQuote | CharacterCodes.singleQuote | CharacterCodes.backtick): string { const escapedCharsRegExp = quoteChar === CharacterCodes.backtick ? backtickQuoteEscapedCharsRegExp : - quoteChar === CharacterCodes.singleQuote ? singleQuoteEscapedCharsRegExp : - doubleQuoteEscapedCharsRegExp; + quoteChar === CharacterCodes.singleQuote ? singleQuoteEscapedCharsRegExp : + doubleQuoteEscapedCharsRegExp; return s.replace(escapedCharsRegExp, getReplacement); } @@ -6435,7 +6583,7 @@ namespace ts { case SyntaxKind.JSDocOptionalType: case SyntaxKind.JSDocFunctionType: case SyntaxKind.JSDocVariadicType: - return true; + return true; } return false; } @@ -6504,4 +6652,1405 @@ namespace ts { export function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports { return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports; } -} + + export interface ObjectAllocator { + getNodeConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Node; + getTokenConstructor(): new (kind: TKind, pos?: number, end?: number) => Token; + getIdentifierConstructor(): new (kind: SyntaxKind.Identifier, pos?: number, end?: number) => Identifier; + getSourceFileConstructor(): new (kind: SyntaxKind.SourceFile, pos?: number, end?: number) => SourceFile; + getSymbolConstructor(): new (flags: SymbolFlags, name: __String) => Symbol; + getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type; + getSignatureConstructor(): new (checker: TypeChecker) => Signature; + getSourceMapSourceConstructor(): new (fileName: string, text: string, skipTrivia?: (pos: number) => number) => SourceMapSource; + } + + function Symbol(this: Symbol, flags: SymbolFlags, name: __String) { + this.flags = flags; + this.escapedName = name; + this.declarations = undefined!; + this.valueDeclaration = undefined!; + this.id = undefined; + this.mergeId = undefined; + this.parent = undefined; + } + + function Type(this: Type, checker: TypeChecker, flags: TypeFlags) { + this.flags = flags; + if (Debug.isDebugging) { + this.checker = checker; + } + } + + function Signature() {} // tslint:disable-line no-empty + + function Node(this: Node, kind: SyntaxKind, pos: number, end: number) { + this.pos = pos; + this.end = end; + this.kind = kind; + this.id = 0; + this.flags = NodeFlags.None; + this.modifierFlagsCache = ModifierFlags.None; + this.transformFlags = TransformFlags.None; + this.parent = undefined!; + this.original = undefined; + } + + function SourceMapSource(this: SourceMapSource, fileName: string, text: string, skipTrivia?: (pos: number) => number) { + this.fileName = fileName; + this.text = text; + this.skipTrivia = skipTrivia || (pos => pos); + } + + export let objectAllocator: ObjectAllocator = { + getNodeConstructor: () => Node, + getTokenConstructor: () => Node, + getIdentifierConstructor: () => Node, + getSourceFileConstructor: () => Node, + getSymbolConstructor: () => Symbol, + getTypeConstructor: () => Type, + getSignatureConstructor: () => Signature, + getSourceMapSourceConstructor: () => SourceMapSource, + }; + + export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { + return text.replace(/{(\d+)}/g, (_match, index: string) => Debug.assertDefined(args[+index + baseIndex])); + } + + export let localizedDiagnosticMessages: MapLike | undefined; + + export function getLocaleSpecificMessage(message: DiagnosticMessage) { + return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; + } + + export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticWithLocation; + export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): DiagnosticWithLocation { + Debug.assertGreaterThanOrEqual(start, 0); + Debug.assertGreaterThanOrEqual(length, 0); + + if (file) { + Debug.assertLessThanOrEqual(start, file.text.length); + Debug.assertLessThanOrEqual(start + length, file.text.length); + } + + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 4) { + text = formatStringFromArgs(text, arguments, 4); + } + + return { + file, + start, + length, + + messageText: text, + category: message.category, + code: message.code, + reportsUnnecessary: message.reportsUnnecessary, + }; + } + + /* @internal */ + export function formatMessage(_dummy: any, message: DiagnosticMessage): string { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 2) { + text = formatStringFromArgs(text, arguments, 2); + } + + return text; + } + + export function createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number | undefined)[]): Diagnostic; + export function createCompilerDiagnostic(message: DiagnosticMessage): Diagnostic { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 1) { + text = formatStringFromArgs(text, arguments, 1); + } + + return { + file: undefined, + start: undefined, + length: undefined, + + messageText: text, + category: message.category, + code: message.code, + reportsUnnecessary: message.reportsUnnecessary, + }; + } + + export function createCompilerDiagnosticFromMessageChain(chain: DiagnosticMessageChain): Diagnostic { + return { + file: undefined, + start: undefined, + length: undefined, + + code: chain.code, + category: chain.category, + messageText: chain.next ? chain : chain.messageText, + }; + } + + export function chainDiagnosticMessages(details: DiagnosticMessageChain | undefined, message: DiagnosticMessage, ...args: (string | undefined)[]): DiagnosticMessageChain; + export function chainDiagnosticMessages(details: DiagnosticMessageChain | undefined, message: DiagnosticMessage): DiagnosticMessageChain { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 2) { + text = formatStringFromArgs(text, arguments, 2); + } + + return { + messageText: text, + category: message.category, + code: message.code, + + next: details + }; + } + + export function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain { + let lastChain = headChain; + while (lastChain.next) { + lastChain = lastChain.next; + } + + lastChain.next = tailChain; + return headChain; + } + + function getDiagnosticFilePath(diagnostic: Diagnostic): string | undefined { + return diagnostic.file ? diagnostic.file.path : undefined; + } + + export function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison { + return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || + compareValues(d1.start, d2.start) || + compareValues(d1.length, d2.length) || + compareValues(d1.code, d2.code) || + compareMessageText(d1.messageText, d2.messageText) || + Comparison.EqualTo; + } + + function compareMessageText(t1: string | DiagnosticMessageChain, t2: string | DiagnosticMessageChain): Comparison { + let text1: string | DiagnosticMessageChain | undefined = t1; + let text2: string | DiagnosticMessageChain | undefined = t2; + while (text1 && text2) { + // We still have both chains. + const string1 = isString(text1) ? text1 : text1.messageText; + const string2 = isString(text2) ? text2 : text2.messageText; + + const res = compareStringsCaseSensitive(string1, string2); + if (res) { + return res; + } + + text1 = isString(text1) ? undefined : text1.next; + text2 = isString(text2) ? undefined : text2.next; + } + + if (!text1 && !text2) { + // if the chains are done, then these messages are the same. + return Comparison.EqualTo; + } + + // We still have one chain remaining. The shorter chain should come first. + return text1 ? Comparison.GreaterThan : Comparison.LessThan; + } + + export function getEmitScriptTarget(compilerOptions: CompilerOptions) { + return compilerOptions.target || ScriptTarget.ES3; + } + + export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { + return typeof compilerOptions.module === "number" ? + compilerOptions.module : + getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; + } + + export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { + let moduleResolution = compilerOptions.moduleResolution; + if (moduleResolution === undefined) { + moduleResolution = getEmitModuleKind(compilerOptions) === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; + } + return moduleResolution; + } + + export function unreachableCodeIsError(options: CompilerOptions): boolean { + return options.allowUnreachableCode === false; + } + + export function unusedLabelIsError(options: CompilerOptions): boolean { + return options.allowUnusedLabels === false; + } + + export function getAreDeclarationMapsEnabled(options: CompilerOptions) { + return !!(options.declaration && options.declarationMap); + } + + export function getAllowSyntheticDefaultImports(compilerOptions: CompilerOptions) { + const moduleKind = getEmitModuleKind(compilerOptions); + return compilerOptions.allowSyntheticDefaultImports !== undefined + ? compilerOptions.allowSyntheticDefaultImports + : compilerOptions.esModuleInterop + ? moduleKind !== ModuleKind.None && moduleKind < ModuleKind.ES2015 + : moduleKind === ModuleKind.System; + } + + export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean { + return !!(compilerOptions.declaration || compilerOptions.composite); + } + + export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictPropertyInitialization" | "alwaysStrict"; + + export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean { + return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag]; + } + + export function hasZeroOrOneAsteriskCharacter(str: string): boolean { + let seenAsterisk = false; + for (let i = 0; i < str.length; i++) { + if (str.charCodeAt(i) === CharacterCodes.asterisk) { + if (!seenAsterisk) { + seenAsterisk = true; + } + else { + // have already seen asterisk + return false; + } + } + } + return true; + } + + + + // + // Paths + // + + /** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + */ + export const directorySeparator = "/"; + const altDirectorySeparator = "\\"; + const urlSchemeSeparator = "://"; + + const backslashRegExp = /\\/g; + + /** + * Normalize path separators. + */ + export function normalizeSlashes(path: string): string { + return path.replace(backslashRegExp, directorySeparator); + } + + function isVolumeCharacter(charCode: number) { + return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || + (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); + } + + function getFileUrlVolumeSeparatorEnd(url: string, start: number) { + const ch0 = url.charCodeAt(start); + if (ch0 === CharacterCodes.colon) return start + 1; + if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; + } + return -1; + } + + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ + function getEncodedRootLength(path: string): number { + if (!path) return 0; + const ch0 = path.charCodeAt(0); + + // POSIX or UNC + if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { + if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") + + const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) return path.length; // UNC: "//server" or "\\server" + + return p1 + 1; // UNC: "//server/" or "\\server\" + } + + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { + const ch2 = path.charCodeAt(2); + if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") + } + + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + + // relative + return 0; + } + + /** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + */ + export function getRootLength(path: string) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; + } + + // TODO(rbuckton): replace references with `resolvePath` + export function normalizePath(path: string): string { + return resolvePath(path); + } + + export function normalizePathAndParts(path: string): { path: string, parts: string[] } { + path = normalizeSlashes(path); + const [root, ...parts] = reducePathComponents(getPathComponents(path)); + if (parts.length) { + const joinedParts = root + parts.join(directorySeparator); + return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts }; + } + else { + return { path: root, parts }; + } + } + + /** + * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` + * except that we support URL's as well. + * + * ```ts + * getDirectoryPath("/path/to/file.ext") === "/path/to" + * getDirectoryPath("/path/to/") === "/path" + * getDirectoryPath("/") === "/" + * ``` + */ + export function getDirectoryPath(path: Path): Path; + /** + * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` + * except that we support URL's as well. + * + * ```ts + * getDirectoryPath("/path/to/file.ext") === "/path/to" + * getDirectoryPath("/path/to/") === "/path" + * getDirectoryPath("/") === "/" + * ``` + */ + export function getDirectoryPath(path: string): string; + export function getDirectoryPath(path: string): string { + path = normalizeSlashes(path); + + // If the path provided is itself the root, then return it. + const rootLength = getRootLength(path); + if (rootLength === path.length) return path; + + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator))); + } + + export function isUrl(path: string) { + return getEncodedRootLength(path) < 0; + } + + export function pathIsRelative(path: string): boolean { + return /^\.\.?($|[\\/])/.test(path); + } + + /** + * Determines whether a path is an absolute path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + */ + export function isRootedDiskPath(path: string) { + return getEncodedRootLength(path) > 0; + } + + /** + * Determines whether a path consists only of a path root. + */ + export function isDiskPathRoot(path: string) { + const rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; + } + + export function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); + } + + function pathComponents(path: string, rootLength: number) { + const root = path.substring(0, rootLength); + const rest = path.substring(rootLength).split(directorySeparator); + if (rest.length && !lastOrUndefined(rest)) rest.pop(); + return [root, ...rest]; + } + + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + */ + export function getPathComponents(path: string, currentDirectory = "") { + path = combinePaths(currentDirectory, path); + const rootLength = getRootLength(path); + return pathComponents(path, rootLength); + } + + /** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + */ + export function reducePathComponents(components: ReadonlyArray) { + if (!some(components)) return []; + const reduced = [components[0]]; + for (let i = 1; i < components.length; i++) { + const component = components[i]; + if (!component) continue; + if (component === ".") continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) continue; + } + reduced.push(component); + } + return reduced; + } + + /** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + */ + export function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { + return reducePathComponents(getPathComponents(path, currentDirectory)); + } + + export function getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); + } + + /** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + */ + export function getPathFromPathComponents(pathComponents: ReadonlyArray) { + if (pathComponents.length === 0) return ""; + + const root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + if (pathComponents.length === 1) return root; + + return root + pathComponents.slice(1).join(directorySeparator); + } + + function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { + const fromComponents = reducePathComponents(getPathComponents(from)); + const toComponents = reducePathComponents(getPathComponents(to)); + + let start: number; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + const fromComponent = getCanonicalFileName(fromComponents[start]); + const toComponent = getCanonicalFileName(toComponents[start]); + const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) break; + } + + if (start === 0) { + return toComponents; + } + + const components = toComponents.slice(start); + const relative: string[] = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return ["", ...relative, ...components]; + } + + export function getRelativePathFromFile(from: string, to: string, getCanonicalFileName: GetCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); + } + + /** + * Gets a relative path that can be used to traverse between `from` and `to`. + */ + export function getRelativePathFromDirectory(from: string, to: string, ignoreCase: boolean): string; + /** + * Gets a relative path that can be used to traverse between `from` and `to`. + */ + // tslint:disable-next-line:unified-signatures + export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileName: GetCanonicalFileName): string; + export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileNameOrIgnoreCase: GetCanonicalFileName | boolean) { + Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity; + const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + const pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); + } + + export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: GetCanonicalFileName, isAbsolutePathAnUrl: boolean) { + const pathComponents = getPathComponentsRelativeTo( + resolvePath(currentDirectory, directoryPathOrUrl), + resolvePath(currentDirectory, relativeOrAbsolutePath), + equateStringsCaseSensitive, + getCanonicalFileName + ); + + const firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + const prefix = firstComponent.charAt(0) === directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + + return getPathFromPathComponents(pathComponents); + } + + /** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + */ + export function ensurePathIsNonModuleName(path: string): string { + return getRootLength(path) === 0 && !pathIsRelative(path) ? "./" + path : path; + } + + /** + * Returns the path except for its containing directory name. + * Semantics align with NodeJS's `path.basename` except that we support URL's as well. + * + * ```ts + * getBaseFileName("/path/to/file.ext") === "file.ext" + * getBaseFileName("/path/to/") === "to" + * getBaseFileName("/") === "" + * ``` + */ + export function getBaseFileName(path: string): string; + /** + * Gets the portion of a path following the last (non-terminal) separator (`/`). + * Semantics align with NodeJS's `path.basename` except that we support URL's as well. + * If the base name has any one of the provided extensions, it is removed. + * + * ```ts + * getBaseFileName("/path/to/file.ext", ".ext", true) === "file" + * getBaseFileName("/path/to/file.js", ".ext", true) === "file.js" + * ``` + */ + export function getBaseFileName(path: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; + export function getBaseFileName(path: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean) { + path = normalizeSlashes(path); + + // if the path provided is itself the root, then it has not file name. + const rootLength = getRootLength(path); + if (rootLength === path.length) return ""; + + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1)); + const extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; + } + + /** + * Combines paths. If a path is absolute, it replaces any previous path. + */ + export function combinePaths(path: string, ...paths: (string | undefined)[]): string { + if (path) path = normalizeSlashes(path); + for (let relativePath of paths) { + if (!relativePath) continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; + } + + /** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. + */ + export function resolvePath(path: string, ...paths: (string | undefined)[]): string { + const combined = some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path); + const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(combined))); + return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; + } + + /** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ + export function hasTrailingDirectorySeparator(path: string) { + if (path.length === 0) return false; + const ch = path.charCodeAt(path.length - 1); + return ch === CharacterCodes.slash || ch === CharacterCodes.backslash; + } + + /** + * Removes a trailing directory separator from a path. + * @param path The path. + */ + export function removeTrailingDirectorySeparator(path: Path): Path; + export function removeTrailingDirectorySeparator(path: string): string; + export function removeTrailingDirectorySeparator(path: string) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + + return path; + } + + /** + * Adds a trailing directory separator to a path, if it does not already have one. + * @param path The path. + */ + export function ensureTrailingDirectorySeparator(path: Path): Path; + export function ensureTrailingDirectorySeparator(path: string): string; + export function ensureTrailingDirectorySeparator(path: string) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + + return path; + } + + function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { + if (a === b) return Comparison.EqualTo; + if (a === undefined) return Comparison.LessThan; + if (b === undefined) return Comparison.GreaterThan; + const aComponents = reducePathComponents(getPathComponents(a)); + const bComponents = reducePathComponents(getPathComponents(b)); + const sharedLength = Math.min(aComponents.length, bComponents.length); + for (let i = 0; i < sharedLength; i++) { + const stringComparer = i === 0 ? compareStringsCaseInsensitive : componentComparer; + const result = stringComparer(aComponents[i], bComponents[i]); + if (result !== Comparison.EqualTo) { + return result; + } + } + return compareValues(aComponents.length, bComponents.length); + } + + /** + * Performs a case-sensitive comparison of two paths. + */ + export function comparePathsCaseSensitive(a: string, b: string) { + return comparePathsWorker(a, b, compareStringsCaseSensitive); + } + + /** + * Performs a case-insensitive comparison of two paths. + */ + export function comparePathsCaseInsensitive(a: string, b: string) { + return comparePathsWorker(a, b, compareStringsCaseInsensitive); + } + + export function comparePaths(a: string, b: string, ignoreCase?: boolean): Comparison; + export function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison; + export function comparePaths(a: string, b: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, getStringComparer(ignoreCase)); + } + + export function containsPath(parent: string, child: string, ignoreCase?: boolean): boolean; + export function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean; + export function containsPath(parent: string, child: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) return false; + if (parent === child) return true; + const parentComponents = reducePathComponents(getPathComponents(parent)); + const childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + + const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive; + for (let i = 0; i < parentComponents.length; i++) { + const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + + return true; + } + + export function tryRemoveDirectoryPrefix(path: string, dirPath: string): string | undefined { + const a = tryRemovePrefix(path, dirPath); + if (a === undefined) return undefined; + switch (a.charCodeAt(0)) { + case CharacterCodes.slash: + case CharacterCodes.backslash: + return a.slice(1); + default: + return undefined; + } + } + + // Reserved characters, forces escaping of any non-word (or digit), non-whitespace character. + // It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future + // proof. + const reservedCharacterPattern = /[^\w\s\/]/g; + const wildcardCharCodes = [CharacterCodes.asterisk, CharacterCodes.question]; + + export function hasExtension(fileName: string): boolean { + return stringContains(getBaseFileName(fileName), "."); + } + + export const commonPackageFolders: ReadonlyArray = ["node_modules", "bower_components", "jspm_packages"]; + + const implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; + + interface WildcardMatcher { + singleAsteriskRegexFragment: string; + doubleAsteriskRegexFragment: string; + replaceWildcardCharacter: (match: string) => string; + } + + const filesMatcher: WildcardMatcher = { + /** + * Matches any single directory segment unless it is the last segment and a .min.js file + * Breakdown: + * [^./] # matches everything up to the first . character (excluding directory separators) + * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension + */ + singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, + replaceWildcardCharacter: match => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment) + }; + + const directoriesMatcher: WildcardMatcher = { + singleAsteriskRegexFragment: "[^/]*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, + replaceWildcardCharacter: match => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment) + }; + + const excludeMatcher: WildcardMatcher = { + singleAsteriskRegexFragment: "[^/]*", + doubleAsteriskRegexFragment: "(/.+?)?", + replaceWildcardCharacter: match => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment) + }; + + const wildcardMatchers = { + files: filesMatcher, + directories: directoriesMatcher, + exclude: excludeMatcher + }; + + export function getRegularExpressionForWildcard(specs: ReadonlyArray | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined { + const patterns = getRegularExpressionsForWildcards(specs, basePath, usage); + if (!patterns || !patterns.length) { + return undefined; + } + + const pattern = patterns.map(pattern => `(${pattern})`).join("|"); + // If excluding, match "foo/bar/baz...", but if including, only allow "foo". + const terminator = usage === "exclude" ? "($|/)" : "$"; + return `^(${pattern})${terminator}`; + } + + function getRegularExpressionsForWildcards(specs: ReadonlyArray | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string[] | undefined { + if (specs === undefined || specs.length === 0) { + return undefined; + } + + return flatMap(specs, spec => + spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage])); + } + + /** + * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, + * and does not contain any glob characters itself. + */ + export function isImplicitGlob(lastPathComponent: string): boolean { + return !/[.*?]/.test(lastPathComponent); + } + + function getSubPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude", { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter }: WildcardMatcher): string | undefined { + let subpattern = ""; + let hasWrittenComponent = false; + const components = getNormalizedPathComponents(spec, basePath); + const lastComponent = last(components); + if (usage !== "exclude" && lastComponent === "**") { + return undefined; + } + + // getNormalizedPathComponents includes the separator for the root component. + // We need to remove to create our regex correctly. + components[0] = removeTrailingDirectorySeparator(components[0]); + + if (isImplicitGlob(lastComponent)) { + components.push("**", "*"); + } + + let optionalCount = 0; + for (let component of components) { + if (component === "**") { + subpattern += doubleAsteriskRegexFragment; + } + else { + if (usage === "directories") { + subpattern += "("; + optionalCount++; + } + + if (hasWrittenComponent) { + subpattern += directorySeparator; + } + + if (usage !== "exclude") { + let componentPattern = ""; + // The * and ? wildcards should not match directories or files that start with . if they + // appear first in a component. Dotted directories and files can be included explicitly + // like so: **/.*/.* + if (component.charCodeAt(0) === CharacterCodes.asterisk) { + componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?"; + component = component.substr(1); + } + else if (component.charCodeAt(0) === CharacterCodes.question) { + componentPattern += "[^./]"; + component = component.substr(1); + } + + componentPattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); + + // Patterns should not include subfolders like node_modules unless they are + // explicitly included as part of the path. + // + // As an optimization, if the component pattern is the same as the component, + // then there definitely were no wildcard characters and we do not need to + // add the exclusion pattern. + if (componentPattern !== component) { + subpattern += implicitExcludePathRegexPattern; + } + + subpattern += componentPattern; + } + else { + subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); + } + } + + hasWrittenComponent = true; + } + + while (optionalCount > 0) { + subpattern += ")?"; + optionalCount--; + } + + return subpattern; + } + + function replaceWildcardCharacter(match: string, singleAsteriskRegexFragment: string) { + return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; + } + + export interface FileSystemEntries { + readonly files: ReadonlyArray; + readonly directories: ReadonlyArray; + } + + export interface FileMatcherPatterns { + /** One pattern for each "include" spec. */ + includeFilePatterns: ReadonlyArray | undefined; + /** One pattern matching one of any of the "include" specs. */ + includeFilePattern: string | undefined; + includeDirectoryPattern: string | undefined; + excludePattern: string | undefined; + basePaths: ReadonlyArray; + } + + /** @param path directory of the tsconfig.json */ + export function getFileMatcherPatterns(path: string, excludes: ReadonlyArray | undefined, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string): FileMatcherPatterns { + path = normalizePath(path); + currentDirectory = normalizePath(currentDirectory); + const absolutePath = combinePaths(currentDirectory, path); + + return { + includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), pattern => `^${pattern}$`), + includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), + includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), + excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + }; + } + + export function getRegexFromPattern(pattern: string, useCaseSensitiveFileNames: boolean): RegExp { + return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); + } + + /** @param path directory of the tsconfig.json */ + export function matchFiles(path: string, extensions: ReadonlyArray | undefined, excludes: ReadonlyArray | undefined, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string, depth: number | undefined, getFileSystemEntries: (path: string) => FileSystemEntries): string[] { + path = normalizePath(path); + currentDirectory = normalizePath(currentDirectory); + + const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); + + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(pattern => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + + // Associate an array of results with each include regex. This keeps results in order of the "include" order. + // If there are no "includes", then just put everything in results[0]. + const results: string[][] = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; + + for (const basePath of patterns.basePaths) { + visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); + } + + return flatten(results); + + function visitDirectory(path: string, absolutePath: string, depth: number | undefined) { + const { files, directories } = getFileSystemEntries(path); + + for (const current of sort(files, compareStringsCaseSensitive)) { + const name = combinePaths(path, current); + const absoluteName = combinePaths(absolutePath, current); + if (extensions && !fileExtensionIsOneOf(name, extensions)) continue; + if (excludeRegex && excludeRegex.test(absoluteName)) continue; + if (!includeFileRegexes) { + results[0].push(name); + } + else { + const includeIndex = findIndex(includeFileRegexes, re => re.test(absoluteName)); + if (includeIndex !== -1) { + results[includeIndex].push(name); + } + } + } + + if (depth !== undefined) { + depth--; + if (depth === 0) { + return; + } + } + + for (const current of sort(directories, compareStringsCaseSensitive)) { + const name = combinePaths(path, current); + const absoluteName = combinePaths(absolutePath, current); + if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && + (!excludeRegex || !excludeRegex.test(absoluteName))) { + visitDirectory(name, absoluteName, depth); + } + } + } + } + + /** + * Computes the unique non-wildcard base paths amongst the provided include patterns. + */ + function getBasePaths(path: string, includes: ReadonlyArray | undefined, useCaseSensitiveFileNames: boolean): string[] { + // Storage for our results in the form of literal paths (e.g. the paths as written by the user). + const basePaths: string[] = [path]; + + if (includes) { + // Storage for literal base paths amongst the include patterns. + const includeBasePaths: string[] = []; + for (const include of includes) { + // We also need to check the relative paths by converting them to absolute and normalizing + // in case they escape the base path (e.g "..\somedirectory") + const absolute: string = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); + // Append the literal and canonical candidate base paths. + includeBasePaths.push(getIncludeBasePath(absolute)); + } + + // Sort the offsets array using either the literal or canonical path representations. + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + + // Iterate over each include base path and include unique base paths that are not a + // subpath of an existing base path + for (const includeBasePath of includeBasePaths) { + if (every(basePaths, basePath => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + basePaths.push(includeBasePath); + } + } + } + + return basePaths; + } + + function getIncludeBasePath(absolute: string): string { + const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); + if (wildcardOffset < 0) { + // No "*" or "?" in the path + return !hasExtension(absolute) + ? absolute + : removeTrailingDirectorySeparator(getDirectoryPath(absolute)); + } + return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset)); + } + + export function ensureScriptKind(fileName: string, scriptKind: ScriptKind | undefined): ScriptKind { + // Using scriptKind as a condition handles both: + // - 'scriptKind' is unspecified and thus it is `undefined` + // - 'scriptKind' is set and it is `Unknown` (0) + // If the 'scriptKind' is 'undefined' or 'Unknown' then we attempt + // to get the ScriptKind from the file name. If it cannot be resolved + // from the file name then the default 'TS' script kind is returned. + return scriptKind || getScriptKindFromFileName(fileName) || ScriptKind.TS; + } + + export function getScriptKindFromFileName(fileName: string): ScriptKind { + const ext = fileName.substr(fileName.lastIndexOf(".")); + switch (ext.toLowerCase()) { + case Extension.Js: + return ScriptKind.JS; + case Extension.Jsx: + return ScriptKind.JSX; + case Extension.Ts: + return ScriptKind.TS; + case Extension.Tsx: + return ScriptKind.TSX; + case Extension.Json: + return ScriptKind.JSON; + default: + return ScriptKind.Unknown; + } + } + + /** + * List of supported extensions in order of file resolution precedence. + */ + export const supportedTypeScriptExtensions: ReadonlyArray = [Extension.Ts, Extension.Tsx, Extension.Dts]; + /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */ + export const supportedTypescriptExtensionsForExtractExtension: ReadonlyArray = [Extension.Dts, Extension.Ts, Extension.Tsx]; + export const supportedJavascriptExtensions: ReadonlyArray = [Extension.Js, Extension.Jsx]; + const allSupportedExtensions: ReadonlyArray = [...supportedTypeScriptExtensions, ...supportedJavascriptExtensions]; + + export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: ReadonlyArray): ReadonlyArray { + const needJsExtensions = options && options.allowJs; + + if (!extraFileExtensions || extraFileExtensions.length === 0) { + return needJsExtensions ? allSupportedExtensions : supportedTypeScriptExtensions; + } + + const extensions = [ + ...needJsExtensions ? allSupportedExtensions : supportedTypeScriptExtensions, + ...mapDefined(extraFileExtensions, x => x.scriptKind === ScriptKind.Deferred || needJsExtensions && isJavaScriptLike(x.scriptKind) ? x.extension : undefined) + ]; + + return deduplicate(extensions, equateStringsCaseSensitive, compareStringsCaseSensitive); + } + + function isJavaScriptLike(scriptKind: ScriptKind | undefined): boolean { + return scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSX; + } + + export function hasJavaScriptFileExtension(fileName: string): boolean { + return some(supportedJavascriptExtensions, extension => fileExtensionIs(fileName, extension)); + } + + export function hasTypeScriptFileExtension(fileName: string): boolean { + return some(supportedTypeScriptExtensions, extension => fileExtensionIs(fileName, extension)); + } + + export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions, extraFileExtensions?: ReadonlyArray) { + if (!fileName) { return false; } + + for (const extension of getSupportedExtensions(compilerOptions, extraFileExtensions)) { + if (fileExtensionIs(fileName, extension)) { + return true; + } + } + return false; + } + + /** + * Extension boundaries by priority. Lower numbers indicate higher priorities, and are + * aligned to the offset of the highest priority extension in the + * allSupportedExtensions array. + */ + export const enum ExtensionPriority { + TypeScriptFiles = 0, + DeclarationAndJavaScriptFiles = 2, + + Highest = TypeScriptFiles, + Lowest = DeclarationAndJavaScriptFiles, + } + + export function getExtensionPriority(path: string, supportedExtensions: ReadonlyArray): ExtensionPriority { + for (let i = supportedExtensions.length - 1; i >= 0; i--) { + if (fileExtensionIs(path, supportedExtensions[i])) { + return adjustExtensionPriority(i, supportedExtensions); + } + } + + // If its not in the list of supported extensions, this is likely a + // TypeScript file with a non-ts extension + return ExtensionPriority.Highest; + } + + /** + * Adjusts an extension priority to be the highest priority within the same range. + */ + export function adjustExtensionPriority(extensionPriority: ExtensionPriority, supportedExtensions: ReadonlyArray): ExtensionPriority { + if (extensionPriority < ExtensionPriority.DeclarationAndJavaScriptFiles) { + return ExtensionPriority.TypeScriptFiles; + } + else if (extensionPriority < supportedExtensions.length) { + return ExtensionPriority.DeclarationAndJavaScriptFiles; + } + else { + return supportedExtensions.length; + } + } + + /** + * Gets the next lowest extension priority for a given priority. + */ + export function getNextLowestExtensionPriority(extensionPriority: ExtensionPriority, supportedExtensions: ReadonlyArray): ExtensionPriority { + if (extensionPriority < ExtensionPriority.DeclarationAndJavaScriptFiles) { + return ExtensionPriority.DeclarationAndJavaScriptFiles; + } + else { + return supportedExtensions.length; + } + } + + const extensionsToRemove = [Extension.Dts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; + export function removeFileExtension(path: string): string { + for (const ext of extensionsToRemove) { + const extensionless = tryRemoveExtension(path, ext); + if (extensionless !== undefined) { + return extensionless; + } + } + return path; + } + + export function tryRemoveExtension(path: string, extension: string): string | undefined { + return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined; + } + + export function removeExtension(path: string, extension: string): string { + return path.substring(0, path.length - extension.length); + } + + export function changeExtension(path: T, newExtension: string): T { + return changeAnyExtension(path, newExtension, extensionsToRemove, /*ignoreCase*/ false); + } + + export function changeAnyExtension(path: string, ext: string): string; + export function changeAnyExtension(path: string, ext: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; + export function changeAnyExtension(path: string, ext: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean) { + const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path; + } + + export namespace Debug { + export function showSymbol(symbol: Symbol): string { + const symbolFlags = (ts as any).SymbolFlags; + return `{ flags: ${symbolFlags ? showFlags(symbol.flags, symbolFlags) : symbol.flags}; declarations: ${map(symbol.declarations, showSyntaxKind)} }`; + } + + function showFlags(flags: number, flagsEnum: { [flag: number]: string }): string { + const out: string[] = []; + for (let pow = 0; pow <= 30; pow++) { + const n = 1 << pow; + if (flags & n) { + out.push(flagsEnum[n]); + } + } + return out.join("|"); + } + + export function showSyntaxKind(node: Node): string { + const syntaxKind = (ts as any).SyntaxKind; + return syntaxKind ? syntaxKind[node.kind] : node.kind.toString(); + } + } + + export function tryParsePattern(pattern: string): Pattern | undefined { + // This should be verified outside of here and a proper error thrown. + Debug.assert(hasZeroOrOneAsteriskCharacter(pattern)); + const indexOfStar = pattern.indexOf("*"); + return indexOfStar === -1 ? undefined : { + prefix: pattern.substr(0, indexOfStar), + suffix: pattern.substr(indexOfStar + 1) + }; + } + + export function positionIsSynthesized(pos: number): boolean { + // This is a fast way of testing the following conditions: + // pos === undefined || pos === null || isNaN(pos) || pos < 0; + return !(pos >= 0); + } + + /** True if an extension is one of the supported TypeScript extensions. */ + export function extensionIsTypeScript(ext: Extension): boolean { + return ext === Extension.Ts || ext === Extension.Tsx || ext === Extension.Dts; + } + + export function resolutionExtensionIsTypeScriptOrJson(ext: Extension) { + return extensionIsTypeScript(ext) || ext === Extension.Json; + } + + /** + * Gets the extension from a path. + * Path must have a valid extension. + */ + export function extensionFromPath(path: string): Extension { + const ext = tryGetExtensionFromPath(path); + return ext !== undefined ? ext : Debug.fail(`File ${path} has unknown extension.`); + } + + export function isAnySupportedFileExtension(path: string): boolean { + return tryGetExtensionFromPath(path) !== undefined; + } + + export function tryGetExtensionFromPath(path: string): Extension | undefined { + return find(supportedTypescriptExtensionsForExtractExtension, e => fileExtensionIs(path, e)) || find(supportedJavascriptExtensions, e => fileExtensionIs(path, e)); + } + + function getAnyExtensionFromPathWorker(path: string, extensions: string | ReadonlyArray, stringEqualityComparer: (a: string, b: string) => boolean) { + if (typeof extensions === "string") extensions = [extensions]; + for (let extension of extensions) { + if (!startsWith(extension, ".")) extension = "." + extension; + if (path.length >= extension.length && path.charAt(path.length - extension.length) === ".") { + const pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } + } + return ""; + } + + /** + * Gets the file extension for a path. + */ + export function getAnyExtensionFromPath(path: string): string; + /** + * Gets the file extension for a path, provided it is one of the provided extensions. + */ + export function getAnyExtensionFromPath(path: string, extensions: string | ReadonlyArray, ignoreCase: boolean): string; + export function getAnyExtensionFromPath(path: string, extensions?: string | ReadonlyArray, ignoreCase?: boolean): string { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(path, extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive); + } + const baseFileName = getBaseFileName(path); + const extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; + } + + export function isCheckJsEnabledForFile(sourceFile: SourceFile, compilerOptions: CompilerOptions) { + return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; + } + + export const emptyFileSystemEntries: FileSystemEntries = { + files: emptyArray, + directories: emptyArray + }; + + + /** + * patternStrings contains both pattern strings (containing "*") and regular strings. + * Return an exact match if possible, or a pattern match, or undefined. + * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.) + */ + export function matchPatternOrExact(patternStrings: ReadonlyArray, candidate: string): string | Pattern | undefined { + const patterns: Pattern[] = []; + for (const patternString of patternStrings) { + const pattern = tryParsePattern(patternString); + if (pattern) { + patterns.push(pattern); + } + else if (patternString === candidate) { + // pattern was matched as is - no need to search further + return patternString; + } + } + + return findBestPatternMatch(patterns, _ => _, candidate); + }} diff --git a/src/server/tsconfig.json b/src/server/tsconfig.json index cb0485321ca..5339673cb9e 100644 --- a/src/server/tsconfig.json +++ b/src/server/tsconfig.json @@ -2,130 +2,19 @@ "extends": "../tsconfig-base", "compilerOptions": { "removeComments": true, - "outFile": "../../built/local/tsserver.js", + "outFile": "../../built/local/tsserverlibrary.js", "preserveConstEnums": true, "types": [ "node" ] }, + "references": [ + { "path": "../core" }, + { "path": "../parser" }, + { "path": "../compiler" }, + { "path": "../services" } + ], "files": [ - "../compiler/types.ts", - "../compiler/performance.ts", - "../compiler/core.ts", - "../compiler/sys.ts", - "../compiler/diagnosticInformationMap.generated.ts", - "../compiler/scanner.ts", - "../compiler/utilities.ts", - "../compiler/parser.ts", - "../compiler/binder.ts", - "../compiler/symbolWalker.ts", - "../compiler/moduleNameResolver.ts", - "../compiler/checker.ts", - "../compiler/factory.ts", - "../compiler/visitor.ts", - "../compiler/transformers/utilities.ts", - "../compiler/transformers/destructuring.ts", - "../compiler/transformers/ts.ts", - "../compiler/transformers/es2017.ts", - "../compiler/transformers/esnext.ts", - "../compiler/transformers/jsx.ts", - "../compiler/transformers/es2016.ts", - "../compiler/transformers/es2015.ts", - "../compiler/transformers/es5.ts", - "../compiler/transformers/generators.ts", - "../compiler/transformers/module/module.ts", - "../compiler/transformers/module/system.ts", - "../compiler/transformers/module/es2015.ts", - "../compiler/transformers/declarations/diagnostics.ts", - "../compiler/transformers/declarations.ts", - "../compiler/transformer.ts", - "../compiler/sourcemap.ts", - "../compiler/comments.ts", - "../compiler/emitter.ts", - "../compiler/watchUtilities.ts", - "../compiler/program.ts", - "../compiler/builderState.ts", - "../compiler/builder.ts", - "../compiler/resolutionCache.ts", - "../compiler/moduleSpecifiers.ts", - "../compiler/watch.ts", - "../compiler/commandLineParser.ts", - - "../services/types.ts", - "../services/utilities.ts", - "../services/classifier.ts", - "../services/pathCompletions.ts", - "../services/completions.ts", - "../services/documentHighlights.ts", - "../services/documentRegistry.ts", - "../services/importTracker.ts", - "../services/findAllReferences.ts", - "../services/getEditsForFileRename.ts", - "../services/goToDefinition.ts", - "../services/jsDoc.ts", - "../services/semver.ts", - "../services/jsTyping.ts", - "../services/navigateTo.ts", - "../services/navigationBar.ts", - "../services/organizeImports.ts", - "../services/getEditsForFileRename.ts", - "../services/outliningElementsCollector.ts", - "../services/patternMatcher.ts", - "../services/preProcess.ts", - "../services/rename.ts", - "../services/signatureHelp.ts", - "../services/suggestionDiagnostics.ts", - "../services/symbolDisplay.ts", - "../services/transpile.ts", - "../services/formatting/formattingContext.ts", - "../services/formatting/formattingScanner.ts", - "../services/formatting/rule.ts", - "../services/formatting/rules.ts", - "../services/formatting/rulesMap.ts", - "../services/formatting/formatting.ts", - "../services/formatting/smartIndenter.ts", - "../services/textChanges.ts", - "../services/codeFixProvider.ts", - "../services/refactorProvider.ts", - "../services/codefixes/addMissingInvocationForDecorator.ts", - "../services/codefixes/annotateWithTypeFromJSDoc.ts", - "../services/codefixes/convertFunctionToEs6Class.ts", - "../services/codefixes/convertToEs6Module.ts", - "../services/codefixes/correctQualifiedNameToIndexedAccessType.ts", - "../services/codefixes/fixClassIncorrectlyImplementsInterface.ts", - "../services/codefixes/importFixes.ts", - "../services/codefixes/fixSpelling.ts", - "../services/codefixes/fixAddMissingMember.ts", - "../services/codefixes/fixCannotFindModule.ts", - "../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts", - "../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts", - "../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts", - "../services/codefixes/fixExtendsInterfaceBecomesImplements.ts", - "../services/codefixes/fixForgottenThisPropertyAccess.ts", - "../services/codefixes/fixUnusedIdentifier.ts", - "../services/codefixes/fixUnreachableCode.ts", - "../services/codefixes/fixUnusedLabel.ts", - "../services/codefixes/fixJSDocTypes.ts", - "../services/codefixes/fixAwaitInSyncFunction.ts", - "../services/codefixes/disableJsDiagnostics.ts", - "../services/codefixes/helpers.ts", - "../services/codefixes/inferFromUsage.ts", - "../services/codefixes/fixInvalidImportSyntax.ts", - "../services/codefixes/fixStrictClassInitialization.ts", - "../services/codefixes/requireInTs.ts", - "../services/codefixes/useDefaultImport.ts", - "../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts", - "../services/codefixes/convertToMappedObjectType.ts", - "../services/refactors/convertImport.ts", - "../services/refactors/extractSymbol.ts", - "../services/refactors/generateGetAccessorAndSetAccessor.ts", - "../services/refactors/moveToNewFile.ts", - "../services/sourcemaps.ts", - "../services/services.ts", - "../services/breakpoints.ts", - "../services/transform.ts", - "../services/shims.ts", - "types.ts", "shared.ts", "utilities.ts", @@ -135,7 +24,6 @@ "project.ts", "editorServices.ts", "session.ts", - "scriptVersionCache.ts", - "server.ts" + "scriptVersionCache.ts" ] } diff --git a/src/server/tsconfig.library.json b/src/server/tsconfig.library.json deleted file mode 100644 index 1adfe2a4bd0..00000000000 --- a/src/server/tsconfig.library.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "compilerOptions": { - "noImplicitAny": true, - "noImplicitThis": true, - "alwaysStrict": true, - "preserveConstEnums": true, - "pretty": true, - "outFile": "../../built/local/tsserverlibrary.js", - "sourceMap": true, - "stripInternal": true, - "target": "es5", - "noUnusedLocals": true, - "noUnusedParameters": true, - "declaration": true, - "types": [] - }, - "files": [ - "../compiler/types.ts", - "../compiler/performance.ts", - "../compiler/core.ts", - "../compiler/sys.ts", - "../compiler/diagnosticInformationMap.generated.ts", - "../compiler/scanner.ts", - "../compiler/utilities.ts", - "../compiler/parser.ts", - "../compiler/binder.ts", - "../compiler/symbolWalker.ts", - "../compiler/moduleNameResolver.ts", - "../compiler/checker.ts", - "../compiler/factory.ts", - "../compiler/visitor.ts", - "../compiler/transformers/utilities.ts", - "../compiler/transformers/destructuring.ts", - "../compiler/transformers/ts.ts", - "../compiler/transformers/es2017.ts", - "../compiler/transformers/esnext.ts", - "../compiler/transformers/jsx.ts", - "../compiler/transformers/es2016.ts", - "../compiler/transformers/es2015.ts", - "../compiler/transformers/es5.ts", - "../compiler/transformers/generators.ts", - "../compiler/transformers/module/module.ts", - "../compiler/transformers/module/system.ts", - "../compiler/transformers/module/es2015.ts", - "../compiler/transformers/declarations/diagnostics.ts", - "../compiler/transformers/declarations.ts", - "../compiler/transformer.ts", - "../compiler/sourcemap.ts", - "../compiler/comments.ts", - "../compiler/emitter.ts", - "../compiler/watchUtilities.ts", - "../compiler/program.ts", - "../compiler/builderState.ts", - "../compiler/builder.ts", - "../compiler/resolutionCache.ts", - "../compiler/moduleSpecifiers.ts", - "../compiler/watch.ts", - "../compiler/commandLineParser.ts", - - "../services/types.ts", - "../services/utilities.ts", - "../services/classifier.ts", - "../services/pathCompletions.ts", - "../services/completions.ts", - "../services/documentHighlights.ts", - "../services/documentRegistry.ts", - "../services/importTracker.ts", - "../services/findAllReferences.ts", - "../services/getEditsForFileRename.ts", - "../services/goToDefinition.ts", - "../services/jsDoc.ts", - "../services/semver.ts", - "../services/jsTyping.ts", - "../services/navigateTo.ts", - "../services/navigationBar.ts", - "../services/organizeImports.ts", - "../services/getEditsForFileRename.ts", - "../services/outliningElementsCollector.ts", - "../services/patternMatcher.ts", - "../services/preProcess.ts", - "../services/rename.ts", - "../services/signatureHelp.ts", - "../services/suggestionDiagnostics.ts", - "../services/symbolDisplay.ts", - "../services/transpile.ts", - "../services/formatting/formattingContext.ts", - "../services/formatting/formattingScanner.ts", - "../services/formatting/rule.ts", - "../services/formatting/rules.ts", - "../services/formatting/rulesMap.ts", - "../services/formatting/formatting.ts", - "../services/formatting/smartIndenter.ts", - "../services/textChanges.ts", - "../services/codeFixProvider.ts", - "../services/refactorProvider.ts", - "../services/codefixes/addMissingInvocationForDecorator.ts", - "../services/codefixes/annotateWithTypeFromJSDoc.ts", - "../services/codefixes/convertFunctionToEs6Class.ts", - "../services/codefixes/convertToEs6Module.ts", - "../services/codefixes/correctQualifiedNameToIndexedAccessType.ts", - "../services/codefixes/fixClassIncorrectlyImplementsInterface.ts", - "../services/codefixes/importFixes.ts", - "../services/codefixes/fixSpelling.ts", - "../services/codefixes/fixAddMissingMember.ts", - "../services/codefixes/fixCannotFindModule.ts", - "../services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts", - "../services/codefixes/fixClassSuperMustPrecedeThisAccess.ts", - "../services/codefixes/fixConstructorForDerivedNeedSuperCall.ts", - "../services/codefixes/fixExtendsInterfaceBecomesImplements.ts", - "../services/codefixes/fixForgottenThisPropertyAccess.ts", - "../services/codefixes/fixUnusedIdentifier.ts", - "../services/codefixes/fixUnreachableCode.ts", - "../services/codefixes/fixUnusedLabel.ts", - "../services/codefixes/fixJSDocTypes.ts", - "../services/codefixes/fixAwaitInSyncFunction.ts", - "../services/codefixes/disableJsDiagnostics.ts", - "../services/codefixes/helpers.ts", - "../services/codefixes/inferFromUsage.ts", - "../services/codefixes/fixInvalidImportSyntax.ts", - "../services/codefixes/fixStrictClassInitialization.ts", - "../services/codefixes/requireInTs.ts", - "../services/codefixes/useDefaultImport.ts", - "../services/codefixes/fixAddModuleReferTypeMissingTypeof.ts", - "../services/codefixes/convertToMappedObjectType.ts", - "../services/refactors/convertImport.ts", - "../services/refactors/extractSymbol.ts", - "../services/refactors/generateGetAccessorAndSetAccessor.ts", - "../services/refactors/moveToNewFile.ts", - "../services/sourcemaps.ts", - "../services/services.ts", - "../services/breakpoints.ts", - "../services/transform.ts", - "../services/shims.ts", - - "types.ts", - "shared.ts", - "utilities.ts", - "protocol.ts", - "scriptInfo.ts", - "typingsCache.ts", - "project.ts", - "editorServices.ts", - "session.ts", - "scriptVersionCache.ts" - ] -} diff --git a/src/server/typingsInstaller/tsconfig.json b/src/server/typingsInstaller/tsconfig.json deleted file mode 100644 index 1606fbf3592..00000000000 --- a/src/server/typingsInstaller/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig-base", - "compilerOptions": { - "removeComments": true, - "outFile": "../../../built/local/typingsInstaller.js", - "types": [ - "node" - ], - "lib": [ - "es6", - "scripthost" - ] - }, - "files": [ - "../../compiler/types.ts", - "../../compiler/performance.ts", - "../../compiler/core.ts", - "../../compiler/sys.ts", - "../../compiler/diagnosticInformationMap.generated.ts", - "../../compiler/utilities.ts", - "../../compiler/scanner.ts", - "../../compiler/parser.ts", - "../../compiler/commandLineParser.ts", - "../../compiler/moduleNameResolver.ts", - "../../services/semver.ts", - "../../services/jsTyping.ts", - "../types.ts", - "../shared.ts", - "typingsInstaller.ts", - "nodeTypingsInstaller.ts" - ] -} diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 237142fc5bf..7b0b5bc6bc6 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -1,53 +1,14 @@ { "extends": "../tsconfig-base", "compilerOptions": { - "removeComments": false, - "outFile": "../../built/local/typescriptServices.js", - "declaration": true + "outFile": "../../built/local/typescriptServices.js" }, + "references": [ + { "path": "../core" }, + { "path": "../parser" }, + { "path": "../compiler" } + ], "files": [ - "../compiler/types.ts", - "../compiler/performance.ts", - "../compiler/core.ts", - "../compiler/sys.ts", - "../compiler/diagnosticInformationMap.generated.ts", - "../compiler/scanner.ts", - "../compiler/utilities.ts", - "../compiler/parser.ts", - "../compiler/binder.ts", - "../compiler/symbolWalker.ts", - "../compiler/moduleNameResolver.ts", - "../compiler/checker.ts", - "../compiler/factory.ts", - "../compiler/visitor.ts", - "../compiler/transformers/utilities.ts", - "../compiler/transformers/destructuring.ts", - "../compiler/transformers/ts.ts", - "../compiler/transformers/es2017.ts", - "../compiler/transformers/esnext.ts", - "../compiler/transformers/jsx.ts", - "../compiler/transformers/es2016.ts", - "../compiler/transformers/es2015.ts", - "../compiler/transformers/es5.ts", - "../compiler/transformers/generators.ts", - "../compiler/transformers/module/module.ts", - "../compiler/transformers/module/system.ts", - "../compiler/transformers/module/es2015.ts", - "../compiler/transformers/declarations/diagnostics.ts", - "../compiler/transformers/declarations.ts", - "../compiler/transformer.ts", - "../compiler/sourcemap.ts", - "../compiler/comments.ts", - "../compiler/emitter.ts", - "../compiler/watchUtilities.ts", - "../compiler/program.ts", - "../compiler/builderState.ts", - "../compiler/builder.ts", - "../compiler/resolutionCache.ts", - "../compiler/moduleSpecifiers.ts", - "../compiler/watch.ts", - "../compiler/commandLineParser.ts", - "types.ts", "utilities.ts", "classifier.ts", diff --git a/src/harness/compilerRunner.ts b/src/testRunner/compilerRunner.ts similarity index 95% rename from src/harness/compilerRunner.ts rename to src/testRunner/compilerRunner.ts index 99191b66c26..fc295c80f2e 100644 --- a/src/harness/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -1,11 +1,3 @@ -/// -/// -/// -/// -/// -/// -/// - const enum CompilerTestType { Conformance, Regressions, diff --git a/src/harness/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts similarity index 97% rename from src/harness/externalCompileRunner.ts rename to src/testRunner/externalCompileRunner.ts index 2e24400fed5..898dccf54ea 100644 --- a/src/harness/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -1,5 +1,3 @@ -/// -/// const fs = require("fs"); const path = require("path"); const del = require("del"); diff --git a/src/harness/fourslashRunner.ts b/src/testRunner/fourslashRunner.ts similarity index 79% rename from src/harness/fourslashRunner.ts rename to src/testRunner/fourslashRunner.ts index d0ad139205a..583311ba30e 100644 --- a/src/harness/fourslashRunner.ts +++ b/src/testRunner/fourslashRunner.ts @@ -1,34 +1,23 @@ -/// -/// -/// - -const enum FourSlashTestType { - Native, - Shims, - ShimsWithPreprocess, - Server -} - class FourSlashRunner extends RunnerBase { protected basePath: string; protected testSuiteName: TestRunnerKind; - constructor(private testType: FourSlashTestType) { + constructor(private testType: FourSlash.FourSlashTestType) { super(); switch (testType) { - case FourSlashTestType.Native: + case FourSlash.FourSlashTestType.Native: this.basePath = "tests/cases/fourslash"; this.testSuiteName = "fourslash"; break; - case FourSlashTestType.Shims: + case FourSlash.FourSlashTestType.Shims: this.basePath = "tests/cases/fourslash/shims"; this.testSuiteName = "fourslash-shims"; break; - case FourSlashTestType.ShimsWithPreprocess: + case FourSlash.FourSlashTestType.ShimsWithPreprocess: this.basePath = "tests/cases/fourslash/shims-pp"; this.testSuiteName = "fourslash-shims-pp"; break; - case FourSlashTestType.Server: + case FourSlash.FourSlashTestType.Server: this.basePath = "tests/cases/fourslash/server"; this.testSuiteName = "fourslash-server"; break; @@ -72,7 +61,7 @@ class FourSlashRunner extends RunnerBase { } class GeneratedFourslashRunner extends FourSlashRunner { - constructor(testType: FourSlashTestType) { + constructor(testType: FourSlash.FourSlashTestType) { super(testType); this.basePath += "/generated/"; } diff --git a/src/harness/parallel/host.ts b/src/testRunner/parallel/host.ts similarity index 100% rename from src/harness/parallel/host.ts rename to src/testRunner/parallel/host.ts diff --git a/src/harness/parallel/shared.ts b/src/testRunner/parallel/shared.ts similarity index 100% rename from src/harness/parallel/shared.ts rename to src/testRunner/parallel/shared.ts diff --git a/src/harness/parallel/worker.ts b/src/testRunner/parallel/worker.ts similarity index 100% rename from src/harness/parallel/worker.ts rename to src/testRunner/parallel/worker.ts diff --git a/src/harness/projectsRunner.ts b/src/testRunner/projectsRunner.ts similarity index 97% rename from src/harness/projectsRunner.ts rename to src/testRunner/projectsRunner.ts index a12da7a268f..f3b4a0bca23 100644 --- a/src/harness/projectsRunner.ts +++ b/src/testRunner/projectsRunner.ts @@ -1,11 +1,3 @@ -/// -/// -/// -/// -/// -/// -/// - namespace project { // Test case is json of below type in tests/cases/project/ interface ProjectRunnerTestCase { diff --git a/src/harness/runner.ts b/src/testRunner/runner.ts similarity index 80% rename from src/harness/runner.ts rename to src/testRunner/runner.ts index 9fe48b559f2..d66360458a8 100644 --- a/src/harness/runner.ts +++ b/src/testRunner/runner.ts @@ -1,27 +1,3 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// -/// -/// -/// -/// -/// -/// - let runners: RunnerBase[] = []; let iterations = 1; @@ -47,13 +23,13 @@ function createRunner(kind: TestRunnerKind): RunnerBase { case "compiler": return new CompilerBaselineRunner(CompilerTestType.Regressions); case "fourslash": - return new FourSlashRunner(FourSlashTestType.Native); + return new FourSlashRunner(FourSlash.FourSlashTestType.Native); case "fourslash-shims": - return new FourSlashRunner(FourSlashTestType.Shims); + return new FourSlashRunner(FourSlash.FourSlashTestType.Shims); case "fourslash-shims-pp": - return new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess); + return new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess); case "fourslash-server": - return new FourSlashRunner(FourSlashTestType.Server); + return new FourSlashRunner(FourSlash.FourSlashTestType.Server); case "project": return new project.ProjectRunner(); case "rwc": @@ -166,19 +142,19 @@ function handleTestConfig() { runners.push(new project.ProjectRunner()); break; case "fourslash": - runners.push(new FourSlashRunner(FourSlashTestType.Native)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Native)); break; case "fourslash-shims": - runners.push(new FourSlashRunner(FourSlashTestType.Shims)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Shims)); break; case "fourslash-shims-pp": - runners.push(new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess)); break; case "fourslash-server": - runners.push(new FourSlashRunner(FourSlashTestType.Server)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Server)); break; case "fourslash-generated": - runners.push(new GeneratedFourslashRunner(FourSlashTestType.Native)); + runners.push(new GeneratedFourslashRunner(FourSlash.FourSlashTestType.Native)); break; case "rwc": runners.push(new RWCRunner()); @@ -208,10 +184,10 @@ function handleTestConfig() { } // language services - runners.push(new FourSlashRunner(FourSlashTestType.Native)); - runners.push(new FourSlashRunner(FourSlashTestType.Shims)); - runners.push(new FourSlashRunner(FourSlashTestType.ShimsWithPreprocess)); - runners.push(new FourSlashRunner(FourSlashTestType.Server)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Native)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Shims)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.ShimsWithPreprocess)); + runners.push(new FourSlashRunner(FourSlash.FourSlashTestType.Server)); // runners.push(new GeneratedFourslashRunner()); // CRON-only tests diff --git a/src/harness/rwcRunner.ts b/src/testRunner/rwcRunner.ts similarity index 96% rename from src/harness/rwcRunner.ts rename to src/testRunner/rwcRunner.ts index e86a8d01f70..eadbcc53e2d 100644 --- a/src/harness/rwcRunner.ts +++ b/src/testRunner/rwcRunner.ts @@ -1,7 +1,3 @@ -/// -/// -/// -/// // In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`. /* tslint:disable:no-null-keyword */ diff --git a/src/harness/test262Runner.ts b/src/testRunner/test262Runner.ts similarity index 96% rename from src/harness/test262Runner.ts rename to src/testRunner/test262Runner.ts index 1c421d07a3e..ec9e1347bc3 100644 --- a/src/harness/test262Runner.ts +++ b/src/testRunner/test262Runner.ts @@ -1,5 +1,3 @@ -/// -/// // In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`. /* tslint:disable:no-null-keyword */ diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json new file mode 100644 index 00000000000..fee848e39ff --- /dev/null +++ b/src/testRunner/tsconfig.json @@ -0,0 +1,39 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/run.js", + "composite": false, + "declaration": false, + "types": [ + "node", "mocha", "chai" + ], + "lib": [ + "es6", + "scripthost" + ] + }, + "references": [ + { "path": "../core", "prepend": true }, + { "path": "../parser", "prepend": true }, + { "path": "../compiler", "prepend": true }, + { "path": "../services", "prepend": true }, + { "path": "../server", "prepend": true }, + { "path": "../harness", "prepend": true }, + { "path": "../typingsInstallerCore", "prepend": true } + ], + + "files": [ + "fourslashRunner.ts", + "compilerRunner.ts", + "projectsRunner.ts", + "rwcRunner.ts", + "externalCompileRunner.ts", + "test262Runner.ts", + + "parallel/host.ts", + "parallel/worker.ts", + "parallel/shared.ts", + + "runner.ts" + ] +} diff --git a/src/compiler/tsc.ts b/src/tsc/tsc.ts similarity index 100% rename from src/compiler/tsc.ts rename to src/tsc/tsc.ts diff --git a/src/tsc/tsconfig.json b/src/tsc/tsconfig.json new file mode 100644 index 00000000000..675a9d5a8b7 --- /dev/null +++ b/src/tsc/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/tsc.js" + }, + "files": [ + "tsc.ts" + ], + "references": [ + { "path": "../core", "prepend": true }, + { "path": "../compiler", "prepend": true } + ] +} diff --git a/src/tsconfig-base.json b/src/tsconfig-base.json index 92c32e73fcc..463d9b9da36 100644 --- a/src/tsconfig-base.json +++ b/src/tsconfig-base.json @@ -1,19 +1,24 @@ { "compilerOptions": { + "pretty": true, "lib": ["es5"], + "target": "es5", + + "declaration": true, + "sourceMap": true, + "composite": true, "noEmitOnError": true, + "strictNullChecks": true, "noImplicitAny": true, "noImplicitThis": true, "noUnusedLocals": true, "noUnusedParameters": true, + "alwaysStrict": true, - "pretty": true, "preserveConstEnums": true, - "stripInternal": true, - "sourceMap": true, - "target": "es5", "newLine": "lf", + "types": [] } } diff --git a/src/tsconfig.json b/src/tsconfig.json new file mode 100644 index 00000000000..abb0f16132f --- /dev/null +++ b/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "include": [], + "references": [ + { "path": "./tsc" } + ] +} \ No newline at end of file diff --git a/src/server/server.ts b/src/tsserver/server.ts similarity index 100% rename from src/server/server.ts rename to src/tsserver/server.ts diff --git a/src/tsserver/tsconfig.json b/src/tsserver/tsconfig.json new file mode 100644 index 00000000000..8c908f31f33 --- /dev/null +++ b/src/tsserver/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig-base", + + "compilerOptions": { + "outFile": "../../built/local/tsserver.js", + "types": [ + "node" + ] + }, + "files": [ + "server.ts" + ], + "references": [ + { "path": "../core", "prepend": true }, + { "path": "../compiler", "prepend": true }, + { "path": "../services", "prepend": true }, + { "path": "../server", "prepend": true } + ] +} diff --git a/src/server/typingsInstaller/nodeTypingsInstaller.ts b/src/typingsInstaller/nodeTypingsInstaller.ts similarity index 100% rename from src/server/typingsInstaller/nodeTypingsInstaller.ts rename to src/typingsInstaller/nodeTypingsInstaller.ts diff --git a/src/typingsInstaller/tsconfig.json b/src/typingsInstaller/tsconfig.json new file mode 100644 index 00000000000..9b8ce1b4aa4 --- /dev/null +++ b/src/typingsInstaller/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "removeComments": true, + "outFile": "../built/local/typingsInstaller.js", + "types": [ + "node" + ], + "lib": [ + "es6", + "scripthost" + ] + }, + "references": [ + { "path": "../core", "prepend": true }, + { "path": "../parser", "prepend": true }, + + /* todo - only need jsTyping and semver from this compilation! */ + { "path": "../compiler", "prepend": true }, + { "path": "../services", "prepend": true }, + { "path": "../server", "prepend": true }, + + { "path": "../typingsInstallerCore", "prepend": true } + ], + "files": [ + "nodeTypingsInstaller.ts" + ] +} diff --git a/src/typingsInstallerCore/tsconfig.json b/src/typingsInstallerCore/tsconfig.json new file mode 100644 index 00000000000..90a40cd8302 --- /dev/null +++ b/src/typingsInstallerCore/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/typingsInstallerCore.js", + "types": [ + "node" + ], + "lib": [ + "es6", + "scripthost" + ] + }, + "references": [ + { "path": "../core" }, + { "path": "../parser" }, + + /* todo - only need jsTyping and semver from this compilation! */ + { "path": "../compiler" }, + { "path": "../services" }, + { "path": "../server" } + ], + "files": [ + "typingsInstaller.ts" + ] +} diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/typingsInstallerCore/typingsInstaller.ts similarity index 100% rename from src/server/typingsInstaller/typingsInstaller.ts rename to src/typingsInstallerCore/typingsInstaller.ts diff --git a/src/harness/unittests/asserts.ts b/src/unittests/asserts.ts similarity index 91% rename from src/harness/unittests/asserts.ts rename to src/unittests/asserts.ts index ec274c44c22..8d5138085a8 100644 --- a/src/harness/unittests/asserts.ts +++ b/src/unittests/asserts.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("assert", () => { it("deepEqual", () => { diff --git a/src/harness/unittests/base64.ts b/src/unittests/base64.ts similarity index 92% rename from src/harness/unittests/base64.ts rename to src/unittests/base64.ts index b503955ee68..11c2623df65 100644 --- a/src/harness/unittests/base64.ts +++ b/src/unittests/base64.ts @@ -1,4 +1,3 @@ -/// namespace ts { describe("base64", () => { describe("base64decode", () => { diff --git a/src/harness/unittests/builder.ts b/src/unittests/builder.ts similarity index 97% rename from src/harness/unittests/builder.ts rename to src/unittests/builder.ts index 3dcf3174f6f..4a163d6b56b 100644 --- a/src/harness/unittests/builder.ts +++ b/src/unittests/builder.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("builder", () => { it("emits dependent files", () => { diff --git a/src/harness/unittests/cancellableLanguageServiceOperations.ts b/src/unittests/cancellableLanguageServiceOperations.ts similarity index 97% rename from src/harness/unittests/cancellableLanguageServiceOperations.ts rename to src/unittests/cancellableLanguageServiceOperations.ts index a198210f76b..a5947cc17e3 100644 --- a/src/harness/unittests/cancellableLanguageServiceOperations.ts +++ b/src/unittests/cancellableLanguageServiceOperations.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("cancellableLanguageServiceOperations", () => { const file = ` diff --git a/src/harness/unittests/commandLineParsing.ts b/src/unittests/commandLineParsing.ts similarity index 97% rename from src/harness/unittests/commandLineParsing.ts rename to src/unittests/commandLineParsing.ts index 4f71d414249..cf7cabdd26d 100644 --- a/src/harness/unittests/commandLineParsing.ts +++ b/src/unittests/commandLineParsing.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("parseCommandLine", () => { diff --git a/src/harness/unittests/compileOnSave.ts b/src/unittests/compileOnSave.ts similarity index 97% rename from src/harness/unittests/compileOnSave.ts rename to src/unittests/compileOnSave.ts index 587ac3dbb5e..49d1659deec 100644 --- a/src/harness/unittests/compileOnSave.ts +++ b/src/unittests/compileOnSave.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts.projectSystem { import CommandNames = server.CommandNames; const nullCancellationToken = server.nullCancellationToken; diff --git a/src/harness/unittests/configurationExtension.ts b/src/unittests/configurationExtension.ts similarity index 97% rename from src/harness/unittests/configurationExtension.ts rename to src/unittests/configurationExtension.ts index ca7b06c495d..012b8e0d2fa 100644 --- a/src/harness/unittests/configurationExtension.ts +++ b/src/unittests/configurationExtension.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts { function createFileSystem(ignoreCase: boolean, cwd: string, root: string) { return new vfs.FileSystem(ignoreCase, { diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/unittests/convertCompilerOptionsFromJson.ts similarity index 97% rename from src/harness/unittests/convertCompilerOptionsFromJson.ts rename to src/unittests/convertCompilerOptionsFromJson.ts index b2b07fc8825..b1695ad01f5 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/unittests/convertCompilerOptionsFromJson.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - namespace ts { describe("convertCompilerOptionsFromJson", () => { function assertCompilerOptions(json: any, configFileName: string, expectedResult: { compilerOptions: CompilerOptions, errors: Diagnostic[] }) { diff --git a/src/harness/unittests/convertToBase64.ts b/src/unittests/convertToBase64.ts similarity index 94% rename from src/harness/unittests/convertToBase64.ts rename to src/unittests/convertToBase64.ts index 93c149c72ee..e41f73034c4 100644 --- a/src/harness/unittests/convertToBase64.ts +++ b/src/unittests/convertToBase64.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("convertToBase64", () => { function runTest(input: string): void { diff --git a/src/harness/unittests/convertTypeAcquisitionFromJson.ts b/src/unittests/convertTypeAcquisitionFromJson.ts similarity index 95% rename from src/harness/unittests/convertTypeAcquisitionFromJson.ts rename to src/unittests/convertTypeAcquisitionFromJson.ts index 7faf0b8fdf9..b46d37f0428 100644 --- a/src/harness/unittests/convertTypeAcquisitionFromJson.ts +++ b/src/unittests/convertTypeAcquisitionFromJson.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - namespace ts { interface ExpectedResult { typeAcquisition: TypeAcquisition; errors: Diagnostic[]; } describe("convertTypeAcquisitionFromJson", () => { diff --git a/src/harness/unittests/customTransforms.ts b/src/unittests/customTransforms.ts similarity index 95% rename from src/harness/unittests/customTransforms.ts rename to src/unittests/customTransforms.ts index 47aaf16acec..8cbc42f7599 100644 --- a/src/harness/unittests/customTransforms.ts +++ b/src/unittests/customTransforms.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("customTransforms", () => { function emitsCorrectly(name: string, sources: { file: string, text: string }[], customTransformers: CustomTransformers, options: CompilerOptions = {}) { diff --git a/src/harness/unittests/evaluation/asyncArrow.ts b/src/unittests/evaluation/asyncArrow.ts similarity index 100% rename from src/harness/unittests/evaluation/asyncArrow.ts rename to src/unittests/evaluation/asyncArrow.ts diff --git a/src/harness/unittests/evaluation/asyncGenerator.ts b/src/unittests/evaluation/asyncGenerator.ts similarity index 100% rename from src/harness/unittests/evaluation/asyncGenerator.ts rename to src/unittests/evaluation/asyncGenerator.ts diff --git a/src/harness/unittests/evaluation/forAwaitOf.ts b/src/unittests/evaluation/forAwaitOf.ts similarity index 100% rename from src/harness/unittests/evaluation/forAwaitOf.ts rename to src/unittests/evaluation/forAwaitOf.ts diff --git a/src/harness/unittests/extractConstants.ts b/src/unittests/extractConstants.ts similarity index 95% rename from src/harness/unittests/extractConstants.ts rename to src/unittests/extractConstants.ts index 9dfb1264a70..e0ef305812c 100644 --- a/src/harness/unittests/extractConstants.ts +++ b/src/unittests/extractConstants.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("extractConstants", () => { testExtractConstant("extractConstant_TopLevel", diff --git a/src/harness/unittests/extractFunctions.ts b/src/unittests/extractFunctions.ts similarity index 95% rename from src/harness/unittests/extractFunctions.ts rename to src/unittests/extractFunctions.ts index 5e9214fb35e..1f90e1cc600 100644 --- a/src/harness/unittests/extractFunctions.ts +++ b/src/unittests/extractFunctions.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("extractFunctions", () => { testExtractFunction("extractFunction1", diff --git a/src/harness/unittests/extractRanges.ts b/src/unittests/extractRanges.ts similarity index 95% rename from src/harness/unittests/extractRanges.ts rename to src/unittests/extractRanges.ts index 73937756769..9cd76dd49e9 100644 --- a/src/harness/unittests/extractRanges.ts +++ b/src/unittests/extractRanges.ts @@ -1,5 +1,3 @@ -/// - namespace ts { function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) { return it(caption, () => { diff --git a/src/harness/unittests/extractTestHelpers.ts b/src/unittests/extractTestHelpers.ts similarity index 96% rename from src/harness/unittests/extractTestHelpers.ts rename to src/unittests/extractTestHelpers.ts index 252112cddac..c36ac88e8e0 100644 --- a/src/harness/unittests/extractTestHelpers.ts +++ b/src/unittests/extractTestHelpers.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { interface Range { pos: number; diff --git a/src/harness/unittests/hostNewLineSupport.ts b/src/unittests/hostNewLineSupport.ts similarity index 96% rename from src/harness/unittests/hostNewLineSupport.ts rename to src/unittests/hostNewLineSupport.ts index fee58d92e4f..abd79210086 100644 --- a/src/harness/unittests/hostNewLineSupport.ts +++ b/src/unittests/hostNewLineSupport.ts @@ -1,4 +1,3 @@ -/// namespace ts { describe("hostNewLineSupport", () => { function testLSWithFiles(settings: CompilerOptions, files: Harness.Compiler.TestFile[]) { diff --git a/src/harness/unittests/incrementalParser.ts b/src/unittests/incrementalParser.ts similarity index 97% rename from src/harness/unittests/incrementalParser.ts rename to src/unittests/incrementalParser.ts index 3792664601e..fb3408b1fc3 100644 --- a/src/harness/unittests/incrementalParser.ts +++ b/src/unittests/incrementalParser.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { ts.disableIncrementalParsing = false; // tslint:disable-line no-unnecessary-qualifier (make clear this is a global mutation!) diff --git a/src/harness/unittests/initializeTSConfig.ts b/src/unittests/initializeTSConfig.ts similarity index 93% rename from src/harness/unittests/initializeTSConfig.ts rename to src/unittests/initializeTSConfig.ts index b67fce6226f..c75e7ee1bf6 100644 --- a/src/harness/unittests/initializeTSConfig.ts +++ b/src/unittests/initializeTSConfig.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("initTSConfig", () => { function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) { diff --git a/src/harness/unittests/jsDocParsing.ts b/src/unittests/jsDocParsing.ts similarity index 96% rename from src/harness/unittests/jsDocParsing.ts rename to src/unittests/jsDocParsing.ts index cad5ed94b32..9a97cdc1505 100644 --- a/src/harness/unittests/jsDocParsing.ts +++ b/src/unittests/jsDocParsing.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("JSDocParsing", () => { describe("TypeExpressions", () => { diff --git a/src/harness/unittests/languageService.ts b/src/unittests/languageService.ts similarity index 95% rename from src/harness/unittests/languageService.ts rename to src/unittests/languageService.ts index 14bdff9867e..ce8fa93d1f9 100644 --- a/src/harness/unittests/languageService.ts +++ b/src/unittests/languageService.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("languageService", () => { const files: {[index: string]: string} = { diff --git a/src/harness/unittests/matchFiles.ts b/src/unittests/matchFiles.ts similarity index 97% rename from src/harness/unittests/matchFiles.ts rename to src/unittests/matchFiles.ts index 4662dd9f536..5ece71245bb 100644 --- a/src/harness/unittests/matchFiles.ts +++ b/src/unittests/matchFiles.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts { const caseInsensitiveBasePath = "c:/dev/"; const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json"; diff --git a/src/harness/unittests/moduleResolution.ts b/src/unittests/moduleResolution.ts similarity index 98% rename from src/harness/unittests/moduleResolution.ts rename to src/unittests/moduleResolution.ts index bc221dc8b07..e97a3f5fc42 100644 --- a/src/harness/unittests/moduleResolution.ts +++ b/src/unittests/moduleResolution.ts @@ -1,5 +1,3 @@ -/// - namespace ts { export function checkResolvedModule(expected: ResolvedModuleFull | undefined, actual: ResolvedModuleFull): boolean { if (!expected === !actual) { diff --git a/src/harness/unittests/organizeImports.ts b/src/unittests/organizeImports.ts similarity index 96% rename from src/harness/unittests/organizeImports.ts rename to src/unittests/organizeImports.ts index 9dea2d0d51e..b889f97ef1c 100644 --- a/src/harness/unittests/organizeImports.ts +++ b/src/unittests/organizeImports.ts @@ -1,7 +1,3 @@ -/// -/// - - namespace ts { describe("Organize imports", () => { describe("Sort imports", () => { diff --git a/src/harness/unittests/paths.ts b/src/unittests/paths.ts similarity index 100% rename from src/harness/unittests/paths.ts rename to src/unittests/paths.ts diff --git a/src/harness/unittests/printer.ts b/src/unittests/printer.ts similarity index 97% rename from src/harness/unittests/printer.ts rename to src/unittests/printer.ts index 6392fd3e9f3..ba9abe41e9f 100644 --- a/src/harness/unittests/printer.ts +++ b/src/unittests/printer.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("PrinterAPI", () => { function makePrintsCorrectly(prefix: string) { diff --git a/src/harness/unittests/programMissingFiles.ts b/src/unittests/programMissingFiles.ts similarity index 95% rename from src/harness/unittests/programMissingFiles.ts rename to src/unittests/programMissingFiles.ts index 66b2ab4cf7f..37d4c791196 100644 --- a/src/harness/unittests/programMissingFiles.ts +++ b/src/unittests/programMissingFiles.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts { function verifyMissingFilePaths(missingPaths: ReadonlyArray, expected: ReadonlyArray) { assert.isDefined(missingPaths); diff --git a/src/harness/unittests/programNoParseFalsyFileNames.ts b/src/unittests/programNoParseFalsyFileNames.ts similarity index 96% rename from src/harness/unittests/programNoParseFalsyFileNames.ts rename to src/unittests/programNoParseFalsyFileNames.ts index 3270f6b14be..8040e7c7f43 100644 --- a/src/harness/unittests/programNoParseFalsyFileNames.ts +++ b/src/unittests/programNoParseFalsyFileNames.ts @@ -1,4 +1,3 @@ -/// namespace ts { describe("programNoParseFalsyFileNames", () => { let program: Program; diff --git a/src/harness/unittests/projectErrors.ts b/src/unittests/projectErrors.ts similarity index 96% rename from src/harness/unittests/projectErrors.ts rename to src/unittests/projectErrors.ts index ae272fd58c6..b17494b59fb 100644 --- a/src/harness/unittests/projectErrors.ts +++ b/src/unittests/projectErrors.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts.projectSystem { describe("Project errors", () => { function checkProjectErrors(projectFiles: server.ProjectFilesWithTSDiagnostics, expectedErrors: ReadonlyArray): void { diff --git a/src/harness/unittests/projectReferences.ts b/src/unittests/projectReferences.ts similarity index 96% rename from src/harness/unittests/projectReferences.ts rename to src/unittests/projectReferences.ts index 97628d17141..070d26cccd5 100644 --- a/src/harness/unittests/projectReferences.ts +++ b/src/unittests/projectReferences.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { interface TestProjectSpecification { configFileName?: string; diff --git a/src/harness/unittests/publicApi.ts b/src/unittests/publicApi.ts similarity index 94% rename from src/harness/unittests/publicApi.ts rename to src/unittests/publicApi.ts index 0a5280f5273..bf66630de95 100644 --- a/src/harness/unittests/publicApi.ts +++ b/src/unittests/publicApi.ts @@ -1,5 +1,3 @@ -/// - describe("Public APIs", () => { function verifyApi(fileName: string) { const builtFile = `built/local/${fileName}`; diff --git a/src/harness/unittests/reuseProgramStructure.ts b/src/unittests/reuseProgramStructure.ts similarity index 98% rename from src/harness/unittests/reuseProgramStructure.ts rename to src/unittests/reuseProgramStructure.ts index 27873925302..44082f3a302 100644 --- a/src/harness/unittests/reuseProgramStructure.ts +++ b/src/unittests/reuseProgramStructure.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { const enum ChangedPart { diff --git a/src/harness/unittests/services/colorization.ts b/src/unittests/services/colorization.ts similarity index 97% rename from src/harness/unittests/services/colorization.ts rename to src/unittests/services/colorization.ts index a05ca01641e..e3295e6fee8 100644 --- a/src/harness/unittests/services/colorization.ts +++ b/src/unittests/services/colorization.ts @@ -1,5 +1,3 @@ -/// - // tslint:disable no-invalid-template-strings (lots of tests use quoted code) interface ClassificationEntry { diff --git a/src/harness/unittests/services/documentRegistry.ts b/src/unittests/services/documentRegistry.ts similarity index 97% rename from src/harness/unittests/services/documentRegistry.ts rename to src/unittests/services/documentRegistry.ts index ab624a17dbf..a3dad56f42b 100644 --- a/src/harness/unittests/services/documentRegistry.ts +++ b/src/unittests/services/documentRegistry.ts @@ -1,5 +1,3 @@ -/// - describe("DocumentRegistry", () => { it("documents are shared between projects", () => { const documentRegistry = ts.createDocumentRegistry(); diff --git a/src/harness/unittests/services/patternMatcher.ts b/src/unittests/services/patternMatcher.ts similarity index 97% rename from src/harness/unittests/services/patternMatcher.ts rename to src/unittests/services/patternMatcher.ts index d40354a5e60..5e35d2020db 100644 --- a/src/harness/unittests/services/patternMatcher.ts +++ b/src/unittests/services/patternMatcher.ts @@ -1,5 +1,3 @@ -/// - describe("PatternMatcher", () => { describe("BreakIntoCharacterSpans", () => { it("EmptyIdentifier", () => { diff --git a/src/harness/unittests/services/preProcessFile.ts b/src/unittests/services/preProcessFile.ts similarity index 97% rename from src/harness/unittests/services/preProcessFile.ts rename to src/unittests/services/preProcessFile.ts index 56d66a245ec..a89b6337c84 100644 --- a/src/harness/unittests/services/preProcessFile.ts +++ b/src/unittests/services/preProcessFile.ts @@ -1,5 +1,3 @@ -/// - describe("PreProcessFile:", () => { function test(sourceText: string, readImportFile: boolean, detectJavaScriptImports: boolean, expectedPreProcess: ts.PreProcessedFileInfo): void { const resultPreProcess = ts.preProcessFile(sourceText, readImportFile, detectJavaScriptImports); diff --git a/src/harness/unittests/session.ts b/src/unittests/session.ts similarity index 97% rename from src/harness/unittests/session.ts rename to src/unittests/session.ts index cdb6e818d7b..b3b2cf6ce22 100644 --- a/src/harness/unittests/session.ts +++ b/src/unittests/session.ts @@ -1,5 +1,3 @@ -/// - const expect: typeof _chai.expect = _chai.expect; namespace ts.server { diff --git a/src/harness/unittests/symbolWalker.ts b/src/unittests/symbolWalker.ts similarity index 95% rename from src/harness/unittests/symbolWalker.ts rename to src/unittests/symbolWalker.ts index a5939da68bf..4743b87133b 100644 --- a/src/harness/unittests/symbolWalker.ts +++ b/src/unittests/symbolWalker.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("Symbol Walker", () => { function test(description: string, source: string, verifier: (file: SourceFile, checker: TypeChecker) => void) { diff --git a/src/harness/unittests/telemetry.ts b/src/unittests/telemetry.ts similarity index 96% rename from src/harness/unittests/telemetry.ts rename to src/unittests/telemetry.ts index 53025e15a9c..7c3a05d02fc 100644 --- a/src/harness/unittests/telemetry.ts +++ b/src/unittests/telemetry.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts.projectSystem { describe("project telemetry", () => { it("does nothing for inferred project", () => { diff --git a/src/harness/unittests/textChanges.ts b/src/unittests/textChanges.ts similarity index 97% rename from src/harness/unittests/textChanges.ts rename to src/unittests/textChanges.ts index 5303c9bcc28..0c06eecb51d 100644 --- a/src/harness/unittests/textChanges.ts +++ b/src/unittests/textChanges.ts @@ -1,7 +1,3 @@ -/// -/// -/// - // Some tests have trailing whitespace // tslint:disable trim-trailing-whitespace diff --git a/src/harness/unittests/textStorage.ts b/src/unittests/textStorage.ts similarity index 93% rename from src/harness/unittests/textStorage.ts rename to src/unittests/textStorage.ts index 755766bd02f..9938ed106e7 100644 --- a/src/harness/unittests/textStorage.ts +++ b/src/unittests/textStorage.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts.textStorage { describe("Text storage", () => { const f = { diff --git a/src/harness/unittests/transform.ts b/src/unittests/transform.ts similarity index 97% rename from src/harness/unittests/transform.ts rename to src/unittests/transform.ts index f513adf6bf2..6c74c558b16 100644 --- a/src/harness/unittests/transform.ts +++ b/src/unittests/transform.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { describe("TransformAPI", () => { function replaceUndefinedWithVoid0(context: TransformationContext) { diff --git a/src/harness/unittests/transpile.ts b/src/unittests/transpile.ts similarity index 97% rename from src/harness/unittests/transpile.ts rename to src/unittests/transpile.ts index 70f7ebdbc46..0ef89edaab6 100644 --- a/src/harness/unittests/transpile.ts +++ b/src/unittests/transpile.ts @@ -1,5 +1,3 @@ -/// - namespace ts { describe("Transpile", () => { diff --git a/src/harness/unittests/tsbuild.ts b/src/unittests/tsbuild.ts similarity index 100% rename from src/harness/unittests/tsbuild.ts rename to src/unittests/tsbuild.ts diff --git a/src/harness/unittests/tscWatchMode.ts b/src/unittests/tscWatchMode.ts similarity index 97% rename from src/harness/unittests/tscWatchMode.ts rename to src/unittests/tscWatchMode.ts index e6fffbc5e79..4d6797f08da 100644 --- a/src/harness/unittests/tscWatchMode.ts +++ b/src/unittests/tscWatchMode.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts.tscWatch { import WatchedSystem = TestFSWithWatch.TestServerHost; type File = TestFSWithWatch.File; diff --git a/src/unittests/tsconfig.json b/src/unittests/tsconfig.json new file mode 100644 index 00000000000..683812ba029 --- /dev/null +++ b/src/unittests/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/unittests.js", + "types": [ + "node", "mocha", "chai" + ], + "lib": [ + "es6", + "scripthost" + ] + }, + "references": [ + { "path": "../core" }, + { "path": "../parser" }, + { "path": "../compiler" }, + { "path": "../services" }, + { "path": "../server" }, + { "path": "../typingsInstallerCore" }, + { "path": "../harness" } + ], + "include": ["**/*.ts"] +} diff --git a/src/harness/unittests/tsconfigParsing.ts b/src/unittests/tsconfigParsing.ts similarity index 96% rename from src/harness/unittests/tsconfigParsing.ts rename to src/unittests/tsconfigParsing.ts index f46cee3656b..4b590ba51ce 100644 --- a/src/harness/unittests/tsconfigParsing.ts +++ b/src/unittests/tsconfigParsing.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - namespace ts { describe("parseConfigFileTextToJson", () => { function assertParseResult(jsonText: string, expectedConfigObject: { config?: any; error?: Diagnostic[] }) { diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/unittests/tsserverProjectSystem.ts similarity index 97% rename from src/harness/unittests/tsserverProjectSystem.ts rename to src/unittests/tsserverProjectSystem.ts index 70341b18368..f48f59c6970 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/unittests/tsserverProjectSystem.ts @@ -1,7 +1,3 @@ -/// -/// -/// - namespace ts.projectSystem { import TI = server.typingsInstaller; import protocol = server.protocol; diff --git a/src/harness/unittests/typingsInstaller.ts b/src/unittests/typingsInstaller.ts similarity index 97% rename from src/harness/unittests/typingsInstaller.ts rename to src/unittests/typingsInstaller.ts index 0b355d5aa89..a2670483350 100644 --- a/src/harness/unittests/typingsInstaller.ts +++ b/src/unittests/typingsInstaller.ts @@ -1,8 +1,3 @@ -/// -/// -/// -/// - namespace ts.projectSystem { import TI = server.typingsInstaller; import validatePackageName = JsTyping.validatePackageName; diff --git a/src/harness/unittests/versionCache.ts b/src/unittests/versionCache.ts similarity index 96% rename from src/harness/unittests/versionCache.ts rename to src/unittests/versionCache.ts index 40f5f43b6dc..cc534b6fa5b 100644 --- a/src/harness/unittests/versionCache.ts +++ b/src/unittests/versionCache.ts @@ -1,6 +1,3 @@ -/// -/// - namespace ts { function editFlat(position: number, deletedLength: number, newText: string, source: string) { return source.substring(0, position) + newText + source.substring(position + deletedLength, source.length); diff --git a/src/server/watchGuard/tsconfig.json b/src/watchGuard/tsconfig.json similarity index 64% rename from src/server/watchGuard/tsconfig.json rename to src/watchGuard/tsconfig.json index 354d3d7f499..8a865c65c27 100644 --- a/src/server/watchGuard/tsconfig.json +++ b/src/watchGuard/tsconfig.json @@ -1,8 +1,8 @@ { - "extends": "../../tsconfig-base", + "extends": "../tsconfig-base", "compilerOptions": { "removeComments": true, - "outFile": "../../../built/local/watchGuard.js", + "outFile": "../built/local/watchGuard.js", "types": [ "node" ], diff --git a/src/server/watchGuard/watchGuard.ts b/src/watchGuard/watchGuard.ts similarity index 100% rename from src/server/watchGuard/watchGuard.ts rename to src/watchGuard/watchGuard.ts