mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Merge branch 'master' into fix2-getConstraintOfIndexedAccess
This commit is contained in:
commit
7dbea0e82d
1
.gitignore
vendored
1
.gitignore
vendored
@ -58,6 +58,7 @@ internal/
|
||||
!tests/baselines/reference/project/nodeModules*/**/*
|
||||
.idea
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
.parallelperf.*
|
||||
tests/cases/user/*/package-lock.json
|
||||
tests/cases/user/*/node_modules/
|
||||
|
||||
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -2,24 +2,19 @@
|
||||
path = tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-React-Starter
|
||||
ignore = all
|
||||
shallow = true
|
||||
[submodule "tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter"]
|
||||
path = tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-Node-Starter.git
|
||||
ignore = all
|
||||
shallow = true
|
||||
[submodule "tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter"]
|
||||
path = tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-React-Native-Starter.git
|
||||
ignore = all
|
||||
shallow = true
|
||||
[submodule "tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter"]
|
||||
path = tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-Vue-Starter.git
|
||||
ignore = all
|
||||
shallow = true
|
||||
[submodule "tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter"]
|
||||
path = tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-WeChat-Starter.git
|
||||
ignore = all
|
||||
shallow = true
|
||||
|
||||
@ -18,6 +18,7 @@ branches:
|
||||
- master
|
||||
- release-2.5
|
||||
- release-2.6
|
||||
- release-2.7
|
||||
|
||||
install:
|
||||
- npm uninstall typescript --no-save
|
||||
|
||||
@ -8,7 +8,14 @@ Issues that ask questions answered in the FAQ will be closed without elaboration
|
||||
|
||||
## 2. Search for Duplicates
|
||||
|
||||
[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one.
|
||||
[Search the existing issues](https://github.com/Microsoft/TypeScript/search?type=Issues) before logging a new one.
|
||||
|
||||
Some search tips:
|
||||
* *Don't* restrict your search to only open issues. An issue with a title similar to yours may have been closed as a duplicate of one with a less-findable title.
|
||||
* Check for synonyms. For example, if your bug involves an interface, it likely also occurs with type aliases or classes.
|
||||
* Search for the title of the issue you're about to log. This sounds obvious but 80% of the time this is sufficient to find a duplicate when one exists.
|
||||
* Read more than the first page of results. Many bugs here use the same words so relevancy sorting is not particularly strong.
|
||||
* If you have a crash, search for the first few topmost function names shown in the call stack.
|
||||
|
||||
## 3. Do you have a question?
|
||||
|
||||
@ -183,3 +190,10 @@ jake baseline-accept
|
||||
```
|
||||
|
||||
to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines.
|
||||
|
||||
## Localization
|
||||
|
||||
All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
|
||||
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in [`diagnosticInformationMap.generated.ts`](./src/compiler/diagnosticInformationMap.generated.ts).
|
||||
|
||||
See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).
|
||||
|
||||
25
Gulpfile.ts
25
Gulpfile.ts
@ -150,7 +150,9 @@ const es2018LibrarySourceMap = es2018LibrarySource.map(source =>
|
||||
({ target: "lib." + source, sources: ["header.d.ts", source] }));
|
||||
|
||||
const esnextLibrarySource = [
|
||||
"esnext.asynciterable.d.ts"
|
||||
"esnext.asynciterable.d.ts",
|
||||
"esnext.array.d.ts",
|
||||
"esnext.promise.d.ts"
|
||||
];
|
||||
|
||||
const esnextLibrarySourceMap = esnextLibrarySource.map(source =>
|
||||
@ -679,14 +681,14 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
|
||||
workerCount = cmdLineOptions.workers;
|
||||
}
|
||||
|
||||
if (tests || runners || light || taskConfigsFolder) {
|
||||
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit);
|
||||
}
|
||||
|
||||
if (tests && tests.toLocaleLowerCase() === "rwc") {
|
||||
testTimeout = 400000;
|
||||
}
|
||||
|
||||
if (tests || runners || light || testTimeout || taskConfigsFolder) {
|
||||
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout);
|
||||
}
|
||||
|
||||
const colors = cmdLineOptions.colors;
|
||||
const reporter = cmdLineOptions.reporter || defaultReporter;
|
||||
|
||||
@ -871,8 +873,17 @@ function cleanTestDirs(done: (e?: any) => void) {
|
||||
}
|
||||
|
||||
// used to pass data from jake command line directly to run.js
|
||||
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
|
||||
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, runner: runners ? runners.split(",") : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder, noColor: !cmdLineOptions.colors });
|
||||
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string, timeout?: number) {
|
||||
const testConfigContents = JSON.stringify({
|
||||
test: tests ? [tests] : undefined,
|
||||
runner: runners ? runners.split(",") : undefined,
|
||||
light,
|
||||
workerCount,
|
||||
stackTraceLimit,
|
||||
taskConfigsFolder,
|
||||
noColor: !cmdLineOptions.colors,
|
||||
timeout,
|
||||
});
|
||||
console.log("Running tests with config: " + testConfigContents);
|
||||
fs.writeFileSync("test.config", testConfigContents);
|
||||
}
|
||||
|
||||
21
Jakefile.js
21
Jakefile.js
@ -130,6 +130,7 @@ var harnessSources = harnessCoreSources.concat([
|
||||
"textStorage.ts",
|
||||
"moduleResolution.ts",
|
||||
"tsconfigParsing.ts",
|
||||
"asserts.ts",
|
||||
"builder.ts",
|
||||
"commandLineParsing.ts",
|
||||
"configurationExtension.ts",
|
||||
@ -212,7 +213,9 @@ var es2018LibrarySourceMap = es2018LibrarySource.map(function (source) {
|
||||
});
|
||||
|
||||
var esnextLibrarySource = [
|
||||
"esnext.asynciterable.d.ts"
|
||||
"esnext.asynciterable.d.ts",
|
||||
"esnext.array.d.ts",
|
||||
"esnext.promise.d.ts"
|
||||
];
|
||||
|
||||
var esnextLibrarySourceMap = esnextLibrarySource.map(function (source) {
|
||||
@ -795,7 +798,7 @@ compileFile(
|
||||
/*prereqs*/[builtLocalDirectory, tscFile, tsserverLibraryFile].concat(libraryTargets).concat(servicesSources).concat(harnessSources),
|
||||
/*prefixes*/[],
|
||||
/*useBuiltCompiler:*/ true,
|
||||
/*opts*/ { types: ["node", "mocha"], lib: "es6" });
|
||||
/*opts*/ { types: ["node", "mocha", "chai"], lib: "es6" });
|
||||
|
||||
var internalTests = "internal/";
|
||||
|
||||
@ -856,7 +859,7 @@ function cleanTestDirs() {
|
||||
}
|
||||
|
||||
// used to pass data from jake command line directly to run.js
|
||||
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors) {
|
||||
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout) {
|
||||
var testConfigContents = JSON.stringify({
|
||||
runners: runners ? runners.split(",") : undefined,
|
||||
test: tests ? [tests] : undefined,
|
||||
@ -864,7 +867,8 @@ function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCou
|
||||
workerCount: workerCount,
|
||||
taskConfigsFolder: taskConfigsFolder,
|
||||
stackTraceLimit: stackTraceLimit,
|
||||
noColor: !colors
|
||||
noColor: !colors,
|
||||
timeout: testTimeout
|
||||
});
|
||||
fs.writeFileSync('test.config', testConfigContents);
|
||||
}
|
||||
@ -906,14 +910,14 @@ function runConsoleTests(defaultReporter, runInParallel) {
|
||||
workerCount = process.env.workerCount || process.env.p || os.cpus().length;
|
||||
}
|
||||
|
||||
if (tests || runners || light || taskConfigsFolder) {
|
||||
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors);
|
||||
}
|
||||
|
||||
if (tests && tests.toLocaleLowerCase() === "rwc") {
|
||||
testTimeout = 800000;
|
||||
}
|
||||
|
||||
if (tests || runners || light || testTimeout || taskConfigsFolder) {
|
||||
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout);
|
||||
}
|
||||
|
||||
var colorsFlag = process.env.color || process.env.colors;
|
||||
var colors = colorsFlag !== "false" && colorsFlag !== "0";
|
||||
var reporter = process.env.reporter || process.env.r || defaultReporter;
|
||||
@ -1200,6 +1204,7 @@ var tslintRules = [
|
||||
"debugAssertRule",
|
||||
"nextLineRule",
|
||||
"noBomRule",
|
||||
"noDoubleSpaceRule",
|
||||
"noIncrementDecrementRule",
|
||||
"noInOperatorRule",
|
||||
"noTypeAssertionWhitespaceRule",
|
||||
|
||||
@ -15,3 +15,5 @@
|
||||
**Expected behavior:**
|
||||
|
||||
**Actual behavior:**
|
||||
|
||||
**Related:**
|
||||
|
||||
2996
package-lock.json
generated
2996
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -30,7 +30,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/browserify": "latest",
|
||||
"@types/colors": "latest",
|
||||
"@types/chai": "latest",
|
||||
"@types/convert-source-map": "latest",
|
||||
"@types/del": "latest",
|
||||
"@types/glob": "latest",
|
||||
@ -44,7 +44,7 @@
|
||||
"@types/minimist": "latest",
|
||||
"@types/mkdirp": "latest",
|
||||
"@types/mocha": "latest",
|
||||
"@types/node": "latest",
|
||||
"@types/node": "8.5.5",
|
||||
"@types/q": "latest",
|
||||
"@types/run-sequence": "latest",
|
||||
"@types/through2": "latest",
|
||||
@ -52,6 +52,7 @@
|
||||
"xml2js": "^0.4.19",
|
||||
"browser-resolve": "^1.11.2",
|
||||
"browserify": "latest",
|
||||
"chai": "latest",
|
||||
"convert-source-map": "latest",
|
||||
"del": "latest",
|
||||
"gulp": "3.X",
|
||||
@ -78,7 +79,7 @@
|
||||
"ts-node": "latest",
|
||||
"tslint": "latest",
|
||||
"vinyl": "latest",
|
||||
"colors": "latest",
|
||||
"chalk": "latest",
|
||||
"typescript": "next"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as Lint from "tslint";
|
||||
import * as colors from "colors";
|
||||
import chalk from "chalk";
|
||||
import { sep } from "path";
|
||||
function groupBy<T>(array: ReadonlyArray<T> | undefined, getGroupId: (elem: T, index: number) => number | string): T[][] {
|
||||
if (!array) {
|
||||
@ -52,7 +52,7 @@ function getLink(failure: Lint.RuleFailure, color: boolean): string {
|
||||
if (path.indexOf("/") === -1 && path.indexOf("\\") === -1) {
|
||||
path = `.${sep}${path}`;
|
||||
}
|
||||
return `${color ? (sev === "WARNING" ? colors.blue(sev) : colors.red(sev)) : sev}: ${path}:${lineAndCharacter.line + 1}:${lineAndCharacter.character + 1}`;
|
||||
return `${color ? (sev === "WARNING" ? chalk.blue(sev) : chalk.red(sev)) : sev}: ${path}:${lineAndCharacter.line + 1}:${lineAndCharacter.character + 1}`;
|
||||
}
|
||||
|
||||
function getLinkMaxSize(failures: Lint.RuleFailure[]): number {
|
||||
@ -91,7 +91,7 @@ export class Formatter extends Lint.Formatters.AbstractFormatter {
|
||||
const nameMaxSize = getNameMaxSize(group);
|
||||
return `
|
||||
${currentFile}
|
||||
${group.map(f => `${pad(getLink(f, /*color*/ true), getLink(f, /*color*/ false).length, linkMaxSize)} ${colors.grey(pad(f.getRuleName(), f.getRuleName().length, nameMaxSize))} ${colors.yellow(f.getFailure())}`).join("\n")}`;
|
||||
${group.map(f => `${pad(getLink(f, /*color*/ true), getLink(f, /*color*/ false).length, linkMaxSize)} ${chalk.grey(pad(f.getRuleName(), f.getRuleName().length, nameMaxSize))} ${chalk.yellow(f.getFailure())}`).join("\n")}`;
|
||||
}).join("\n");
|
||||
}
|
||||
}
|
||||
54
scripts/tslint/rules/noDoubleSpaceRule.ts
Normal file
54
scripts/tslint/rules/noDoubleSpaceRule.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import * as Lint from "tslint/lib";
|
||||
import * as ts from "typescript";
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithFunction(sourceFile, walk);
|
||||
}
|
||||
}
|
||||
|
||||
function walk(ctx: Lint.WalkContext<void>): void {
|
||||
const { sourceFile } = ctx;
|
||||
const lines = sourceFile.text.split("\n");
|
||||
const strings = getLiterals(sourceFile);
|
||||
lines.forEach((line, idx) => {
|
||||
// Skip indentation.
|
||||
const firstNonSpace = /\S/.exec(line);
|
||||
if (firstNonSpace === null) {
|
||||
return;
|
||||
}
|
||||
// Allow common uses of double spaces
|
||||
// * To align `=` or `!=` signs
|
||||
// * To align comments at the end of lines
|
||||
// * To indent inside a comment
|
||||
// * To use two spaces after a period
|
||||
// * To include aligned `->` in a comment
|
||||
const rgx = /[^/*. ] [^-!/= ]/g;
|
||||
rgx.lastIndex = firstNonSpace.index;
|
||||
const doubleSpace = rgx.exec(line);
|
||||
// Also allow to align comments after `@param`
|
||||
if (doubleSpace !== null && !line.includes("@param")) {
|
||||
const pos = lines.slice(0, idx).reduce((len, line) => len + 1 + line.length, 0) + doubleSpace.index;
|
||||
if (!strings.some(s => s.getStart() <= pos && s.end > pos)) {
|
||||
ctx.addFailureAt(pos + 1, 2, "Use only one space.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getLiterals(sourceFile: ts.SourceFile): ReadonlyArray<ts.Node> {
|
||||
const out: ts.Node[] = [];
|
||||
sourceFile.forEachChild(function cb(node) {
|
||||
switch (node.kind) {
|
||||
case ts.SyntaxKind.StringLiteral:
|
||||
case ts.SyntaxKind.TemplateHead:
|
||||
case ts.SyntaxKind.TemplateMiddle:
|
||||
case ts.SyntaxKind.TemplateTail:
|
||||
case ts.SyntaxKind.NoSubstitutionTemplateLiteral:
|
||||
case ts.SyntaxKind.RegularExpressionLiteral:
|
||||
out.push(node);
|
||||
}
|
||||
node.forEachChild(cb);
|
||||
});
|
||||
return out;
|
||||
}
|
||||
@ -2,7 +2,7 @@ import * as Lint from "tslint/lib";
|
||||
import * as ts from "typescript";
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING = "The '|' and '&' operators must be surrounded by single spaces";
|
||||
public static FAILURE_STRING = "The '|' and '&' operators must be surrounded by spaces";
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithFunction(sourceFile, walk);
|
||||
@ -11,26 +11,20 @@ export class Rule extends Lint.Rules.AbstractRule {
|
||||
|
||||
function walk(ctx: Lint.WalkContext<void>): void {
|
||||
const { sourceFile } = ctx;
|
||||
ts.forEachChild(sourceFile, recur);
|
||||
function recur(node: ts.Node): void {
|
||||
if (node.kind === ts.SyntaxKind.UnionType || node.kind === ts.SyntaxKind.IntersectionType) {
|
||||
check((node as ts.UnionOrIntersectionTypeNode).types);
|
||||
sourceFile.forEachChild(function cb(node: ts.Node): void {
|
||||
if (ts.isUnionTypeNode(node) || ts.isIntersectionTypeNode(node)) {
|
||||
check(node);
|
||||
}
|
||||
ts.forEachChild(node, recur);
|
||||
}
|
||||
node.forEachChild(cb);
|
||||
});
|
||||
|
||||
function check(types: ReadonlyArray<ts.TypeNode>): void {
|
||||
let expectedStart = types[0].end + 2; // space, | or &
|
||||
for (let i = 1; i < types.length; i++) {
|
||||
const currentType = types[i];
|
||||
if (expectedStart !== currentType.pos || currentType.getLeadingTriviaWidth() !== 1) {
|
||||
const previousTypeEndPos = sourceFile.getLineAndCharacterOfPosition(types[i - 1].end);
|
||||
const currentTypeStartPos = sourceFile.getLineAndCharacterOfPosition(currentType.pos);
|
||||
if (previousTypeEndPos.line === currentTypeStartPos.line) {
|
||||
ctx.addFailureAtNode(currentType, Rule.FAILURE_STRING);
|
||||
}
|
||||
function check(node: ts.UnionTypeNode | ts.IntersectionTypeNode): void {
|
||||
const list = node.getChildren().find(child => child.kind === ts.SyntaxKind.SyntaxList)!;
|
||||
for (const child of list.getChildren()) {
|
||||
if ((child.kind === ts.SyntaxKind.BarToken || child.kind === ts.SyntaxKind.AmpersandToken)
|
||||
&& (/\S/.test(sourceFile.text[child.getStart(sourceFile) - 1]) || /\S/.test(sourceFile.text[child.end]))) {
|
||||
ctx.addFailureAtNode(child, Rule.FAILURE_STRING);
|
||||
}
|
||||
expectedStart = currentType.end + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ namespace ts {
|
||||
// without names can only come from JSDocFunctionTypes.
|
||||
Debug.assert(node.parent.kind === SyntaxKind.JSDocFunctionType);
|
||||
const functionType = <JSDocFunctionType>node.parent;
|
||||
const index = indexOf(functionType.parameters, node);
|
||||
const index = functionType.parameters.indexOf(node as ParameterDeclaration);
|
||||
return "arg" + index as __String;
|
||||
case SyntaxKind.JSDocTypedefTag:
|
||||
const name = getNameOfJSDocTypedef(node as JSDocTypedefTag);
|
||||
@ -746,7 +746,11 @@ namespace ts {
|
||||
}
|
||||
|
||||
function isNarrowingTypeofOperands(expr1: Expression, expr2: Expression) {
|
||||
return expr1.kind === SyntaxKind.TypeOfExpression && isNarrowableOperand((<TypeOfExpression>expr1).expression) && expr2.kind === SyntaxKind.StringLiteral;
|
||||
return expr1.kind === SyntaxKind.TypeOfExpression && isNarrowableOperand((<TypeOfExpression>expr1).expression) && (expr2.kind === SyntaxKind.StringLiteral || expr2.kind === SyntaxKind.NoSubstitutionTemplateLiteral);
|
||||
}
|
||||
|
||||
function isNarrowableInOperands(left: Expression, right: Expression) {
|
||||
return (left.kind === SyntaxKind.StringLiteral || left.kind === SyntaxKind.NoSubstitutionTemplateLiteral) && isNarrowingExpression(right);
|
||||
}
|
||||
|
||||
function isNarrowingBinaryExpression(expr: BinaryExpression) {
|
||||
@ -761,6 +765,8 @@ namespace ts {
|
||||
isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
|
||||
case SyntaxKind.InstanceOfKeyword:
|
||||
return isNarrowableOperand(expr.left);
|
||||
case SyntaxKind.InKeyword:
|
||||
return isNarrowableInOperands(expr.left, expr.right);
|
||||
case SyntaxKind.CommaToken:
|
||||
return isNarrowingExpression(expr.right);
|
||||
}
|
||||
@ -1627,7 +1633,7 @@ namespace ts {
|
||||
// to the one we would get for: { <...>(...): T }
|
||||
//
|
||||
// We do that by making an anonymous type literal symbol, and then setting the function
|
||||
// symbol as its sole member. To the rest of the system, this symbol will be indistinguishable
|
||||
// symbol as its sole member. To the rest of the system, this symbol will be indistinguishable
|
||||
// from an actual type literal symbol you would have gotten had you used the long form.
|
||||
const symbol = createSymbol(SymbolFlags.Signature, getDeclarationName(node));
|
||||
addDeclarationToSymbol(symbol, node, SymbolFlags.Signature);
|
||||
@ -2283,30 +2289,13 @@ namespace ts {
|
||||
declareSymbol(file.symbol.exports, file.symbol, <PropertyAccessExpression>node.left, SymbolFlags.Property | SymbolFlags.ExportValue, SymbolFlags.None);
|
||||
}
|
||||
|
||||
function isExportsOrModuleExportsOrAlias(node: Node): boolean {
|
||||
return isExportsIdentifier(node) ||
|
||||
isModuleExportsPropertyAccessExpression(node) ||
|
||||
isIdentifier(node) && isNameOfExportsOrModuleExportsAliasDeclaration(node);
|
||||
}
|
||||
|
||||
function isNameOfExportsOrModuleExportsAliasDeclaration(node: Identifier): boolean {
|
||||
const symbol = lookupSymbolForName(node.escapedText);
|
||||
return symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) &&
|
||||
symbol.valueDeclaration.initializer && isExportsOrModuleExportsOrAliasOrAssignment(symbol.valueDeclaration.initializer);
|
||||
}
|
||||
|
||||
function isExportsOrModuleExportsOrAliasOrAssignment(node: Node): boolean {
|
||||
return isExportsOrModuleExportsOrAlias(node) ||
|
||||
(isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (isExportsOrModuleExportsOrAliasOrAssignment(node.left) || isExportsOrModuleExportsOrAliasOrAssignment(node.right)));
|
||||
}
|
||||
|
||||
function bindModuleExportsAssignment(node: BinaryExpression) {
|
||||
// A common practice in node modules is to set 'export = module.exports = {}', this ensures that 'exports'
|
||||
// is still pointing to 'module.exports'.
|
||||
// We do not want to consider this as 'export=' since a module can have only one of these.
|
||||
// Similarly we do not want to treat 'module.exports = exports' as an 'export='.
|
||||
const assignedExpression = getRightMostAssignedExpression(node.right);
|
||||
if (isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) {
|
||||
if (isEmptyObjectLiteral(assignedExpression) || container === file && isExportsOrModuleExportsOrAlias(file, assignedExpression)) {
|
||||
// Mark it as a module in case there are no other exports in the file
|
||||
setCommonJsModuleIndicator(node);
|
||||
return;
|
||||
@ -2387,7 +2376,7 @@ namespace ts {
|
||||
if (node.kind === SyntaxKind.BinaryExpression) {
|
||||
leftSideOfAssignment.parent = node;
|
||||
}
|
||||
if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) {
|
||||
if (container === file && isNameOfExportsOrModuleExportsAliasDeclaration(file, target)) {
|
||||
// This can be an alias for the 'exports' or 'module.exports' names, e.g.
|
||||
// var util = module.exports;
|
||||
// util.property = function ...
|
||||
@ -2400,11 +2389,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function lookupSymbolForName(name: __String) {
|
||||
const local = container.locals && container.locals.get(name);
|
||||
if (local) {
|
||||
return local.exportSymbol || local;
|
||||
}
|
||||
return container.symbol && container.symbol.exports && container.symbol.exports.get(name);
|
||||
return lookupSymbolForNameWorker(container, name);
|
||||
}
|
||||
|
||||
function bindPropertyAssignment(functionName: __String, propertyAccess: PropertyAccessExpression, isPrototypeProperty: boolean) {
|
||||
@ -2425,7 +2410,7 @@ namespace ts {
|
||||
if (!isPrototypeProperty && (!targetSymbol || !(targetSymbol.flags & SymbolFlags.Namespace)) && isLegalPosition) {
|
||||
Debug.assert(isIdentifier(propertyAccess.expression));
|
||||
const identifier = propertyAccess.expression as Identifier;
|
||||
const flags = SymbolFlags.Module | SymbolFlags.JSContainer;
|
||||
const flags = SymbolFlags.Module | SymbolFlags.JSContainer;
|
||||
const excludeFlags = SymbolFlags.ValueModuleExcludes & ~SymbolFlags.JSContainer;
|
||||
if (targetSymbol) {
|
||||
addDeclarationToSymbol(symbol, identifier, flags);
|
||||
@ -2532,7 +2517,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (isBindingPattern(node.name)) {
|
||||
bindAnonymousDeclaration(node, SymbolFlags.FunctionScopedVariable, "__" + indexOf(node.parent.parameters, node) as __String);
|
||||
bindAnonymousDeclaration(node, SymbolFlags.FunctionScopedVariable, "__" + node.parent.parameters.indexOf(node) as __String);
|
||||
}
|
||||
else {
|
||||
declareSymbolAndAddToSymbolTable(node, SymbolFlags.FunctionScopedVariable, SymbolFlags.ParameterExcludes);
|
||||
@ -2643,6 +2628,33 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isExportsOrModuleExportsOrAlias(sourceFile: SourceFile, node: Expression): boolean {
|
||||
return isExportsIdentifier(node) ||
|
||||
isModuleExportsPropertyAccessExpression(node) ||
|
||||
isIdentifier(node) && isNameOfExportsOrModuleExportsAliasDeclaration(sourceFile, node);
|
||||
}
|
||||
|
||||
function isNameOfExportsOrModuleExportsAliasDeclaration(sourceFile: SourceFile, node: Identifier): boolean {
|
||||
const symbol = lookupSymbolForNameWorker(sourceFile, node.escapedText);
|
||||
return symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) &&
|
||||
symbol.valueDeclaration.initializer && isExportsOrModuleExportsOrAliasOrAssignment(sourceFile, symbol.valueDeclaration.initializer);
|
||||
}
|
||||
|
||||
function isExportsOrModuleExportsOrAliasOrAssignment(sourceFile: SourceFile, node: Expression): boolean {
|
||||
return isExportsOrModuleExportsOrAlias(sourceFile, node) ||
|
||||
(isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (
|
||||
isExportsOrModuleExportsOrAliasOrAssignment(sourceFile, node.left) || isExportsOrModuleExportsOrAliasOrAssignment(sourceFile, node.right)));
|
||||
}
|
||||
|
||||
function lookupSymbolForNameWorker(container: Node, name: __String): Symbol | undefined {
|
||||
const local = container.locals && container.locals.get(name);
|
||||
if (local) {
|
||||
return local.exportSymbol || local;
|
||||
}
|
||||
return container.symbol && container.symbol.exports && container.symbol.exports.get(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the transform flags for a node, given the transform flags of its subtree
|
||||
*
|
||||
|
||||
@ -468,9 +468,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getReferencedByPaths(referencedFilePath: Path) {
|
||||
return mapDefinedIter(references.entries(), ([filePath, referencesInFile]) =>
|
||||
return arrayFrom(mapDefinedIterator(references.entries(), ([filePath, referencesInFile]) =>
|
||||
referencesInFile.has(referencedFilePath) ? filePath as Path : undefined
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
function getFilesAffectedByUpdatedShape(program: Program, sourceFile: SourceFile): ReadonlyArray<SourceFile> {
|
||||
@ -504,7 +504,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// Return array of values that needs emit
|
||||
return flatMapIter(seenFileNamesMap.values(), value => value);
|
||||
return arrayFrom(mapDefinedIterator(seenFileNamesMap.values(), value => value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -144,7 +144,9 @@ namespace ts {
|
||||
"es2017.string": "lib.es2017.string.d.ts",
|
||||
"es2017.intl": "lib.es2017.intl.d.ts",
|
||||
"es2017.typedarrays": "lib.es2017.typedarrays.d.ts",
|
||||
"esnext.array": "lib.esnext.array.d.ts",
|
||||
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
|
||||
"esnext.promise": "lib.esnext.promise.d.ts",
|
||||
}),
|
||||
},
|
||||
showInSimplifiedHelpView: true,
|
||||
@ -400,6 +402,13 @@ namespace ts {
|
||||
category: Diagnostics.Module_Resolution_Options,
|
||||
description: Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
|
||||
},
|
||||
{
|
||||
name: "esModuleInterop",
|
||||
type: "boolean",
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Module_Resolution_Options,
|
||||
description: Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports
|
||||
},
|
||||
{
|
||||
name: "preserveSymlinks",
|
||||
type: "boolean",
|
||||
@ -702,7 +711,8 @@ namespace ts {
|
||||
export const defaultInitCompilerOptions: CompilerOptions = {
|
||||
module: ModuleKind.CommonJS,
|
||||
target: ScriptTarget.ES5,
|
||||
strict: true
|
||||
strict: true,
|
||||
esModuleInterop: true
|
||||
};
|
||||
|
||||
let optionNameMapCache: OptionNameMap;
|
||||
@ -1863,7 +1873,7 @@ namespace ts {
|
||||
return normalizeNonListOptionValue(option, basePath, value);
|
||||
}
|
||||
|
||||
function normalizeNonListOptionValue(option: CommandLineOption, basePath: string, value: any): CompilerOptionsValue {
|
||||
function normalizeNonListOptionValue(option: CommandLineOption, basePath: string, value: any): CompilerOptionsValue {
|
||||
if (option.isFilePath) {
|
||||
value = normalizePath(combinePaths(basePath, value));
|
||||
if (value === "") {
|
||||
@ -1906,21 +1916,6 @@ namespace ts {
|
||||
*/
|
||||
const invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/;
|
||||
|
||||
/**
|
||||
* Tests for a path with multiple recursive directory wildcards.
|
||||
* Matches **\** and **\a\**, but not **\a**b.
|
||||
*
|
||||
* NOTE: used \ in place of / above to avoid issues with multiline comments.
|
||||
*
|
||||
* Breakdown:
|
||||
* (^|\/) # matches either the beginning of the string or a directory separator.
|
||||
* \*\*\/ # matches a recursive directory wildcard "**" followed by a directory separator.
|
||||
* (.*\/)? # optionally matches any number of characters followed by a directory separator.
|
||||
* \*\* # matches a recursive directory wildcard "**"
|
||||
* ($|\/) # matches either the end of the string or a directory separator.
|
||||
*/
|
||||
const invalidMultipleRecursionPatterns = /(^|\/)\*\*\/(.*\/)?\*\*($|\/)/;
|
||||
|
||||
/**
|
||||
* Tests for a path where .. appears after a recursive directory wildcard.
|
||||
* Matches **\..\*, **\a\..\*, and **\.., but not ..\**\*
|
||||
@ -2115,9 +2110,6 @@ namespace ts {
|
||||
if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
||||
return Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0;
|
||||
}
|
||||
else if (invalidMultipleRecursionPatterns.test(spec)) {
|
||||
return Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0;
|
||||
}
|
||||
else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) {
|
||||
return Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0;
|
||||
}
|
||||
|
||||
@ -191,6 +191,19 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function firstDefinedIterator<T, U>(iter: Iterator<T>, callback: (element: T) => U | undefined): U | undefined {
|
||||
while (true) {
|
||||
const { value, done } = iter.next();
|
||||
if (done) {
|
||||
return undefined;
|
||||
}
|
||||
const result = callback(value);
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@ -215,13 +228,27 @@ namespace ts {
|
||||
|
||||
export function zipWith<T, U, V>(arrayA: ReadonlyArray<T>, arrayB: ReadonlyArray<U>, callback: (a: T, b: U, index: number) => V): V[] {
|
||||
const result: V[] = [];
|
||||
Debug.assert(arrayA.length === arrayB.length);
|
||||
Debug.assertEqual(arrayA.length, arrayB.length);
|
||||
for (let i = 0; i < arrayA.length; i++) {
|
||||
result.push(callback(arrayA[i], arrayB[i], i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function zipToIterator<T, U>(arrayA: ReadonlyArray<T>, arrayB: ReadonlyArray<U>): Iterator<[T, U]> {
|
||||
Debug.assertEqual(arrayA.length, arrayB.length);
|
||||
let i = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i === arrayA.length) {
|
||||
return { value: undefined as never, done: true };
|
||||
}
|
||||
i++;
|
||||
return { value: [arrayA[i - 1], arrayB[i - 1]], done: false };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function zipToMap<T>(keys: ReadonlyArray<string>, values: ReadonlyArray<T>): Map<T> {
|
||||
Debug.assert(keys.length === values.length);
|
||||
const map = createMap<T>();
|
||||
@ -261,6 +288,8 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function findLast<T, U extends T>(array: ReadonlyArray<T>, predicate: (element: T, index: number) => element is U): U | undefined;
|
||||
export function findLast<T>(array: ReadonlyArray<T>, predicate: (element: T, index: number) => boolean): T | undefined;
|
||||
export function findLast<T>(array: ReadonlyArray<T>, predicate: (element: T, index: number) => boolean): T | undefined {
|
||||
for (let i = array.length - 1; i >= 0; i--) {
|
||||
const value = array[i];
|
||||
@ -306,17 +335,6 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function indexOf<T>(array: ReadonlyArray<T>, value: T): number {
|
||||
if (array) {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === value) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
export function indexOfAnyCharCode(text: string, charCodes: ReadonlyArray<number>, start?: number): number {
|
||||
for (let i = start || 0; i < text.length; i++) {
|
||||
if (contains(charCodes, text.charCodeAt(i))) {
|
||||
@ -394,12 +412,14 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
export function mapIterator<T, U>(iter: Iterator<T>, mapFn: (x: T) => U): Iterator<U> {
|
||||
return { next };
|
||||
function next(): { value: U, done: false } | { value: never, done: true } {
|
||||
const iterRes = iter.next();
|
||||
return iterRes.done ? iterRes : { value: mapFn(iterRes.value), done: false };
|
||||
}
|
||||
return {
|
||||
next() {
|
||||
const iterRes = iter.next();
|
||||
return iterRes.done ? iterRes : { value: mapFn(iterRes.value), done: false };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Maps from T to T and avoids allocation if all elements map to themselves
|
||||
@ -474,22 +494,32 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function flatMapIter<T, U>(iter: Iterator<T>, mapfn: (x: T) => U | U[] | undefined): U[] {
|
||||
const result: U[] = [];
|
||||
while (true) {
|
||||
const { value, done } = iter.next();
|
||||
if (done) break;
|
||||
const res = mapfn(value);
|
||||
if (res) {
|
||||
if (isArray(res)) {
|
||||
result.push(...res);
|
||||
}
|
||||
else {
|
||||
result.push(res);
|
||||
}
|
||||
}
|
||||
export function flatMapIterator<T, U>(iter: Iterator<T>, mapfn: (x: T) => U[] | Iterator<U> | undefined): Iterator<U> {
|
||||
const first = iter.next();
|
||||
if (first.done) {
|
||||
return emptyIterator;
|
||||
}
|
||||
let currentIter = getIterator(first.value);
|
||||
return {
|
||||
next() {
|
||||
while (true) {
|
||||
const currentRes = currentIter.next();
|
||||
if (!currentRes.done) {
|
||||
return currentRes;
|
||||
}
|
||||
const iterRes = iter.next();
|
||||
if (iterRes.done) {
|
||||
return iterRes;
|
||||
}
|
||||
currentIter = getIterator(iterRes.value);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function getIterator(x: T): Iterator<U> {
|
||||
const res = mapfn(x);
|
||||
return res === undefined ? emptyIterator : isArray(res) ? arrayIterator(res) : res;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -523,12 +553,23 @@ namespace ts {
|
||||
return result || array;
|
||||
}
|
||||
|
||||
export function mapAllOrFail<T, U>(array: ReadonlyArray<T>, mapFn: (x: T, i: number) => U | undefined): U[] | undefined {
|
||||
const result: U[] = [];
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
const mapped = mapFn(array[i], i);
|
||||
if (mapped === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
result.push(mapped);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function mapDefined<T, U>(array: ReadonlyArray<T> | undefined, mapFn: (x: T, i: number) => U | undefined): U[] {
|
||||
const result: U[] = [];
|
||||
if (array) {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
const item = array[i];
|
||||
const mapped = mapFn(item, i);
|
||||
const mapped = mapFn(array[i], i);
|
||||
if (mapped !== undefined) {
|
||||
result.push(mapped);
|
||||
}
|
||||
@ -537,17 +578,34 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function mapDefinedIter<T, U>(iter: Iterator<T>, mapFn: (x: T) => U | undefined): U[] {
|
||||
const result: U[] = [];
|
||||
while (true) {
|
||||
const { value, done } = iter.next();
|
||||
if (done) break;
|
||||
const res = mapFn(value);
|
||||
if (res !== undefined) {
|
||||
result.push(res);
|
||||
export function mapDefinedIterator<T, U>(iter: Iterator<T>, mapFn: (x: T) => U | undefined): Iterator<U> {
|
||||
return {
|
||||
next() {
|
||||
while (true) {
|
||||
const res = iter.next();
|
||||
if (res.done) {
|
||||
return res;
|
||||
}
|
||||
const value = mapFn(res.value);
|
||||
if (value !== undefined) {
|
||||
return { value, done: false };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
export const emptyIterator: Iterator<never> = { next: () => ({ value: undefined as never, done: true }) };
|
||||
|
||||
export function singleIterator<T>(value: T): Iterator<T> {
|
||||
let done = false;
|
||||
return {
|
||||
next() {
|
||||
const wasDone = done;
|
||||
done = true;
|
||||
return wasDone ? { value: undefined as never, done: true } : { value, done: false };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1345,7 +1403,6 @@ namespace ts {
|
||||
this.set(key, values = [value]);
|
||||
}
|
||||
return values;
|
||||
|
||||
}
|
||||
function multiMapRemove<T>(this: MultiMap<T>, key: string, value: T) {
|
||||
const values = this.get(key);
|
||||
@ -1360,12 +1417,12 @@ namespace ts {
|
||||
/**
|
||||
* Tests whether a value is an array.
|
||||
*/
|
||||
export function isArray(value: any): value is ReadonlyArray<any> {
|
||||
export function isArray(value: any): value is ReadonlyArray<{}> {
|
||||
return Array.isArray ? Array.isArray(value) : value instanceof Array;
|
||||
}
|
||||
|
||||
export function toArray<T>(value: T | ReadonlyArray<T>): ReadonlyArray<T>;
|
||||
export function toArray<T>(value: T | T[]): T[];
|
||||
export function toArray<T>(value: T | ReadonlyArray<T>): ReadonlyArray<T>;
|
||||
export function toArray<T>(value: T | T[]): T[] {
|
||||
return isArray(value) ? value : [value];
|
||||
}
|
||||
@ -1939,11 +1996,6 @@ namespace ts {
|
||||
return /^\.\.?($|[\\/])/.test(path);
|
||||
}
|
||||
|
||||
/** @deprecated Use `!isExternalModuleNameRelative(moduleName)` instead. */
|
||||
export function moduleHasNonRelativeName(moduleName: string): boolean {
|
||||
return !isExternalModuleNameRelative(moduleName);
|
||||
}
|
||||
|
||||
export function getEmitScriptTarget(compilerOptions: CompilerOptions) {
|
||||
return compilerOptions.target || ScriptTarget.ES3;
|
||||
}
|
||||
@ -1966,7 +2018,9 @@ namespace ts {
|
||||
const moduleKind = getEmitModuleKind(compilerOptions);
|
||||
return compilerOptions.allowSyntheticDefaultImports !== undefined
|
||||
? compilerOptions.allowSyntheticDefaultImports
|
||||
: moduleKind === ModuleKind.System;
|
||||
: compilerOptions.esModuleInterop
|
||||
? moduleKind !== ModuleKind.None && moduleKind < ModuleKind.ES2015
|
||||
: moduleKind === ModuleKind.System;
|
||||
}
|
||||
|
||||
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictPropertyInitialization" | "alwaysStrict";
|
||||
@ -2030,7 +2084,7 @@ namespace ts {
|
||||
|
||||
function getNormalizedPathComponentsOfUrl(url: string) {
|
||||
// Get root length of http://www.website.com/folder1/folder2/
|
||||
// In this example the root is: http://www.website.com/
|
||||
// In this example the root is: http://www.website.com/
|
||||
// normalized path components should be ["http://www.website.com/", "folder1", "folder2"]
|
||||
|
||||
const urlLength = url.length;
|
||||
@ -2063,7 +2117,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
// Can't find the host assume the rest of the string as component
|
||||
// but make sure we append "/" to it as root is not joined using "/"
|
||||
// but make sure we append "/" to it as root is not joined using "/"
|
||||
// eg. if url passed in was http://website.com we want to use root as [http://website.com/]
|
||||
// so that other path manipulations will be correct and it can be merged with relative paths correctly
|
||||
return [url + directorySeparator];
|
||||
@ -2084,7 +2138,7 @@ namespace ts {
|
||||
const directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory);
|
||||
if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") {
|
||||
// If the directory path given was of type test/cases/ then we really need components of directory to be only till its name
|
||||
// that is ["test", "cases", ""] needs to be actually ["test", "cases"]
|
||||
// that is ["test", "cases", ""] needs to be actually ["test", "cases"]
|
||||
directoryComponents.pop();
|
||||
}
|
||||
|
||||
@ -2326,7 +2380,6 @@ namespace ts {
|
||||
|
||||
function getSubPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude", { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter }: WildcardMatcher): string | undefined {
|
||||
let subpattern = "";
|
||||
let hasRecursiveDirectoryWildcard = false;
|
||||
let hasWrittenComponent = false;
|
||||
const components = getNormalizedPathComponents(spec, basePath);
|
||||
const lastComponent = lastOrUndefined(components);
|
||||
@ -2345,12 +2398,7 @@ namespace ts {
|
||||
let optionalCount = 0;
|
||||
for (let component of components) {
|
||||
if (component === "**") {
|
||||
if (hasRecursiveDirectoryWildcard) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
subpattern += doubleAsteriskRegexFragment;
|
||||
hasRecursiveDirectoryWildcard = true;
|
||||
}
|
||||
else {
|
||||
if (usage === "directories") {
|
||||
@ -3213,4 +3261,8 @@ namespace ts {
|
||||
cachedReadDirectoryResult.clear();
|
||||
}
|
||||
}
|
||||
|
||||
export function singleElementArray<T>(t: T | undefined): T[] | undefined {
|
||||
return t === undefined ? undefined : [t];
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ namespace ts {
|
||||
let currentIdentifiers: Map<string>;
|
||||
let isCurrentFileExternalModule: boolean;
|
||||
let reportedDeclarationError = false;
|
||||
let errorNameNode: DeclarationName;
|
||||
let errorNameNode: DeclarationName | QualifiedName;
|
||||
const emitJsDocComments = compilerOptions.removeComments ? noop : writeJsDocComments;
|
||||
const emit = compilerOptions.stripInternal ? stripInternal : emitNode;
|
||||
let needsDeclare = true;
|
||||
@ -148,8 +148,8 @@ namespace ts {
|
||||
moduleElementDeclarationEmitInfo = [];
|
||||
}
|
||||
|
||||
if (!isBundledEmit && isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) {
|
||||
// if file was external module with augmentations - this fact should be preserved in .d.ts as well.
|
||||
if (!isBundledEmit && isExternalModule(sourceFile) && !resultHasExternalModuleIndicator) {
|
||||
// if file was external module this fact should be preserved in .d.ts as well.
|
||||
// in case if we didn't write any external module specifiers in .d.ts we need to emit something
|
||||
// that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here.
|
||||
write("export {};");
|
||||
@ -651,6 +651,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function emitExportAssignment(node: ExportAssignment) {
|
||||
if (isSourceFile(node.parent)) {
|
||||
resultHasExternalModuleIndicator = true; // Top-level exports are external module indicators
|
||||
}
|
||||
if (node.expression.kind === SyntaxKind.Identifier) {
|
||||
write(node.isExportEquals ? "export = " : "export default ");
|
||||
writeTextOfNode(currentText, node.expression);
|
||||
@ -745,6 +748,7 @@ namespace ts {
|
||||
const modifiers = getModifierFlags(node);
|
||||
// If the node is exported
|
||||
if (modifiers & ModifierFlags.Export) {
|
||||
resultHasExternalModuleIndicator = true; // Top-level exports are external module indicators
|
||||
write("export ");
|
||||
}
|
||||
|
||||
@ -901,6 +905,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function emitExportDeclaration(node: ExportDeclaration) {
|
||||
resultHasExternalModuleIndicator = true; // Top-level exports are external module indicators
|
||||
emitJsDocComments(node);
|
||||
write("export ");
|
||||
if (node.exportClause) {
|
||||
@ -1199,7 +1204,7 @@ namespace ts {
|
||||
write(">");
|
||||
}
|
||||
}
|
||||
else {
|
||||
else {
|
||||
emitHeritageClause([baseTypeNode], /*isImplementsList*/ false);
|
||||
}
|
||||
}
|
||||
@ -1372,7 +1377,7 @@ namespace ts {
|
||||
// if this is property of type literal,
|
||||
// or is parameter of method/call/construct/index signature of type literal
|
||||
// emit only if type is specified
|
||||
if (node.type) {
|
||||
if (hasType(node)) {
|
||||
write(": ");
|
||||
emitType(node.type);
|
||||
}
|
||||
@ -1866,6 +1871,7 @@ namespace ts {
|
||||
// it allows emitSeparatedList to write separator appropriately)
|
||||
// Example:
|
||||
// original: function foo([, x, ,]) {}
|
||||
// tslint:disable-next-line no-double-space
|
||||
// emit : function foo([ , x, , ]) {}
|
||||
write(" ");
|
||||
}
|
||||
|
||||
@ -939,6 +939,14 @@
|
||||
"category": "Error",
|
||||
"code": 1335
|
||||
},
|
||||
"An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead.": {
|
||||
"category": "Error",
|
||||
"code": 1336
|
||||
},
|
||||
"An index signature parameter type cannot be a union type. Consider using a mapped object type instead.": {
|
||||
"category": "Error",
|
||||
"code": 1337
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
@ -1396,6 +1404,10 @@
|
||||
"category": "Error",
|
||||
"code": 2415
|
||||
},
|
||||
"Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.": {
|
||||
"category": "Error",
|
||||
"code": 2416
|
||||
},
|
||||
"Class static side '{0}' incorrectly extends base class static side '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2417
|
||||
@ -1612,7 +1624,7 @@
|
||||
"category": "Error",
|
||||
"code": 2474
|
||||
},
|
||||
"'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.": {
|
||||
"'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.": {
|
||||
"category": "Error",
|
||||
"code": 2475
|
||||
},
|
||||
@ -2276,7 +2288,22 @@
|
||||
"category": "Error",
|
||||
"code": 2719
|
||||
},
|
||||
|
||||
"Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?": {
|
||||
"category": "Error",
|
||||
"code": 2720
|
||||
},
|
||||
"Cannot invoke an object which is possibly 'null'.": {
|
||||
"category": "Error",
|
||||
"code": 2721
|
||||
},
|
||||
"Cannot invoke an object which is possibly 'undefined'.": {
|
||||
"category": "Error",
|
||||
"code": 2722
|
||||
},
|
||||
"Cannot invoke an object which is possibly 'null' or 'undefined'.": {
|
||||
"category": "Error",
|
||||
"code": 2723
|
||||
},
|
||||
"Import declaration '{0}' is using private name '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 4000
|
||||
@ -2623,10 +2650,6 @@
|
||||
"category": "Error",
|
||||
"code": 5010
|
||||
},
|
||||
"File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 5011
|
||||
},
|
||||
"Cannot read file '{0}': {1}.": {
|
||||
"category": "Error",
|
||||
"code": 5012
|
||||
@ -2828,6 +2851,10 @@
|
||||
"category": "Message",
|
||||
"code": 6030
|
||||
},
|
||||
"Starting compilation in watch mode...": {
|
||||
"category": "Message",
|
||||
"code": 6031
|
||||
},
|
||||
"File change detected. Starting incremental compilation...": {
|
||||
"category": "Message",
|
||||
"code": 6032
|
||||
@ -3416,6 +3443,14 @@
|
||||
"category": "Message",
|
||||
"code": 6187
|
||||
},
|
||||
"Numeric separators are not allowed here.": {
|
||||
"category": "Error",
|
||||
"code": 6188
|
||||
},
|
||||
"Multiple consecutive numeric separators are not permitted.": {
|
||||
"category": "Error",
|
||||
"code": 6189
|
||||
},
|
||||
"Variable '{0}' implicitly has an '{1}' type.": {
|
||||
"category": "Error",
|
||||
"code": 7005
|
||||
@ -3528,7 +3563,18 @@
|
||||
"category": "Error",
|
||||
"code": 7036
|
||||
},
|
||||
|
||||
"Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.": {
|
||||
"category": "Message",
|
||||
"code": 7037
|
||||
},
|
||||
"A namespace-style import cannot be called or constructed, and will cause a failure at runtime.": {
|
||||
"category": "Error",
|
||||
"code": 7038
|
||||
},
|
||||
"Mapped object type implicitly has an 'any' template type.": {
|
||||
"category": "Error",
|
||||
"code": 7039
|
||||
},
|
||||
"You cannot rename this element.": {
|
||||
"category": "Error",
|
||||
"code": 8000
|
||||
@ -3831,6 +3877,10 @@
|
||||
"category": "Message",
|
||||
"code": 90028
|
||||
},
|
||||
"Add async modifier to containing function": {
|
||||
"category": "Message",
|
||||
"code": 90029
|
||||
},
|
||||
"Convert function to an ES2015 class": {
|
||||
"category": "Message",
|
||||
"code": 95001
|
||||
@ -3886,5 +3936,17 @@
|
||||
"Install '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 95014
|
||||
},
|
||||
"Replace import with '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 95015
|
||||
},
|
||||
"Use synthetic 'default' member.": {
|
||||
"category": "Message",
|
||||
"code": 95016
|
||||
},
|
||||
"Convert to ES6 module": {
|
||||
"category": "Message",
|
||||
"code": 95017
|
||||
}
|
||||
}
|
||||
|
||||
@ -1194,27 +1194,15 @@ namespace ts {
|
||||
//
|
||||
|
||||
function emitObjectBindingPattern(node: ObjectBindingPattern) {
|
||||
const elements = node.elements;
|
||||
if (elements.length === 0) {
|
||||
write("{}");
|
||||
}
|
||||
else {
|
||||
write("{");
|
||||
emitList(node, elements, ListFormat.ObjectBindingPatternElements);
|
||||
write("}");
|
||||
}
|
||||
write("{");
|
||||
emitList(node, node.elements, ListFormat.ObjectBindingPatternElements);
|
||||
write("}");
|
||||
}
|
||||
|
||||
function emitArrayBindingPattern(node: ArrayBindingPattern) {
|
||||
const elements = node.elements;
|
||||
if (elements.length === 0) {
|
||||
write("[]");
|
||||
}
|
||||
else {
|
||||
write("[");
|
||||
emitList(node, node.elements, ListFormat.ArrayBindingPatternElements);
|
||||
write("]");
|
||||
}
|
||||
write("[");
|
||||
emitList(node, node.elements, ListFormat.ArrayBindingPatternElements);
|
||||
write("]");
|
||||
}
|
||||
|
||||
function emitBindingElement(node: BindingElement) {
|
||||
@ -3167,8 +3155,8 @@ namespace ts {
|
||||
TupleTypeElements = CommaDelimited | SpaceBetweenSiblings | SingleLine | Indented,
|
||||
UnionTypeConstituents = BarDelimited | SpaceBetweenSiblings | SingleLine,
|
||||
IntersectionTypeConstituents = AmpersandDelimited | SpaceBetweenSiblings | SingleLine,
|
||||
ObjectBindingPatternElements = SingleLine | AllowTrailingComma | SpaceBetweenBraces | CommaDelimited | SpaceBetweenSiblings,
|
||||
ArrayBindingPatternElements = SingleLine | AllowTrailingComma | CommaDelimited | SpaceBetweenSiblings,
|
||||
ObjectBindingPatternElements = SingleLine | AllowTrailingComma | SpaceBetweenBraces | CommaDelimited | SpaceBetweenSiblings | NoSpaceIfEmpty,
|
||||
ArrayBindingPatternElements = SingleLine | AllowTrailingComma | CommaDelimited | SpaceBetweenSiblings | NoSpaceIfEmpty,
|
||||
ObjectLiteralExpressionProperties = PreserveLines | CommaDelimited | SpaceBetweenSiblings | SpaceBetweenBraces | Indented | Braces | NoSpaceIfEmpty,
|
||||
ArrayLiteralExpressionElements = PreserveLines | CommaDelimited | SpaceBetweenSiblings | AllowTrailingComma | Indented | SquareBrackets,
|
||||
CommaListElements = CommaDelimited | SpaceBetweenSiblings | SingleLine,
|
||||
|
||||
@ -71,11 +71,11 @@ namespace ts {
|
||||
// Literals
|
||||
|
||||
/** If a node is passed, creates a string literal whose source text is read from a source node during emit. */
|
||||
export function createLiteral(value: string | StringLiteral | NumericLiteral | Identifier): StringLiteral;
|
||||
export function createLiteral(value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
|
||||
export function createLiteral(value: number): NumericLiteral;
|
||||
export function createLiteral(value: boolean): BooleanLiteral;
|
||||
export function createLiteral(value: string | number | boolean): PrimaryExpression;
|
||||
export function createLiteral(value: string | number | boolean | StringLiteral | NumericLiteral | Identifier): PrimaryExpression {
|
||||
export function createLiteral(value: string | number | boolean | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): PrimaryExpression {
|
||||
if (typeof value === "number") {
|
||||
return createNumericLiteral(value + "");
|
||||
}
|
||||
@ -101,7 +101,7 @@ namespace ts {
|
||||
return node;
|
||||
}
|
||||
|
||||
function createLiteralFromNode(sourceNode: StringLiteral | NumericLiteral | Identifier): StringLiteral {
|
||||
function createLiteralFromNode(sourceNode: StringLiteralLike | NumericLiteral | Identifier): StringLiteral {
|
||||
const node = createStringLiteral(getTextOfIdentifierOrLiteral(sourceNode));
|
||||
node.textSourceNode = sourceNode;
|
||||
return node;
|
||||
@ -3626,7 +3626,7 @@ namespace ts {
|
||||
return qualifiedName;
|
||||
}
|
||||
|
||||
export function convertToFunctionBody(node: ConciseBody, multiLine?: boolean) {
|
||||
export function convertToFunctionBody(node: ConciseBody, multiLine?: boolean): Block {
|
||||
return isBlock(node) ? node : setTextRange(createBlock([setTextRange(createReturn(node), node)], multiLine), node);
|
||||
}
|
||||
|
||||
@ -3831,13 +3831,13 @@ namespace ts {
|
||||
if (isLeftSideOfBinary) {
|
||||
// No need to parenthesize the left operand when the binary operator is
|
||||
// left associative:
|
||||
// (a*b)/x -> a*b/x
|
||||
// (a**b)/x -> a**b/x
|
||||
// (a*b)/x -> a*b/x
|
||||
// (a**b)/x -> a**b/x
|
||||
//
|
||||
// Parentheses are needed for the left operand when the binary operator is
|
||||
// right associative:
|
||||
// (a/b)**x -> (a/b)**x
|
||||
// (a**b)**x -> (a**b)**x
|
||||
// (a/b)**x -> (a/b)**x
|
||||
// (a**b)**x -> (a**b)**x
|
||||
return binaryOperatorAssociativity === Associativity.Right;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -64,9 +64,9 @@ namespace ts {
|
||||
return { fileName: resolved.path, packageId: resolved.packageId };
|
||||
}
|
||||
|
||||
function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations {
|
||||
function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, originalPath: string | undefined, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations {
|
||||
return {
|
||||
resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId },
|
||||
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId },
|
||||
failedLookupLocations
|
||||
};
|
||||
}
|
||||
@ -732,12 +732,12 @@ namespace ts {
|
||||
|
||||
const result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
|
||||
if (result && result.value) {
|
||||
const { resolved, isExternalLibraryImport } = result.value;
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
|
||||
const { resolved, originalPath, isExternalLibraryImport } = result.value;
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, originalPath, isExternalLibraryImport, failedLookupLocations);
|
||||
}
|
||||
return { resolvedModule: undefined, failedLookupLocations };
|
||||
|
||||
function tryResolve(extensions: Extensions): SearchResult<{ resolved: Resolved, isExternalLibraryImport: boolean }> {
|
||||
function tryResolve(extensions: Extensions): SearchResult<{ resolved: Resolved, originalPath?: string, isExternalLibraryImport: boolean }> {
|
||||
const loader: ResolutionKindSpecificLoader = (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) => nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ true);
|
||||
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
|
||||
if (resolved) {
|
||||
@ -752,11 +752,17 @@ namespace ts {
|
||||
if (!resolved) return undefined;
|
||||
|
||||
let resolvedValue = resolved.value;
|
||||
if (!compilerOptions.preserveSymlinks) {
|
||||
resolvedValue = resolvedValue && { ...resolved.value, path: realPath(resolved.value.path, host, traceEnabled), extension: resolved.value.extension };
|
||||
let originalPath: string | undefined;
|
||||
if (!compilerOptions.preserveSymlinks && resolvedValue) {
|
||||
originalPath = resolvedValue.path;
|
||||
const path = realPath(resolved.value.path, host, traceEnabled);
|
||||
if (path === originalPath) {
|
||||
originalPath = undefined;
|
||||
}
|
||||
resolvedValue = { ...resolvedValue, path };
|
||||
}
|
||||
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
|
||||
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
||||
return { value: resolvedValue && { resolved: resolvedValue, originalPath, isExternalLibraryImport: true } };
|
||||
}
|
||||
else {
|
||||
const { path: candidate, parts } = normalizePathAndParts(combinePaths(containingDirectory, moduleName));
|
||||
@ -1115,7 +1121,8 @@ namespace ts {
|
||||
const containingDirectory = getDirectoryPath(containingFile);
|
||||
|
||||
const resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations);
|
||||
// No originalPath because classic resolution doesn't resolve realPath
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*originalPath*/ undefined, /*isExternalLibraryImport*/ false, failedLookupLocations);
|
||||
|
||||
function tryResolve(extensions: Extensions): SearchResult<Resolved> {
|
||||
const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, failedLookupLocations, state);
|
||||
@ -1162,7 +1169,7 @@ namespace ts {
|
||||
const state: ModuleResolutionState = { compilerOptions, host, traceEnabled };
|
||||
const failedLookupLocations: string[] = [];
|
||||
const resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, /*originalPath*/ undefined, /*isExternalLibraryImport*/ true, failedLookupLocations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -88,20 +88,48 @@ namespace ts {
|
||||
case SyntaxKind.SpreadAssignment:
|
||||
return visitNode(cbNode, (<SpreadAssignment>node).expression);
|
||||
case SyntaxKind.Parameter:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<ParameterDeclaration>node).dotDotDotToken) ||
|
||||
visitNode(cbNode, (<ParameterDeclaration>node).name) ||
|
||||
visitNode(cbNode, (<ParameterDeclaration>node).questionToken) ||
|
||||
visitNode(cbNode, (<ParameterDeclaration>node).type) ||
|
||||
visitNode(cbNode, (<ParameterDeclaration>node).initializer);
|
||||
case SyntaxKind.PropertyDeclaration:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<PropertyDeclaration>node).name) ||
|
||||
visitNode(cbNode, (<PropertyDeclaration>node).questionToken) ||
|
||||
visitNode(cbNode, (<PropertyDeclaration>node).exclamationToken) ||
|
||||
visitNode(cbNode, (<PropertyDeclaration>node).type) ||
|
||||
visitNode(cbNode, (<PropertyDeclaration>node).initializer);
|
||||
case SyntaxKind.PropertySignature:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<PropertySignature>node).name) ||
|
||||
visitNode(cbNode, (<PropertySignature>node).questionToken) ||
|
||||
visitNode(cbNode, (<PropertySignature>node).type) ||
|
||||
visitNode(cbNode, (<PropertySignature>node).initializer);
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<PropertyAssignment>node).name) ||
|
||||
visitNode(cbNode, (<PropertyAssignment>node).questionToken) ||
|
||||
visitNode(cbNode, (<PropertyAssignment>node).initializer);
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<VariableDeclaration>node).name) ||
|
||||
visitNode(cbNode, (<VariableDeclaration>node).exclamationToken) ||
|
||||
visitNode(cbNode, (<VariableDeclaration>node).type) ||
|
||||
visitNode(cbNode, (<VariableDeclaration>node).initializer);
|
||||
case SyntaxKind.BindingElement:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).propertyName) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).dotDotDotToken) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).name) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).questionToken) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).exclamationToken) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).type) ||
|
||||
visitNode(cbNode, (<VariableLikeDeclaration>node).initializer);
|
||||
visitNode(cbNode, (<BindingElement>node).propertyName) ||
|
||||
visitNode(cbNode, (<BindingElement>node).dotDotDotToken) ||
|
||||
visitNode(cbNode, (<BindingElement>node).name) ||
|
||||
visitNode(cbNode, (<BindingElement>node).initializer);
|
||||
case SyntaxKind.FunctionType:
|
||||
case SyntaxKind.ConstructorType:
|
||||
case SyntaxKind.CallSignature:
|
||||
@ -557,7 +585,7 @@ namespace ts {
|
||||
// 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost
|
||||
// all nodes would need extra state on them to store this info.
|
||||
//
|
||||
// Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6
|
||||
// Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6
|
||||
// grammar specification.
|
||||
//
|
||||
// An important thing about these context concepts. By default they are effectively inherited
|
||||
@ -673,7 +701,7 @@ namespace ts {
|
||||
|
||||
function getLanguageVariant(scriptKind: ScriptKind) {
|
||||
// .tsx and .jsx files are treated as jsx language variant.
|
||||
return scriptKind === ScriptKind.TSX || scriptKind === ScriptKind.JSX || scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSON ? LanguageVariant.JSX : LanguageVariant.Standard;
|
||||
return scriptKind === ScriptKind.TSX || scriptKind === ScriptKind.JSX || scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSON ? LanguageVariant.JSX : LanguageVariant.Standard;
|
||||
}
|
||||
|
||||
function initializeState(_sourceText: string, languageVersion: ScriptTarget, _syntaxCursor: IncrementalParser.SyntaxCursor, scriptKind: ScriptKind) {
|
||||
@ -758,15 +786,7 @@ namespace ts {
|
||||
const comments = getJSDocCommentRanges(node, sourceFile.text);
|
||||
if (comments) {
|
||||
for (const comment of comments) {
|
||||
const jsDoc = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos);
|
||||
if (jsDoc) {
|
||||
if (!node.jsDoc) {
|
||||
node.jsDoc = [jsDoc];
|
||||
}
|
||||
else {
|
||||
node.jsDoc.push(jsDoc);
|
||||
}
|
||||
}
|
||||
node.jsDoc = append(node.jsDoc, JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1401,9 +1421,13 @@ namespace ts {
|
||||
return token() === SyntaxKind.CommaToken || token() === SyntaxKind.DotDotDotToken || isIdentifierOrPattern();
|
||||
case ParsingContext.TypeParameters:
|
||||
return isIdentifier();
|
||||
case ParsingContext.ArgumentExpressions:
|
||||
case ParsingContext.ArrayLiteralMembers:
|
||||
return token() === SyntaxKind.CommaToken || token() === SyntaxKind.DotDotDotToken || isStartOfExpression();
|
||||
if (token() === SyntaxKind.CommaToken) {
|
||||
return true;
|
||||
}
|
||||
// falls through
|
||||
case ParsingContext.ArgumentExpressions:
|
||||
return token() === SyntaxKind.DotDotDotToken || isStartOfExpression();
|
||||
case ParsingContext.Parameters:
|
||||
return isStartOfParameter();
|
||||
case ParsingContext.TypeArguments:
|
||||
@ -1425,7 +1449,7 @@ namespace ts {
|
||||
function isValidHeritageClauseObjectLiteral() {
|
||||
Debug.assert(token() === SyntaxKind.OpenBraceToken);
|
||||
if (nextToken() === SyntaxKind.CloseBraceToken) {
|
||||
// if we see "extends {}" then only treat the {} as what we're extending (and not
|
||||
// if we see "extends {}" then only treat the {} as what we're extending (and not
|
||||
// the class body) if we have:
|
||||
//
|
||||
// extends {} {
|
||||
@ -1521,7 +1545,7 @@ namespace ts {
|
||||
|
||||
function isVariableDeclaratorListTerminator(): boolean {
|
||||
// If we can consume a semicolon (either explicitly, or with ASI), then consider us done
|
||||
// with parsing the list of variable declarators.
|
||||
// with parsing the list of variable declarators.
|
||||
if (canParseSemicolon()) {
|
||||
return true;
|
||||
}
|
||||
@ -1647,6 +1671,11 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if ((node as JSDocContainer).jsDocCache) {
|
||||
// jsDocCache may include tags from parent nodes, which might have been modified.
|
||||
(node as JSDocContainer).jsDocCache = undefined;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
@ -2241,7 +2270,7 @@ namespace ts {
|
||||
//
|
||||
// <T extends "">
|
||||
//
|
||||
// We do *not* want to consume the > as we're consuming the expression for "".
|
||||
// We do *not* want to consume the `>` as we're consuming the expression for "".
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
}
|
||||
}
|
||||
@ -3061,7 +3090,7 @@ namespace ts {
|
||||
// And production (2) is parsed in "tryParseParenthesizedArrowFunctionExpression".
|
||||
//
|
||||
// If we do successfully parse arrow-function, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is
|
||||
// not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done
|
||||
// not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done
|
||||
// with AssignmentExpression if we see one.
|
||||
const arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression();
|
||||
if (arrowExpression) {
|
||||
@ -3091,7 +3120,7 @@ namespace ts {
|
||||
// we're in '2' or '3'. Consume the assignment and return.
|
||||
//
|
||||
// Note: we call reScanGreaterToken so that we get an appropriately merged token
|
||||
// for cases like > > = becoming >>=
|
||||
// for cases like `> > =` becoming `>>=`
|
||||
if (isLeftHandSideExpression(expr) && isAssignmentOperator(reScanGreaterToken())) {
|
||||
return makeBinaryExpression(expr, <BinaryOperatorToken>parseTokenNode(), parseAssignmentExpressionOrHigher());
|
||||
}
|
||||
@ -3247,7 +3276,7 @@ namespace ts {
|
||||
|
||||
if (first === SyntaxKind.OpenParenToken) {
|
||||
if (second === SyntaxKind.CloseParenToken) {
|
||||
// Simple cases: "() =>", "(): ", and "() {".
|
||||
// Simple cases: "() =>", "(): ", and "() {".
|
||||
// This is an arrow function with no parameters.
|
||||
// The last one is not actually an arrow function,
|
||||
// but this is probably what the user intended.
|
||||
@ -3472,7 +3501,9 @@ namespace ts {
|
||||
node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
|
||||
node.colonToken = parseExpectedToken(SyntaxKind.ColonToken, /*reportAtCurrentPosition*/ false,
|
||||
Diagnostics._0_expected, tokenToString(SyntaxKind.ColonToken));
|
||||
node.whenFalse = parseAssignmentExpressionOrHigher();
|
||||
node.whenFalse = nodeIsPresent(node.colonToken)
|
||||
? parseAssignmentExpressionOrHigher()
|
||||
: createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ false, Diagnostics._0_expected, tokenToString(SyntaxKind.ColonToken));
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
@ -3867,7 +3898,8 @@ namespace ts {
|
||||
// We don't want to eagerly consume all import keyword as import call expression so we look a head to find "("
|
||||
// For example:
|
||||
// var foo3 = require("subfolder
|
||||
// import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression
|
||||
// import * as foo1 from "module-from-node
|
||||
// We want this import to be a statement rather than import call expression
|
||||
sourceFile.flags |= NodeFlags.PossiblyContainsDynamicImport;
|
||||
expression = parseTokenNode<PrimaryExpression>();
|
||||
}
|
||||
@ -3917,7 +3949,7 @@ namespace ts {
|
||||
// treated as the invocation of "new Foo". We disambiguate that in code (to match
|
||||
// the original grammar) by making sure that if we see an ObjectCreationExpression
|
||||
// we always consume arguments if they are there. So we treat "new Foo()" as an
|
||||
// object creation only, and not at all as an invocation) Another way to think
|
||||
// object creation only, and not at all as an invocation. Another way to think
|
||||
// about this is that for every "new" that we see, we will consume an argument list if
|
||||
// it is there as part of the *associated* object creation node. Any additional
|
||||
// argument lists we see, will become invocation expressions.
|
||||
@ -4333,7 +4365,7 @@ namespace ts {
|
||||
|
||||
const typeArguments = parseDelimitedList(ParsingContext.TypeArguments, parseType);
|
||||
if (!parseExpected(SyntaxKind.GreaterThanToken)) {
|
||||
// If it doesn't have the closing > then it's definitely not an type argument list.
|
||||
// If it doesn't have the closing `>` then it's definitely not an type argument list.
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@ -5366,8 +5398,8 @@ namespace ts {
|
||||
// off. The grammar would look something like this:
|
||||
//
|
||||
// MemberVariableDeclaration[Yield]:
|
||||
// AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In];
|
||||
// AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield];
|
||||
// AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In];
|
||||
// AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield];
|
||||
//
|
||||
// The checker may still error in the static case to explicitly disallow the yield expression.
|
||||
node.initializer = hasModifier(node, ModifierFlags.Static)
|
||||
@ -5462,6 +5494,7 @@ namespace ts {
|
||||
switch (token()) {
|
||||
case SyntaxKind.OpenParenToken: // Method declaration
|
||||
case SyntaxKind.LessThanToken: // Generic Method declaration
|
||||
case SyntaxKind.ExclamationToken: // Non-null assertion on property name
|
||||
case SyntaxKind.ColonToken: // Type Annotation for declaration
|
||||
case SyntaxKind.EqualsToken: // Initializer for declaration
|
||||
case SyntaxKind.QuestionToken: // Not valid, but permitted so that it gets caught later on.
|
||||
@ -6240,17 +6273,17 @@ namespace ts {
|
||||
indent += text.length;
|
||||
}
|
||||
|
||||
nextJSDocToken();
|
||||
while (token() === SyntaxKind.WhitespaceTrivia) {
|
||||
nextJSDocToken();
|
||||
let t = nextJSDocToken();
|
||||
while (t === SyntaxKind.WhitespaceTrivia) {
|
||||
t = nextJSDocToken();
|
||||
}
|
||||
if (token() === SyntaxKind.NewLineTrivia) {
|
||||
if (t === SyntaxKind.NewLineTrivia) {
|
||||
state = JSDocState.BeginningOfLine;
|
||||
indent = 0;
|
||||
nextJSDocToken();
|
||||
t = nextJSDocToken();
|
||||
}
|
||||
while (token() !== SyntaxKind.EndOfFileToken) {
|
||||
switch (token()) {
|
||||
loop: while (true) {
|
||||
switch (t) {
|
||||
case SyntaxKind.AtToken:
|
||||
if (state === JSDocState.BeginningOfLine || state === JSDocState.SawAsterisk) {
|
||||
removeTrailingNewlines(comments);
|
||||
@ -6304,7 +6337,7 @@ namespace ts {
|
||||
indent += whitespace.length;
|
||||
break;
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
break;
|
||||
break loop;
|
||||
default:
|
||||
// anything other than whitespace or asterisk at the beginning of the line starts the comment text
|
||||
state = JSDocState.SavingComments;
|
||||
@ -6312,10 +6345,11 @@ namespace ts {
|
||||
break;
|
||||
}
|
||||
if (advanceToken) {
|
||||
nextJSDocToken();
|
||||
t = nextJSDocToken();
|
||||
}
|
||||
else {
|
||||
advanceToken = true;
|
||||
t = currentToken as JsDocSyntaxKind;
|
||||
}
|
||||
}
|
||||
removeLeadingNewlines(comments);
|
||||
@ -6426,8 +6460,9 @@ namespace ts {
|
||||
comments.push(text);
|
||||
indent += text.length;
|
||||
}
|
||||
while (token() !== SyntaxKind.AtToken && token() !== SyntaxKind.EndOfFileToken) {
|
||||
switch (token()) {
|
||||
let tok = token() as JsDocSyntaxKind;
|
||||
loop: while (true) {
|
||||
switch (tok) {
|
||||
case SyntaxKind.NewLineTrivia:
|
||||
if (state >= JSDocState.SawAsterisk) {
|
||||
state = JSDocState.BeginningOfLine;
|
||||
@ -6436,8 +6471,9 @@ namespace ts {
|
||||
indent = 0;
|
||||
break;
|
||||
case SyntaxKind.AtToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
// Done
|
||||
break;
|
||||
break loop;
|
||||
case SyntaxKind.WhitespaceTrivia:
|
||||
if (state === JSDocState.SavingComments) {
|
||||
pushComment(scanner.getTokenText());
|
||||
@ -6465,11 +6501,7 @@ namespace ts {
|
||||
pushComment(scanner.getTokenText());
|
||||
break;
|
||||
}
|
||||
if (token() === SyntaxKind.AtToken) {
|
||||
// Done
|
||||
break;
|
||||
}
|
||||
nextJSDocToken();
|
||||
tok = nextJSDocToken();
|
||||
}
|
||||
|
||||
removeLeadingNewlines(comments);
|
||||
@ -6571,10 +6603,7 @@ namespace ts {
|
||||
const start = scanner.getStartPos();
|
||||
let children: JSDocParameterTag[];
|
||||
while (child = tryParse(() => parseChildParameterOrPropertyTag(PropertyLikeParse.Parameter, name))) {
|
||||
if (!children) {
|
||||
children = [];
|
||||
}
|
||||
children.push(child);
|
||||
children = append(children, child);
|
||||
}
|
||||
if (children) {
|
||||
jsdocTypeLiteral = <JSDocTypeLiteral>createNode(SyntaxKind.JSDocTypeLiteral, start);
|
||||
@ -6691,10 +6720,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!jsdocTypeLiteral.jsDocPropertyTags) {
|
||||
jsdocTypeLiteral.jsDocPropertyTags = [] as MutableNodeArray<JSDocPropertyTag>;
|
||||
}
|
||||
(jsdocTypeLiteral.jsDocPropertyTags as MutableNodeArray<JSDocPropertyTag>).push(child);
|
||||
jsdocTypeLiteral.jsDocPropertyTags = append(jsdocTypeLiteral.jsDocPropertyTags as MutableNodeArray<JSDocPropertyTag>, child);
|
||||
}
|
||||
}
|
||||
if (jsdocTypeLiteral) {
|
||||
@ -6747,8 +6773,7 @@ namespace ts {
|
||||
let canParseTag = true;
|
||||
let seenAsterisk = false;
|
||||
while (true) {
|
||||
nextJSDocToken();
|
||||
switch (token()) {
|
||||
switch (nextJSDocToken()) {
|
||||
case SyntaxKind.AtToken:
|
||||
if (canParseTag) {
|
||||
const child = tryParseChildTag(target);
|
||||
@ -6844,7 +6869,7 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
function nextJSDocToken(): SyntaxKind {
|
||||
function nextJSDocToken(): JsDocSyntaxKind {
|
||||
return currentToken = scanner.scanJSDocToken();
|
||||
}
|
||||
|
||||
@ -7048,7 +7073,7 @@ namespace ts {
|
||||
|
||||
// If the 'pos' is before the start of the change, then we don't need to touch it.
|
||||
// If it isn't, then the 'pos' must be inside the change. How we update it will
|
||||
// depend if delta is positive or negative. If delta is positive then we have
|
||||
// depend if delta is positive or negative. If delta is positive then we have
|
||||
// something like:
|
||||
//
|
||||
// -------------------AAA-----------------
|
||||
@ -7073,7 +7098,7 @@ namespace ts {
|
||||
|
||||
// If the 'end' is after the change range, then we always adjust it by the delta
|
||||
// amount. However, if the end is in the change range, then how we adjust it
|
||||
// will depend on if delta is positive or negative. If delta is positive then we
|
||||
// will depend on if delta is positive or negative. If delta is positive then we
|
||||
// have something like:
|
||||
//
|
||||
// -------------------AAA-----------------
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
namespace ts {
|
||||
const ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;
|
||||
|
||||
export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName = "tsconfig.json"): string {
|
||||
export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName = "tsconfig.json"): string | undefined {
|
||||
return forEachAncestorDirectory(searchPath, ancestor => {
|
||||
const fileName = combinePaths(ancestor, configName);
|
||||
return fileExists(fileName) ? fileName : undefined;
|
||||
@ -241,22 +241,28 @@ namespace ts {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
const redForegroundEscapeSequence = "\u001b[91m";
|
||||
const yellowForegroundEscapeSequence = "\u001b[93m";
|
||||
const blueForegroundEscapeSequence = "\u001b[93m";
|
||||
/** @internal */
|
||||
export enum ForegroundColorEscapeSequences {
|
||||
Grey = "\u001b[90m",
|
||||
Red = "\u001b[91m",
|
||||
Yellow = "\u001b[93m",
|
||||
Blue = "\u001b[94m",
|
||||
Cyan = "\u001b[96m"
|
||||
}
|
||||
const gutterStyleSequence = "\u001b[30;47m";
|
||||
const gutterSeparator = " ";
|
||||
const resetEscapeSequence = "\u001b[0m";
|
||||
const ellipsis = "...";
|
||||
function getCategoryFormat(category: DiagnosticCategory): string {
|
||||
switch (category) {
|
||||
case DiagnosticCategory.Warning: return yellowForegroundEscapeSequence;
|
||||
case DiagnosticCategory.Error: return redForegroundEscapeSequence;
|
||||
case DiagnosticCategory.Message: return blueForegroundEscapeSequence;
|
||||
case DiagnosticCategory.Warning: return ForegroundColorEscapeSequences.Yellow;
|
||||
case DiagnosticCategory.Error: return ForegroundColorEscapeSequences.Red;
|
||||
case DiagnosticCategory.Message: return ForegroundColorEscapeSequences.Blue;
|
||||
}
|
||||
}
|
||||
|
||||
function formatAndReset(text: string, formatStyle: string) {
|
||||
/** @internal */
|
||||
export function formatColorAndReset(text: string, formatStyle: string) {
|
||||
return formatStyle + text + resetEscapeSequence;
|
||||
}
|
||||
|
||||
@ -289,7 +295,7 @@ namespace ts {
|
||||
// If the error spans over 5 lines, we'll only show the first 2 and last 2 lines,
|
||||
// so we'll skip ahead to the second-to-last line.
|
||||
if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
|
||||
context += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
|
||||
context += formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
|
||||
i = lastLine - 1;
|
||||
}
|
||||
|
||||
@ -300,12 +306,12 @@ namespace ts {
|
||||
lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces
|
||||
|
||||
// Output the gutter and the actual contents of the line.
|
||||
context += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
||||
context += formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
||||
context += lineContent + host.getNewLine();
|
||||
|
||||
// Output the gutter and the error span for the line using tildes.
|
||||
context += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
||||
context += redForegroundEscapeSequence;
|
||||
context += formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
|
||||
context += ForegroundColorEscapeSequences.Red;
|
||||
if (i === firstLine) {
|
||||
// If we're on the last line, then limit it to the last character of the last line.
|
||||
// Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position.
|
||||
@ -324,13 +330,19 @@ namespace ts {
|
||||
context += resetEscapeSequence;
|
||||
}
|
||||
|
||||
output += host.getNewLine();
|
||||
output += `${ relativeFileName }(${ firstLine + 1 },${ firstLineChar + 1 }): `;
|
||||
output += formatColorAndReset(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
||||
output += ":";
|
||||
output += formatColorAndReset(`${ firstLine + 1 }`, ForegroundColorEscapeSequences.Yellow);
|
||||
output += ":";
|
||||
output += formatColorAndReset(`${ firstLineChar + 1 }`, ForegroundColorEscapeSequences.Yellow);
|
||||
output += " - ";
|
||||
}
|
||||
|
||||
const categoryColor = getCategoryFormat(diagnostic.category);
|
||||
const category = DiagnosticCategory[diagnostic.category].toLowerCase();
|
||||
output += `${ formatAndReset(category, categoryColor) } TS${ diagnostic.code }: ${ flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) }`;
|
||||
output += formatColorAndReset(category, categoryColor);
|
||||
output += formatColorAndReset(` TS${ diagnostic.code }: `, ForegroundColorEscapeSequences.Grey);
|
||||
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
||||
|
||||
if (diagnostic.file) {
|
||||
output += host.getNewLine();
|
||||
@ -339,7 +351,7 @@ namespace ts {
|
||||
|
||||
output += host.getNewLine();
|
||||
}
|
||||
return output;
|
||||
return output + host.getNewLine();
|
||||
}
|
||||
|
||||
export function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string {
|
||||
@ -704,7 +716,7 @@ namespace ts {
|
||||
|
||||
interface OldProgramState {
|
||||
program: Program | undefined;
|
||||
file: SourceFile;
|
||||
oldSourceFile: SourceFile | undefined;
|
||||
/** The collection of paths modified *since* the old program. */
|
||||
modifiedFilePaths: Path[];
|
||||
}
|
||||
@ -754,7 +766,6 @@ namespace ts {
|
||||
/** A transient placeholder used to mark predicted resolution in the result list. */
|
||||
const predictedToResolveToAmbientModuleMarker: ResolvedModuleFull = <any>{};
|
||||
|
||||
|
||||
for (let i = 0; i < moduleNames.length; i++) {
|
||||
const moduleName = moduleNames[i];
|
||||
// If the source file is unchanged and doesnt have invalidated resolution, reuse the module resolutions
|
||||
@ -825,9 +836,13 @@ namespace ts {
|
||||
// If we change our policy of rechecking failed lookups on each program create,
|
||||
// we should adjust the value returned here.
|
||||
function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName: string, oldProgramState: OldProgramState): boolean {
|
||||
const resolutionToFile = getResolvedModule(oldProgramState.file, moduleName);
|
||||
if (resolutionToFile) {
|
||||
// module used to be resolved to file - ignore it
|
||||
const resolutionToFile = getResolvedModule(oldProgramState.oldSourceFile, moduleName);
|
||||
const resolvedFile = resolutionToFile && oldProgramState.program && oldProgramState.program.getSourceFile(resolutionToFile.resolvedFileName);
|
||||
if (resolutionToFile && resolvedFile && !resolvedFile.externalModuleIndicator) {
|
||||
// In the old program, we resolved to an ambient module that was in the same
|
||||
// place as we expected to find an actual module file.
|
||||
// We actually need to return 'false' here even though this seems like a 'true' case
|
||||
// because the normal module resolution algorithm will find this anyway.
|
||||
return false;
|
||||
}
|
||||
const ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
|
||||
@ -1001,7 +1016,7 @@ namespace ts {
|
||||
const newSourceFilePath = getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
|
||||
if (resolveModuleNamesWorker) {
|
||||
const moduleNames = getModuleNames(newSourceFile);
|
||||
const oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths };
|
||||
const oldProgramState: OldProgramState = { program: oldProgram, oldSourceFile, modifiedFilePaths };
|
||||
const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
|
||||
// ensure that module resolution results are still correct
|
||||
const resolutionsChanged = hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo);
|
||||
@ -1586,6 +1601,7 @@ namespace ts {
|
||||
// synthesize 'import "tslib"' declaration
|
||||
const externalHelpersModuleReference = createLiteral(externalHelpersModuleNameText);
|
||||
const importDecl = createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, /*importClause*/ undefined);
|
||||
addEmitFlags(importDecl, EmitFlags.NeverApplyImportHelper);
|
||||
externalHelpersModuleReference.parent = importDecl;
|
||||
importDecl.parent = file;
|
||||
imports = [externalHelpersModuleReference];
|
||||
@ -1945,7 +1961,7 @@ namespace ts {
|
||||
if (file.imports.length || file.moduleAugmentations.length) {
|
||||
// Because global augmentation doesn't have string literal name, we can check for global augmentation as such.
|
||||
const moduleNames = getModuleNames(file);
|
||||
const oldProgramState = { program: oldProgram, file, modifiedFilePaths };
|
||||
const oldProgramState: OldProgramState = { program: oldProgram, oldSourceFile: oldProgram && oldProgram.getSourceFile(file.fileName), modifiedFilePaths };
|
||||
const resolutions = resolveModuleNamesReusingOldState(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
|
||||
Debug.assert(resolutions.length === moduleNames.length);
|
||||
for (let i = 0; i < moduleNames.length; i++) {
|
||||
|
||||
@ -35,7 +35,7 @@ namespace ts {
|
||||
scanJsxAttributeValue(): SyntaxKind;
|
||||
reScanJsxToken(): SyntaxKind;
|
||||
scanJsxToken(): SyntaxKind;
|
||||
scanJSDocToken(): SyntaxKind;
|
||||
scanJSDocToken(): JsDocSyntaxKind;
|
||||
scan(): SyntaxKind;
|
||||
getText(): string;
|
||||
// Sets the text for the scanner to scan. An optional subrange starting point and length
|
||||
@ -193,7 +193,7 @@ namespace ts {
|
||||
/*
|
||||
As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers
|
||||
IdentifierStart ::
|
||||
Can contain Unicode 3.0.0 categories:
|
||||
Can contain Unicode 3.0.0 categories:
|
||||
Uppercase letter (Lu),
|
||||
Lowercase letter (Ll),
|
||||
Titlecase letter (Lt),
|
||||
@ -201,7 +201,7 @@ namespace ts {
|
||||
Other letter (Lo), or
|
||||
Letter number (Nl).
|
||||
IdentifierPart :: =
|
||||
Can contain IdentifierStart + Unicode 3.0.0 categories:
|
||||
Can contain IdentifierStart + Unicode 3.0.0 categories:
|
||||
Non-spacing mark (Mn),
|
||||
Combining spacing mark (Mc),
|
||||
Decimal number (Nd), or
|
||||
@ -216,7 +216,7 @@ namespace ts {
|
||||
/*
|
||||
As per ECMAScript Language Specification 5th Edition, Section 7.6: ISyntaxToken Names and Identifiers
|
||||
IdentifierStart ::
|
||||
Can contain Unicode 6.2 categories:
|
||||
Can contain Unicode 6.2 categories:
|
||||
Uppercase letter (Lu),
|
||||
Lowercase letter (Ll),
|
||||
Titlecase letter (Lt),
|
||||
@ -224,7 +224,7 @@ namespace ts {
|
||||
Other letter (Lo), or
|
||||
Letter number (Nl).
|
||||
IdentifierPart ::
|
||||
Can contain IdentifierStart + Unicode 6.2 categories:
|
||||
Can contain IdentifierStart + Unicode 6.2 categories:
|
||||
Non-spacing mark (Mn),
|
||||
Combining spacing mark (Mc),
|
||||
Decimal number (Nd),
|
||||
@ -561,9 +561,9 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
function scanConflictMarkerTrivia(text: string, pos: number, error?: ErrorCallback) {
|
||||
function scanConflictMarkerTrivia(text: string, pos: number, error?: (diag: DiagnosticMessage, pos?: number, len?: number) => void) {
|
||||
if (error) {
|
||||
error(Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength);
|
||||
error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength);
|
||||
}
|
||||
|
||||
const ch = text.charCodeAt(pos);
|
||||
@ -852,34 +852,92 @@ namespace ts {
|
||||
scanRange,
|
||||
};
|
||||
|
||||
function error(message: DiagnosticMessage, length?: number): void {
|
||||
function error(message: DiagnosticMessage): void;
|
||||
function error(message: DiagnosticMessage, errPos: number, length: number): void;
|
||||
function error(message: DiagnosticMessage, errPos: number = pos, length?: number): void {
|
||||
if (onError) {
|
||||
const oldPos = pos;
|
||||
pos = errPos;
|
||||
onError(message, length || 0);
|
||||
pos = oldPos;
|
||||
}
|
||||
}
|
||||
|
||||
function scanNumberFragment(): string {
|
||||
let start = pos;
|
||||
let allowSeparator = false;
|
||||
let isPreviousTokenSeparator = false;
|
||||
let result = "";
|
||||
while (true) {
|
||||
const ch = text.charCodeAt(pos);
|
||||
if (ch === CharacterCodes._) {
|
||||
tokenFlags |= TokenFlags.ContainsSeparator;
|
||||
if (allowSeparator) {
|
||||
allowSeparator = false;
|
||||
isPreviousTokenSeparator = true;
|
||||
result += text.substring(start, pos);
|
||||
}
|
||||
else if (isPreviousTokenSeparator) {
|
||||
error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);
|
||||
}
|
||||
else {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);
|
||||
}
|
||||
pos++;
|
||||
start = pos;
|
||||
continue;
|
||||
}
|
||||
if (isDigit(ch)) {
|
||||
allowSeparator = true;
|
||||
isPreviousTokenSeparator = false;
|
||||
pos++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (text.charCodeAt(pos - 1) === CharacterCodes._) {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
||||
}
|
||||
return result + text.substring(start, pos);
|
||||
}
|
||||
|
||||
function scanNumber(): string {
|
||||
const start = pos;
|
||||
while (isDigit(text.charCodeAt(pos))) pos++;
|
||||
const mainFragment = scanNumberFragment();
|
||||
let decimalFragment: string;
|
||||
let scientificFragment: string;
|
||||
if (text.charCodeAt(pos) === CharacterCodes.dot) {
|
||||
pos++;
|
||||
while (isDigit(text.charCodeAt(pos))) pos++;
|
||||
decimalFragment = scanNumberFragment();
|
||||
}
|
||||
let end = pos;
|
||||
if (text.charCodeAt(pos) === CharacterCodes.E || text.charCodeAt(pos) === CharacterCodes.e) {
|
||||
pos++;
|
||||
tokenFlags |= TokenFlags.Scientific;
|
||||
if (text.charCodeAt(pos) === CharacterCodes.plus || text.charCodeAt(pos) === CharacterCodes.minus) pos++;
|
||||
if (isDigit(text.charCodeAt(pos))) {
|
||||
pos++;
|
||||
while (isDigit(text.charCodeAt(pos))) pos++;
|
||||
end = pos;
|
||||
}
|
||||
else {
|
||||
const preNumericPart = pos;
|
||||
const finalFragment = scanNumberFragment();
|
||||
if (!finalFragment) {
|
||||
error(Diagnostics.Digit_expected);
|
||||
}
|
||||
else {
|
||||
scientificFragment = text.substring(end, preNumericPart) + finalFragment;
|
||||
end = pos;
|
||||
}
|
||||
}
|
||||
if (tokenFlags & TokenFlags.ContainsSeparator) {
|
||||
let result = mainFragment;
|
||||
if (decimalFragment) {
|
||||
result += "." + decimalFragment;
|
||||
}
|
||||
if (scientificFragment) {
|
||||
result += scientificFragment;
|
||||
}
|
||||
return "" + +result;
|
||||
}
|
||||
else {
|
||||
return "" + +(text.substring(start, end)); // No need to use all the fragments; no _ removal needed
|
||||
}
|
||||
return "" + +(text.substring(start, end));
|
||||
}
|
||||
|
||||
function scanOctalDigits(): number {
|
||||
@ -894,23 +952,41 @@ namespace ts {
|
||||
* Scans the given number of hexadecimal digits in the text,
|
||||
* returning -1 if the given number is unavailable.
|
||||
*/
|
||||
function scanExactNumberOfHexDigits(count: number): number {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ false);
|
||||
function scanExactNumberOfHexDigits(count: number, canHaveSeparators: boolean): number {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ false, canHaveSeparators);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scans as many hexadecimal digits as are available in the text,
|
||||
* returning -1 if the given number of digits was unavailable.
|
||||
*/
|
||||
function scanMinimumNumberOfHexDigits(count: number): number {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ true);
|
||||
function scanMinimumNumberOfHexDigits(count: number, canHaveSeparators: boolean): number {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ true, canHaveSeparators);
|
||||
}
|
||||
|
||||
function scanHexDigits(minCount: number, scanAsManyAsPossible: boolean): number {
|
||||
function scanHexDigits(minCount: number, scanAsManyAsPossible: boolean, canHaveSeparators: boolean): number {
|
||||
let digits = 0;
|
||||
let value = 0;
|
||||
let allowSeparator = false;
|
||||
let isPreviousTokenSeparator = false;
|
||||
while (digits < minCount || scanAsManyAsPossible) {
|
||||
const ch = text.charCodeAt(pos);
|
||||
if (canHaveSeparators && ch === CharacterCodes._) {
|
||||
tokenFlags |= TokenFlags.ContainsSeparator;
|
||||
if (allowSeparator) {
|
||||
allowSeparator = false;
|
||||
isPreviousTokenSeparator = true;
|
||||
}
|
||||
else if (isPreviousTokenSeparator) {
|
||||
error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);
|
||||
}
|
||||
else {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);
|
||||
}
|
||||
pos++;
|
||||
continue;
|
||||
}
|
||||
allowSeparator = canHaveSeparators;
|
||||
if (ch >= CharacterCodes._0 && ch <= CharacterCodes._9) {
|
||||
value = value * 16 + ch - CharacterCodes._0;
|
||||
}
|
||||
@ -925,10 +1001,14 @@ namespace ts {
|
||||
}
|
||||
pos++;
|
||||
digits++;
|
||||
isPreviousTokenSeparator = false;
|
||||
}
|
||||
if (digits < minCount) {
|
||||
value = -1;
|
||||
}
|
||||
if (text.charCodeAt(pos - 1) === CharacterCodes._) {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -1097,7 +1177,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function scanHexadecimalEscape(numDigits: number): string {
|
||||
const escapedValue = scanExactNumberOfHexDigits(numDigits);
|
||||
const escapedValue = scanExactNumberOfHexDigits(numDigits, /*canHaveSeparators*/ false);
|
||||
|
||||
if (escapedValue >= 0) {
|
||||
return String.fromCharCode(escapedValue);
|
||||
@ -1109,7 +1189,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function scanExtendedUnicodeEscape(): string {
|
||||
const escapedValue = scanMinimumNumberOfHexDigits(1);
|
||||
const escapedValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false);
|
||||
let isInvalidExtendedEscape = false;
|
||||
|
||||
// Validate the value of the digit
|
||||
@ -1162,7 +1242,7 @@ namespace ts {
|
||||
if (pos + 5 < end && text.charCodeAt(pos + 1) === CharacterCodes.u) {
|
||||
const start = pos;
|
||||
pos += 2;
|
||||
const value = scanExactNumberOfHexDigits(4);
|
||||
const value = scanExactNumberOfHexDigits(4, /*canHaveSeparators*/ false);
|
||||
pos = start;
|
||||
return value;
|
||||
}
|
||||
@ -1218,8 +1298,27 @@ namespace ts {
|
||||
// For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b.
|
||||
// Similarly valid octalIntegerLiteral must have at least one octal digit following o or O.
|
||||
let numberOfDigits = 0;
|
||||
let separatorAllowed = false;
|
||||
let isPreviousTokenSeparator = false;
|
||||
while (true) {
|
||||
const ch = text.charCodeAt(pos);
|
||||
// Numeric seperators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator
|
||||
if (ch === CharacterCodes._) {
|
||||
tokenFlags |= TokenFlags.ContainsSeparator;
|
||||
if (separatorAllowed) {
|
||||
separatorAllowed = false;
|
||||
isPreviousTokenSeparator = true;
|
||||
}
|
||||
else if (isPreviousTokenSeparator) {
|
||||
error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);
|
||||
}
|
||||
else {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);
|
||||
}
|
||||
pos++;
|
||||
continue;
|
||||
}
|
||||
separatorAllowed = true;
|
||||
const valueOfCh = ch - CharacterCodes._0;
|
||||
if (!isDigit(ch) || valueOfCh >= base) {
|
||||
break;
|
||||
@ -1227,11 +1326,17 @@ namespace ts {
|
||||
value = value * base + valueOfCh;
|
||||
pos++;
|
||||
numberOfDigits++;
|
||||
isPreviousTokenSeparator = false;
|
||||
}
|
||||
// Invalid binaryIntegerLiteral or octalIntegerLiteral
|
||||
if (numberOfDigits === 0) {
|
||||
return -1;
|
||||
}
|
||||
if (text.charCodeAt(pos - 1) === CharacterCodes._) {
|
||||
// Literal ends with underscore - not allowed
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -1435,7 +1540,7 @@ namespace ts {
|
||||
case CharacterCodes._0:
|
||||
if (pos + 2 < end && (text.charCodeAt(pos + 1) === CharacterCodes.X || text.charCodeAt(pos + 1) === CharacterCodes.x)) {
|
||||
pos += 2;
|
||||
let value = scanMinimumNumberOfHexDigits(1);
|
||||
let value = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true);
|
||||
if (value < 0) {
|
||||
error(Diagnostics.Hexadecimal_digit_expected);
|
||||
value = 0;
|
||||
@ -1489,7 +1594,7 @@ namespace ts {
|
||||
return token = SyntaxKind.NumericLiteral;
|
||||
case CharacterCodes.colon:
|
||||
pos++;
|
||||
return token = SyntaxKind.ColonToken;
|
||||
return token = SyntaxKind.ColonToken;
|
||||
case CharacterCodes.semicolon:
|
||||
pos++;
|
||||
return token = SyntaxKind.SemicolonToken;
|
||||
@ -1800,7 +1905,7 @@ namespace ts {
|
||||
break;
|
||||
}
|
||||
}
|
||||
tokenValue += text.substr(firstCharPosition, pos - firstCharPosition);
|
||||
tokenValue += text.substring(firstCharPosition, pos);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
@ -1819,7 +1924,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function scanJSDocToken(): SyntaxKind {
|
||||
function scanJSDocToken(): JsDocSyntaxKind {
|
||||
if (pos >= end) {
|
||||
return token = SyntaxKind.EndOfFileToken;
|
||||
}
|
||||
@ -1828,6 +1933,7 @@ namespace ts {
|
||||
tokenPos = pos;
|
||||
|
||||
const ch = text.charCodeAt(pos);
|
||||
pos++;
|
||||
switch (ch) {
|
||||
case CharacterCodes.tab:
|
||||
case CharacterCodes.verticalTab:
|
||||
@ -1838,56 +1944,31 @@ namespace ts {
|
||||
}
|
||||
return token = SyntaxKind.WhitespaceTrivia;
|
||||
case CharacterCodes.at:
|
||||
pos++;
|
||||
return token = SyntaxKind.AtToken;
|
||||
case CharacterCodes.lineFeed:
|
||||
case CharacterCodes.carriageReturn:
|
||||
pos++;
|
||||
return token = SyntaxKind.NewLineTrivia;
|
||||
case CharacterCodes.asterisk:
|
||||
pos++;
|
||||
return token = SyntaxKind.AsteriskToken;
|
||||
case CharacterCodes.openBrace:
|
||||
pos++;
|
||||
return token = SyntaxKind.OpenBraceToken;
|
||||
case CharacterCodes.closeBrace:
|
||||
pos++;
|
||||
return token = SyntaxKind.CloseBraceToken;
|
||||
case CharacterCodes.openBracket:
|
||||
pos++;
|
||||
return token = SyntaxKind.OpenBracketToken;
|
||||
case CharacterCodes.closeBracket:
|
||||
pos++;
|
||||
return token = SyntaxKind.CloseBracketToken;
|
||||
case CharacterCodes.lessThan:
|
||||
pos++;
|
||||
return token = SyntaxKind.LessThanToken;
|
||||
case CharacterCodes.greaterThan:
|
||||
pos++;
|
||||
return token = SyntaxKind.GreaterThanToken;
|
||||
case CharacterCodes.equals:
|
||||
pos++;
|
||||
return token = SyntaxKind.EqualsToken;
|
||||
case CharacterCodes.comma:
|
||||
pos++;
|
||||
return token = SyntaxKind.CommaToken;
|
||||
case CharacterCodes.dot:
|
||||
pos++;
|
||||
if (text.substr(tokenPos, pos + 2) === "...") {
|
||||
pos += 2;
|
||||
return token = SyntaxKind.DotDotDotToken;
|
||||
}
|
||||
return token = SyntaxKind.DotToken;
|
||||
case CharacterCodes.exclamation:
|
||||
pos++;
|
||||
return token = SyntaxKind.ExclamationToken;
|
||||
case CharacterCodes.question:
|
||||
pos++;
|
||||
return token = SyntaxKind.QuestionToken;
|
||||
}
|
||||
|
||||
if (isIdentifierStart(ch, ScriptTarget.Latest)) {
|
||||
pos++;
|
||||
while (isIdentifierPart(text.charCodeAt(pos), ScriptTarget.Latest) && pos < end) {
|
||||
pos++;
|
||||
}
|
||||
@ -1895,7 +1976,7 @@ namespace ts {
|
||||
return token = SyntaxKind.Identifier;
|
||||
}
|
||||
else {
|
||||
return pos += 1, token = SyntaxKind.Unknown;
|
||||
return token = SyntaxKind.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -420,7 +420,7 @@ namespace ts {
|
||||
host.getCanonicalFileName,
|
||||
/*isAbsolutePathAnUrl*/ true);
|
||||
|
||||
sourceMapSourceIndex = indexOf(sourceMapData.sourceMapSources, source);
|
||||
sourceMapSourceIndex = sourceMapData.sourceMapSources.indexOf(source);
|
||||
if (sourceMapSourceIndex === -1) {
|
||||
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
|
||||
sourceMapData.sourceMapSources.push(source);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
namespace ts {
|
||||
export function createGetSymbolWalker(
|
||||
getRestTypeOfSignature: (sig: Signature) => Type,
|
||||
getTypePredicateOfSignature: (sig: Signature) => TypePredicate | undefined,
|
||||
getReturnTypeOfSignature: (sig: Signature) => Type,
|
||||
getBaseTypes: (type: Type) => Type[],
|
||||
resolveStructuredTypeMembers: (type: ObjectType) => ResolvedType,
|
||||
@ -117,8 +118,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function visitSignature(signature: Signature): void {
|
||||
if (signature.typePredicate) {
|
||||
visitType(signature.typePredicate.type);
|
||||
const typePredicate = getTypePredicateOfSignature(signature);
|
||||
if (typePredicate) {
|
||||
visitType(typePredicate.type);
|
||||
}
|
||||
forEach(signature.typeParameters, visitType);
|
||||
|
||||
|
||||
@ -859,7 +859,7 @@ namespace ts {
|
||||
statements.push(
|
||||
setTextRange(
|
||||
createStatement(
|
||||
createExtendsHelper(context, getLocalName(node))
|
||||
createExtendsHelper(context, getInternalName(node))
|
||||
),
|
||||
/*location*/ extendsClauseElement
|
||||
)
|
||||
|
||||
@ -968,7 +968,7 @@ namespace ts {
|
||||
name: "typescript:asyncValues",
|
||||
scoped: false,
|
||||
text: `
|
||||
var __asyncValues = (this && this.__asyncIterator) || function (o) {
|
||||
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator];
|
||||
return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator]();
|
||||
|
||||
@ -3190,8 +3190,8 @@ namespace ts {
|
||||
// `throw` methods that step through the generator when invoked.
|
||||
//
|
||||
// parameters:
|
||||
// thisArg The value to use as the `this` binding for the transformed generator body.
|
||||
// body A function that acts as the transformed generator body.
|
||||
// @param thisArg The value to use as the `this` binding for the transformed generator body.
|
||||
// @param body A function that acts as the transformed generator body.
|
||||
//
|
||||
// variables:
|
||||
// _ Persistent state for the generator that is shared between the helper and the
|
||||
|
||||
@ -25,14 +25,14 @@ namespace ts {
|
||||
if (externalHelpersModuleName) {
|
||||
const statements: Statement[] = [];
|
||||
const statementOffset = addPrologue(statements, node.statements);
|
||||
append(statements,
|
||||
createImportDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ undefined,
|
||||
createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)),
|
||||
createLiteral(externalHelpersModuleNameText)
|
||||
)
|
||||
const tslibImport = createImportDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ undefined,
|
||||
createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)),
|
||||
createLiteral(externalHelpersModuleNameText)
|
||||
);
|
||||
addEmitFlags(tslibImport, EmitFlags.NeverApplyImportHelper);
|
||||
append(statements, tslibImport);
|
||||
|
||||
addRange(statements, visitNodes(node.statements, visitor, isStatement, statementOffset));
|
||||
return updateSourceFileNode(
|
||||
|
||||
@ -148,7 +148,7 @@ namespace ts {
|
||||
// Create an updated SourceFile:
|
||||
//
|
||||
// define(moduleName?, ["module1", "module2"], function ...
|
||||
return updateSourceFileNode(node,
|
||||
const updated = updateSourceFileNode(node,
|
||||
setTextRange(
|
||||
createNodeArray([
|
||||
createStatement(
|
||||
@ -192,6 +192,9 @@ namespace ts {
|
||||
/*location*/ node.statements
|
||||
)
|
||||
);
|
||||
|
||||
addEmitHelpers(updated, context.readEmitHelpers());
|
||||
return updated;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -296,7 +299,7 @@ namespace ts {
|
||||
// }
|
||||
// })(function ...)
|
||||
|
||||
return updateSourceFileNode(
|
||||
const updated = updateSourceFileNode(
|
||||
node,
|
||||
setTextRange(
|
||||
createNodeArray([
|
||||
@ -328,6 +331,9 @@ namespace ts {
|
||||
/*location*/ node.statements
|
||||
)
|
||||
);
|
||||
|
||||
addEmitHelpers(updated, context.readEmitHelpers());
|
||||
return updated;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -385,6 +391,18 @@ namespace ts {
|
||||
return { aliasedModuleNames, unaliasedModuleNames, importAliasNames };
|
||||
}
|
||||
|
||||
function getAMDImportExpressionForImport(node: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration) {
|
||||
if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(node, currentSourceFile, host, resolver, compilerOptions)) {
|
||||
return undefined;
|
||||
}
|
||||
const name = getLocalNameForExternalImport(node, currentSourceFile);
|
||||
const expr = getHelperExpressionForImport(node, name);
|
||||
if (expr === name) {
|
||||
return undefined;
|
||||
}
|
||||
return createStatement(createAssignment(name, expr));
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a SourceFile into an AMD or UMD module body.
|
||||
*
|
||||
@ -402,6 +420,9 @@ namespace ts {
|
||||
|
||||
// Visit each statement of the module body.
|
||||
append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, isStatement));
|
||||
if (moduleKind === ModuleKind.AMD) {
|
||||
addRange(statements, mapDefined(currentModuleInfo.externalImports, getAMDImportExpressionForImport));
|
||||
}
|
||||
addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset));
|
||||
|
||||
// Append the 'export =' statement if provided.
|
||||
@ -617,7 +638,12 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
return createNew(createIdentifier("Promise"), /*typeArguments*/ undefined, [func]);
|
||||
const promise = createNew(createIdentifier("Promise"), /*typeArguments*/ undefined, [func]);
|
||||
if (compilerOptions.esModuleInterop) {
|
||||
context.requestEmitHelper(importStarHelper);
|
||||
return createCall(createPropertyAccess(promise, createIdentifier("then")), /*typeArguments*/ undefined, [getHelperName("__importStar")]);
|
||||
}
|
||||
return promise;
|
||||
}
|
||||
|
||||
function createImportCallExpressionCommonJS(arg: Expression | undefined, containsLexicalThis: boolean): Expression {
|
||||
@ -627,7 +653,11 @@ namespace ts {
|
||||
// We have to wrap require in then callback so that require is done in asynchronously
|
||||
// if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately
|
||||
const promiseResolveCall = createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []);
|
||||
const requireCall = createCall(createIdentifier("require"), /*typeArguments*/ undefined, arg ? [arg] : []);
|
||||
let requireCall = createCall(createIdentifier("require"), /*typeArguments*/ undefined, arg ? [arg] : []);
|
||||
if (compilerOptions.esModuleInterop) {
|
||||
context.requestEmitHelper(importStarHelper);
|
||||
requireCall = createCall(getHelperName("__importStar"), /*typeArguments*/ undefined, [requireCall]);
|
||||
}
|
||||
|
||||
let func: FunctionExpression | ArrowFunction;
|
||||
if (languageVersion >= ScriptTarget.ES2015) {
|
||||
@ -660,6 +690,22 @@ namespace ts {
|
||||
return createCall(createPropertyAccess(promiseResolveCall, "then"), /*typeArguments*/ undefined, [func]);
|
||||
}
|
||||
|
||||
|
||||
function getHelperExpressionForImport(node: ImportDeclaration, innerExpr: Expression) {
|
||||
if (!compilerOptions.esModuleInterop || getEmitFlags(node) & EmitFlags.NeverApplyImportHelper) {
|
||||
return innerExpr;
|
||||
}
|
||||
if (getNamespaceDeclarationNode(node)) {
|
||||
context.requestEmitHelper(importStarHelper);
|
||||
return createCall(getHelperName("__importStar"), /*typeArguments*/ undefined, [innerExpr]);
|
||||
}
|
||||
if (isDefaultImport(node)) {
|
||||
context.requestEmitHelper(importDefaultHelper);
|
||||
return createCall(getHelperName("__importDefault"), /*typeArguments*/ undefined, [innerExpr]);
|
||||
}
|
||||
return innerExpr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits an ImportDeclaration node.
|
||||
*
|
||||
@ -681,7 +727,7 @@ namespace ts {
|
||||
createVariableDeclaration(
|
||||
getSynthesizedClone(namespaceDeclaration.name),
|
||||
/*type*/ undefined,
|
||||
createRequireCall(node)
|
||||
getHelperExpressionForImport(node, createRequireCall(node))
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -694,7 +740,7 @@ namespace ts {
|
||||
createVariableDeclaration(
|
||||
getGeneratedNameForNode(node),
|
||||
/*type*/ undefined,
|
||||
createRequireCall(node)
|
||||
getHelperExpressionForImport(node, createRequireCall(node))
|
||||
)
|
||||
);
|
||||
|
||||
@ -1671,4 +1717,28 @@ namespace ts {
|
||||
text: `
|
||||
var __syncRequire = typeof module === "object" && typeof module.exports === "object";`
|
||||
};
|
||||
|
||||
// emit helper for `import * as Name from "foo"`
|
||||
const importStarHelper: EmitHelper = {
|
||||
name: "typescript:commonjsimportstar",
|
||||
scoped: false,
|
||||
text: `
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
}`
|
||||
};
|
||||
|
||||
// emit helper for `import Name from "foo"`
|
||||
const importDefaultHelper: EmitHelper = {
|
||||
name: "typescript:commonjsimportdefault",
|
||||
scoped: false,
|
||||
text: `
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
}`
|
||||
};
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ namespace ts {
|
||||
let classAliases: Identifier[];
|
||||
|
||||
/**
|
||||
* Keeps track of whether we are within any containing namespaces when performing
|
||||
* Keeps track of whether we are within any containing namespaces when performing
|
||||
* just-in-time substitution while printing an expression identifier.
|
||||
*/
|
||||
let applicableSubstitutions: TypeScriptSubstitutionFlags;
|
||||
|
||||
@ -143,6 +143,7 @@ namespace ts {
|
||||
createLiteral(externalHelpersModuleNameText));
|
||||
|
||||
if (externalHelpersImportDeclaration) {
|
||||
addEmitFlags(externalHelpersImportDeclaration, EmitFlags.NeverApplyImportHelper);
|
||||
externalImports.unshift(externalHelpersImportDeclaration);
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +58,23 @@ namespace ts {
|
||||
end: number;
|
||||
}
|
||||
|
||||
export type JsDocSyntaxKind =
|
||||
| SyntaxKind.EndOfFileToken
|
||||
| SyntaxKind.WhitespaceTrivia
|
||||
| SyntaxKind.AtToken
|
||||
| SyntaxKind.NewLineTrivia
|
||||
| SyntaxKind.AsteriskToken
|
||||
| SyntaxKind.OpenBraceToken
|
||||
| SyntaxKind.CloseBraceToken
|
||||
| SyntaxKind.LessThanToken
|
||||
| SyntaxKind.OpenBracketToken
|
||||
| SyntaxKind.CloseBracketToken
|
||||
| SyntaxKind.EqualsToken
|
||||
| SyntaxKind.CommaToken
|
||||
| SyntaxKind.DotToken
|
||||
| SyntaxKind.Identifier
|
||||
| SyntaxKind.Unknown;
|
||||
|
||||
// token > SyntaxKind.Identifer => token is a keyword
|
||||
// Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
|
||||
export const enum SyntaxKind {
|
||||
@ -438,24 +455,24 @@ namespace ts {
|
||||
}
|
||||
|
||||
export const enum NodeFlags {
|
||||
None = 0,
|
||||
Let = 1 << 0, // Variable declaration
|
||||
Const = 1 << 1, // Variable declaration
|
||||
NestedNamespace = 1 << 2, // Namespace declaration
|
||||
Synthesized = 1 << 3, // Node was synthesized during transformation
|
||||
Namespace = 1 << 4, // Namespace declaration
|
||||
ExportContext = 1 << 5, // Export context (initialized by binding)
|
||||
ContainsThis = 1 << 6, // Interface contains references to "this"
|
||||
HasImplicitReturn = 1 << 7, // If function implicitly returns on one of codepaths (initialized by binding)
|
||||
HasExplicitReturn = 1 << 8, // If function has explicit reachable return on one of codepaths (initialized by binding)
|
||||
None = 0,
|
||||
Let = 1 << 0, // Variable declaration
|
||||
Const = 1 << 1, // Variable declaration
|
||||
NestedNamespace = 1 << 2, // Namespace declaration
|
||||
Synthesized = 1 << 3, // Node was synthesized during transformation
|
||||
Namespace = 1 << 4, // Namespace declaration
|
||||
ExportContext = 1 << 5, // Export context (initialized by binding)
|
||||
ContainsThis = 1 << 6, // Interface contains references to "this"
|
||||
HasImplicitReturn = 1 << 7, // If function implicitly returns on one of codepaths (initialized by binding)
|
||||
HasExplicitReturn = 1 << 8, // If function has explicit reachable return on one of codepaths (initialized by binding)
|
||||
GlobalAugmentation = 1 << 9, // Set if module declaration is an augmentation for the global scope
|
||||
HasAsyncFunctions = 1 << 10, // If the file has async functions (initialized by binding)
|
||||
DisallowInContext = 1 << 11, // If node was parsed in a context where 'in-expressions' are not allowed
|
||||
YieldContext = 1 << 12, // If node was parsed in the 'yield' context created when parsing a generator
|
||||
DecoratorContext = 1 << 13, // If node was parsed as part of a decorator
|
||||
AwaitContext = 1 << 14, // If node was parsed in the 'await' context created when parsing an async function
|
||||
ThisNodeHasError = 1 << 15, // If the parser encountered an error when parsing the code that created this node
|
||||
JavaScriptFile = 1 << 16, // If node was parsed in a JavaScript
|
||||
HasAsyncFunctions = 1 << 10, // If the file has async functions (initialized by binding)
|
||||
DisallowInContext = 1 << 11, // If node was parsed in a context where 'in-expressions' are not allowed
|
||||
YieldContext = 1 << 12, // If node was parsed in the 'yield' context created when parsing a generator
|
||||
DecoratorContext = 1 << 13, // If node was parsed as part of a decorator
|
||||
AwaitContext = 1 << 14, // If node was parsed in the 'await' context created when parsing an async function
|
||||
ThisNodeHasError = 1 << 15, // If the parser encountered an error when parsing the code that created this node
|
||||
JavaScriptFile = 1 << 16, // If node was parsed in a JavaScript
|
||||
ThisNodeOrAnySubNodesHasError = 1 << 17, // If this node or any of its children had an error
|
||||
HasAggregatedChildData = 1 << 18, // If we've computed data from children and cached it in this node
|
||||
|
||||
@ -584,6 +601,40 @@ namespace ts {
|
||||
| JSDocFunctionType
|
||||
| EndOfFileToken;
|
||||
|
||||
export type HasType =
|
||||
| SignatureDeclaration
|
||||
| VariableDeclaration
|
||||
| ParameterDeclaration
|
||||
| PropertySignature
|
||||
| PropertyDeclaration
|
||||
| TypePredicateNode
|
||||
| ParenthesizedTypeNode
|
||||
| TypeOperatorNode
|
||||
| MappedTypeNode
|
||||
| AssertionExpression
|
||||
| TypeAliasDeclaration
|
||||
| JSDocTypeExpression
|
||||
| JSDocNonNullableType
|
||||
| JSDocNullableType
|
||||
| JSDocOptionalType
|
||||
| JSDocVariadicType;
|
||||
|
||||
export type HasInitializer =
|
||||
| HasExpressionInitializer
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| JsxAttribute;
|
||||
|
||||
export type HasExpressionInitializer =
|
||||
| VariableDeclaration
|
||||
| ParameterDeclaration
|
||||
| BindingElement
|
||||
| PropertySignature
|
||||
| PropertyDeclaration
|
||||
| PropertyAssignment
|
||||
| EnumMember;
|
||||
|
||||
/* @internal */
|
||||
export type MutableNodeArray<T extends Node> = NodeArray<T> & T[];
|
||||
|
||||
@ -793,6 +844,9 @@ namespace ts {
|
||||
initializer?: Expression; // Optional initializer
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export type BindingElementGrandparent = BindingElement["parent"]["parent"];
|
||||
|
||||
export interface PropertySignature extends TypeElement, JSDocContainer {
|
||||
kind: SyntaxKind.PropertySignature;
|
||||
name: PropertyName; // Declared property name
|
||||
@ -848,25 +902,18 @@ namespace ts {
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
// SyntaxKind.VariableDeclaration
|
||||
// SyntaxKind.Parameter
|
||||
// SyntaxKind.BindingElement
|
||||
// SyntaxKind.Property
|
||||
// SyntaxKind.PropertyAssignment
|
||||
// SyntaxKind.JsxAttribute
|
||||
// SyntaxKind.ShorthandPropertyAssignment
|
||||
// SyntaxKind.EnumMember
|
||||
// SyntaxKind.JSDocPropertyTag
|
||||
// SyntaxKind.JSDocParameterTag
|
||||
export interface VariableLikeDeclaration extends NamedDeclaration {
|
||||
propertyName?: PropertyName;
|
||||
dotDotDotToken?: DotDotDotToken;
|
||||
name: DeclarationName;
|
||||
questionToken?: QuestionToken;
|
||||
exclamationToken?: ExclamationToken;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
export type VariableLikeDeclaration =
|
||||
| VariableDeclaration
|
||||
| ParameterDeclaration
|
||||
| BindingElement
|
||||
| PropertyDeclaration
|
||||
| PropertyAssignment
|
||||
| PropertySignature
|
||||
| JsxAttribute
|
||||
| ShorthandPropertyAssignment
|
||||
| EnumMember
|
||||
| JSDocPropertyTag
|
||||
| JSDocParameterTag;
|
||||
|
||||
export interface PropertyLikeDeclaration extends NamedDeclaration {
|
||||
name: PropertyName;
|
||||
@ -949,7 +996,7 @@ namespace ts {
|
||||
|
||||
export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
|
||||
kind: SyntaxKind.Constructor;
|
||||
parent?: ClassDeclaration | ClassExpression;
|
||||
parent?: ClassLikeDeclaration;
|
||||
body?: FunctionBody;
|
||||
/* @internal */ returnFlowNode?: FlowNode;
|
||||
}
|
||||
@ -957,14 +1004,14 @@ namespace ts {
|
||||
/** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
|
||||
export interface SemicolonClassElement extends ClassElement {
|
||||
kind: SyntaxKind.SemicolonClassElement;
|
||||
parent?: ClassDeclaration | ClassExpression;
|
||||
parent?: ClassLikeDeclaration;
|
||||
}
|
||||
|
||||
// See the comment on MethodDeclaration for the intuition behind GetAccessorDeclaration being a
|
||||
// ClassElement and an ObjectLiteralElement.
|
||||
export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
|
||||
kind: SyntaxKind.GetAccessor;
|
||||
parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
|
||||
parent?: ClassLikeDeclaration | ObjectLiteralExpression;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
@ -973,7 +1020,7 @@ namespace ts {
|
||||
// ClassElement and an ObjectLiteralElement.
|
||||
export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
|
||||
kind: SyntaxKind.SetAccessor;
|
||||
parent?: ClassDeclaration | ClassExpression | ObjectLiteralExpression;
|
||||
parent?: ClassLikeDeclaration | ObjectLiteralExpression;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
@ -982,7 +1029,7 @@ namespace ts {
|
||||
|
||||
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
|
||||
kind: SyntaxKind.IndexSignature;
|
||||
parent?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode;
|
||||
parent?: ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
|
||||
}
|
||||
|
||||
export interface TypeNode extends Node {
|
||||
@ -1102,11 +1149,13 @@ namespace ts {
|
||||
|
||||
export interface StringLiteral extends LiteralExpression {
|
||||
kind: SyntaxKind.StringLiteral;
|
||||
/* @internal */ textSourceNode?: Identifier | StringLiteral | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
|
||||
/* @internal */ textSourceNode?: Identifier | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
|
||||
/** Note: this is only set when synthesizing a node, not during parsing. */
|
||||
/* @internal */ singleQuote?: boolean;
|
||||
}
|
||||
|
||||
/* @internal */ export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
|
||||
|
||||
// Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing.
|
||||
// Consider 'Expression'. Without the brand, 'Expression' is actually no different
|
||||
// (structurally) than 'Node'. Because of this you can pass any Node to a function that
|
||||
@ -1364,7 +1413,7 @@ namespace ts {
|
||||
|
||||
export type BinaryOperatorToken = Token<BinaryOperator>;
|
||||
|
||||
export interface BinaryExpression extends Expression, Declaration {
|
||||
export interface BinaryExpression extends Expression, Declaration {
|
||||
kind: SyntaxKind.BinaryExpression;
|
||||
left: Expression;
|
||||
operatorToken: BinaryOperatorToken;
|
||||
@ -1452,6 +1501,7 @@ namespace ts {
|
||||
kind: SyntaxKind.ArrowFunction;
|
||||
equalsGreaterThanToken: EqualsGreaterThanToken;
|
||||
body: ConciseBody;
|
||||
name: never;
|
||||
}
|
||||
|
||||
// The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral,
|
||||
@ -1490,8 +1540,9 @@ namespace ts {
|
||||
HexSpecifier = 1 << 6, // e.g. `0x00000000`
|
||||
BinarySpecifier = 1 << 7, // e.g. `0b0110010000000000`
|
||||
OctalSpecifier = 1 << 8, // e.g. `0o777`
|
||||
ContainsSeparator = 1 << 9, // e.g. `0b1100_0101`
|
||||
BinaryOrOctalSpecifier = BinarySpecifier | OctalSpecifier,
|
||||
NumericLiteralFlags = Scientific | Octal | HexSpecifier | BinarySpecifier | OctalSpecifier
|
||||
NumericLiteralFlags = Scientific | Octal | HexSpecifier | BinarySpecifier | OctalSpecifier | ContainsSeparator
|
||||
}
|
||||
|
||||
export interface NumericLiteral extends LiteralExpression {
|
||||
@ -1986,7 +2037,7 @@ namespace ts {
|
||||
|
||||
export interface HeritageClause extends Node {
|
||||
kind: SyntaxKind.HeritageClause;
|
||||
parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression;
|
||||
parent?: InterfaceDeclaration | ClassLikeDeclaration;
|
||||
token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
|
||||
types: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
@ -2108,6 +2159,7 @@ namespace ts {
|
||||
export interface ExportDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ExportDeclaration;
|
||||
parent?: SourceFile | ModuleBlock;
|
||||
/** Will not be assigned in the case of `export * from "foo";` */
|
||||
exportClause?: NamedExports;
|
||||
/** If this is not a StringLiteral it will be a grammar error. */
|
||||
moduleSpecifier?: Expression;
|
||||
@ -2478,7 +2530,7 @@ namespace ts {
|
||||
// Stores a mapping 'external module reference text' -> 'resolved file name' | undefined
|
||||
// It is used to resolve module names in the checker.
|
||||
// Content of this field should never be used directly - use getResolvedModuleFileName/setResolvedModuleFileName functions instead
|
||||
/* @internal */ resolvedModules: Map<ResolvedModuleFull>;
|
||||
/* @internal */ resolvedModules: Map<ResolvedModuleFull | undefined>;
|
||||
/* @internal */ resolvedTypeReferenceDirectiveNames: Map<ResolvedTypeReferenceDirective>;
|
||||
/* @internal */ imports: ReadonlyArray<StringLiteral>;
|
||||
// Identifier only if `declare global`
|
||||
@ -2509,7 +2561,7 @@ namespace ts {
|
||||
export interface ParseConfigHost {
|
||||
useCaseSensitiveFileNames: boolean;
|
||||
|
||||
readDirectory(rootDir: string, extensions: ReadonlyArray<string>, excludes: ReadonlyArray<string>, includes: ReadonlyArray<string>, depth: number): string[];
|
||||
readDirectory(rootDir: string, extensions: ReadonlyArray<string>, excludes: ReadonlyArray<string> | undefined, includes: ReadonlyArray<string>, depth?: number): string[];
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the specified path exists and is a file.
|
||||
@ -2738,6 +2790,8 @@ namespace ts {
|
||||
getAugmentedPropertiesOfType(type: Type): Symbol[];
|
||||
getRootSymbols(symbol: Symbol): Symbol[];
|
||||
getContextualType(node: Expression): Type | undefined;
|
||||
/* @internal */ isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike): boolean;
|
||||
|
||||
/**
|
||||
* returns unknownSignature in the case of an error.
|
||||
* @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
|
||||
@ -2752,6 +2806,8 @@ namespace ts {
|
||||
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
|
||||
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
|
||||
/** Exclude accesses to private properties or methods with a `this` parameter that `type` doesn't satisfy. */
|
||||
/* @internal */ isValidPropertyAccessForCompletions(node: PropertyAccessExpression, type: Type, property: Symbol): boolean;
|
||||
/** Follow all aliases to get the original symbol. */
|
||||
getAliasedSymbol(symbol: Symbol): Symbol;
|
||||
/** Follow a *single* alias to get the immediately aliased symbol. */
|
||||
@ -2786,12 +2842,22 @@ namespace ts {
|
||||
/* @internal */ getNullType(): Type;
|
||||
/* @internal */ getESSymbolType(): Type;
|
||||
/* @internal */ getNeverType(): Type;
|
||||
/* @internal */ getUnionType(types: Type[], subtypeReduction?: boolean): Type;
|
||||
/* @internal */ getUnionType(types: Type[], subtypeReduction?: UnionReduction): Type;
|
||||
/* @internal */ createArrayType(elementType: Type): Type;
|
||||
/* @internal */ createPromiseType(type: Type): Type;
|
||||
|
||||
/* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo, numberIndexInfo: IndexInfo): Type;
|
||||
/* @internal */ createSignature(declaration: SignatureDeclaration, typeParameters: TypeParameter[], thisParameter: Symbol | undefined, parameters: Symbol[], resolvedReturnType: Type, typePredicate: TypePredicate, minArgumentCount: number, hasRestParameter: boolean, hasLiteralTypes: boolean): Signature;
|
||||
/* @internal */ createSignature(
|
||||
declaration: SignatureDeclaration,
|
||||
typeParameters: TypeParameter[],
|
||||
thisParameter: Symbol | undefined,
|
||||
parameters: Symbol[],
|
||||
resolvedReturnType: Type,
|
||||
typePredicate: TypePredicate | undefined,
|
||||
minArgumentCount: number,
|
||||
hasRestParameter: boolean,
|
||||
hasLiteralTypes: boolean,
|
||||
): Signature;
|
||||
/* @internal */ createSymbol(flags: SymbolFlags, name: __String): TransientSymbol;
|
||||
/* @internal */ createIndexInfo(type: Type, isReadonly: boolean, declaration?: SignatureDeclaration): IndexInfo;
|
||||
/* @internal */ isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult;
|
||||
@ -2816,7 +2882,7 @@ namespace ts {
|
||||
*/
|
||||
/* @internal */ isArrayLikeType(type: Type): boolean;
|
||||
/* @internal */ getAllPossiblePropertiesOfTypes(type: ReadonlyArray<Type>): Symbol[];
|
||||
/* @internal */ resolveName(name: string, location: Node, meaning: SymbolFlags): Symbol | undefined;
|
||||
/* @internal */ resolveName(name: string, location: Node, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;
|
||||
/* @internal */ getJsxNamespace(): string;
|
||||
|
||||
/**
|
||||
@ -2829,6 +2895,15 @@ namespace ts {
|
||||
* This should be called in a loop climbing parents of the symbol, so we'll get `N`.
|
||||
*/
|
||||
/* @internal */ getAccessibleSymbolChain(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, useOnlyExternalAliasing: boolean): Symbol[] | undefined;
|
||||
|
||||
/* @internal */ resolveExternalModuleSymbol(symbol: Symbol): Symbol;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export const enum UnionReduction {
|
||||
None = 0,
|
||||
Literal,
|
||||
Subtype
|
||||
}
|
||||
|
||||
export enum NodeBuilderFlags {
|
||||
@ -2925,9 +3000,9 @@ namespace ts {
|
||||
None = 0x00000000,
|
||||
|
||||
// Write symbols's type argument if it is instantiated symbol
|
||||
// eg. class C<T> { p: T } <-- Show p as C<T>.p here
|
||||
// eg. class C<T> { p: T } <-- Show p as C<T>.p here
|
||||
// var a: C<number>;
|
||||
// var p = a.p; <--- Here p is property of C<number> so show it as C<number>.p instead of just C.p
|
||||
// var p = a.p; <--- Here p is property of C<number> so show it as C<number>.p instead of just C.p
|
||||
WriteTypeParametersOrArguments = 0x00000001,
|
||||
|
||||
// Use only external alias information to get the symbol name in the given context
|
||||
@ -3177,6 +3252,7 @@ namespace ts {
|
||||
bindingElement?: BindingElement; // Binding element associated with property symbol
|
||||
exportsSomeValue?: boolean; // True if module exports some value (not just types)
|
||||
enumKind?: EnumKind; // Enum declaration classification
|
||||
originatingImport?: ImportDeclaration | ImportCall; // Import declaration which produced the symbol, present if the symbol is marked as uncallable but had call signatures in `resolveESModuleSymbol`
|
||||
lateSymbol?: Symbol; // Late-bound symbol for a computed property
|
||||
}
|
||||
|
||||
@ -3199,6 +3275,7 @@ namespace ts {
|
||||
ContainsPrivate = 1 << 8, // Synthetic property with private constituent(s)
|
||||
ContainsStatic = 1 << 9, // Synthetic property with static constituent(s)
|
||||
Late = 1 << 10, // Late-bound symbol for a computed property with a dynamic name
|
||||
ReverseMapped = 1 << 11, // property of reverse-inferred homomorphic mapped type.
|
||||
Synthetic = SyntheticProperty | SyntheticMethod
|
||||
}
|
||||
|
||||
@ -3208,6 +3285,12 @@ namespace ts {
|
||||
isRestParameter?: boolean;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface ReverseMappedSymbol extends TransientSymbol {
|
||||
propertyType: Type;
|
||||
mappedType: MappedType;
|
||||
}
|
||||
|
||||
export const enum InternalSymbolName {
|
||||
Call = "__call", // Call signatures
|
||||
Constructor = "__constructor", // Constructor implementations
|
||||
@ -3313,7 +3396,7 @@ namespace ts {
|
||||
resolvedJsxElementAttributesType?: Type; // resolved element attributes type of a JSX openinglike element
|
||||
resolvedJsxElementAllAttributesType?: Type; // resolved all element attributes type of a JSX openinglike element
|
||||
hasSuperCall?: boolean; // recorded result when we try to find super-call. We only try to find one if this flag is undefined, indicating that we haven't made an attempt.
|
||||
superCall?: ExpressionStatement; // Cached first super-call found in the constructor. Used in checking whether super is called before this-accessing
|
||||
superCall?: SuperCall; // Cached first super-call found in the constructor. Used in checking whether super is called before this-accessing
|
||||
switchTypes?: Type[]; // Cached array of switch case expression types
|
||||
}
|
||||
|
||||
@ -3442,6 +3525,7 @@ namespace ts {
|
||||
EvolvingArray = 1 << 8, // Evolving array type
|
||||
ObjectLiteralPatternWithComputedProperties = 1 << 9, // Object literal pattern with computed properties
|
||||
ContainsSpread = 1 << 10, // Object literal contains spread operation
|
||||
ReverseMapped = 1 << 11, // Object contains a property from a reverse-mapped type
|
||||
ClassOrInterface = Class | Interface
|
||||
}
|
||||
|
||||
@ -3549,6 +3633,12 @@ namespace ts {
|
||||
finalArrayType?: Type; // Final array type of evolving array type
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface ReverseMappedType extends ObjectType {
|
||||
source: Type;
|
||||
mappedType: MappedType;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
// Resolved object, union, or intersection type
|
||||
export interface ResolvedType extends ObjectType, UnionOrIntersectionType {
|
||||
@ -3562,7 +3652,7 @@ namespace ts {
|
||||
|
||||
/* @internal */
|
||||
// Object literals are initially marked fresh. Freshness disappears following an assignment,
|
||||
// before a type assertion, or when an object literal's type is widened. The regular
|
||||
// before a type assertion, or when an object literal's type is widened. The regular
|
||||
// version of a fresh type is identical except for the TypeFlags.FreshObjectLiteral flag.
|
||||
export interface FreshObjectLiteralType extends ResolvedType {
|
||||
regularType: ResolvedType; // Regular version of fresh type
|
||||
@ -3638,7 +3728,13 @@ namespace ts {
|
||||
/* @internal */
|
||||
thisParameter?: Symbol; // symbol of this-type parameter
|
||||
/* @internal */
|
||||
resolvedReturnType: Type; // Resolved return type
|
||||
// See comment in `instantiateSignature` for why these are set lazily.
|
||||
resolvedReturnType: Type | undefined; // Lazily set by `getReturnTypeOfSignature`.
|
||||
/* @internal */
|
||||
// Lazily set by `getTypePredicateOfSignature`.
|
||||
// `undefined` indicates a type predicate that has not yet been computed.
|
||||
// Uses a special `noTypePredicate` sentinel value to indicate that there is no type predicate. This looks like a TypePredicate at runtime to avoid polymorphism.
|
||||
resolvedTypePredicate: TypePredicate | undefined;
|
||||
/* @internal */
|
||||
minArgumentCount: number; // Number of non-optional parameters
|
||||
/* @internal */
|
||||
@ -3658,8 +3754,6 @@ namespace ts {
|
||||
/* @internal */
|
||||
isolatedSignatureType?: ObjectType; // A manufactured type that just contains the signature for purposes of signature comparison
|
||||
/* @internal */
|
||||
typePredicate?: TypePredicate;
|
||||
/* @internal */
|
||||
instantiations?: Map<Signature>; // Generic signature instantiation cache
|
||||
}
|
||||
|
||||
@ -3889,6 +3983,7 @@ namespace ts {
|
||||
typeRoots?: string[];
|
||||
/*@internal*/ version?: boolean;
|
||||
/*@internal*/ watch?: boolean;
|
||||
esModuleInterop?: boolean;
|
||||
|
||||
[option: string]: CompilerOptionsValue | JsonSourceFile | undefined;
|
||||
}
|
||||
@ -4229,6 +4324,8 @@ namespace ts {
|
||||
* If changing this, remember to change `moduleResolutionIsEqualTo`.
|
||||
*/
|
||||
export interface ResolvedModuleFull extends ResolvedModule {
|
||||
/* @internal */
|
||||
readonly originalPath?: string;
|
||||
/**
|
||||
* Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
|
||||
* This is optional for backwards-compatibility, but will be added if not provided.
|
||||
@ -4308,11 +4405,11 @@ namespace ts {
|
||||
* If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just
|
||||
* 'throw new Error("NotImplemented")'
|
||||
*/
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames?: string[]): ResolvedModule[];
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames?: string[]): (ResolvedModule | undefined)[];
|
||||
/**
|
||||
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
||||
*/
|
||||
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
|
||||
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): (ResolvedTypeReferenceDirective | undefined)[];
|
||||
getEnvironmentVariable?(name: string): string;
|
||||
/* @internal */ onReleaseOldSourceFile?(oldSourceFile: SourceFile, oldOptions: CompilerOptions): void;
|
||||
/* @internal */ hasInvalidatedResolution?: HasInvalidatedResolution;
|
||||
@ -4454,6 +4551,7 @@ namespace ts {
|
||||
Iterator = 1 << 23, // The expression to a `yield*` should be treated as an Iterator when down-leveling, not an Iterable.
|
||||
NoAsciiEscaping = 1 << 24, // When synthesizing nodes that lack an original node or textSourceNode, we want to write the text on the node with ASCII escaping substitutions.
|
||||
/*@internal*/ TypeScriptClassWrapper = 1 << 25, // The node is an IIFE class wrapper created by the ts transform.
|
||||
/*@internal*/ NeverApplyImportHelper = 1 << 26, // Indicates the node should never be wrapped with an import star helper (because, for example, it imports tslib itself)
|
||||
}
|
||||
|
||||
export interface EmitHelper {
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
export const emptyArray: never[] = [] as never[];
|
||||
export const resolvingEmptyArray: never[] = [] as never[];
|
||||
export const emptyMap: ReadonlyMap<never> = createMap<never>();
|
||||
export const emptyUnderscoreEscapedMap: ReadonlyUnderscoreEscapedMap<never> = emptyMap as ReadonlyUnderscoreEscapedMap<never>;
|
||||
|
||||
export const externalHelpersModuleNameText = "tslib";
|
||||
|
||||
@ -101,6 +103,7 @@ namespace ts {
|
||||
return oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport &&
|
||||
oldResolution.extension === newResolution.extension &&
|
||||
oldResolution.resolvedFileName === newResolution.resolvedFileName &&
|
||||
oldResolution.originalPath === newResolution.originalPath &&
|
||||
packageIdIsEqual(oldResolution.packageId, newResolution.packageId);
|
||||
}
|
||||
|
||||
@ -345,7 +348,7 @@ namespace ts {
|
||||
export function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile) {
|
||||
// If we don't need to downlevel and we can reach the original source text using
|
||||
// the node's parent reference, then simply get the text as it was originally written.
|
||||
if (!nodeIsSynthesized(node) && node.parent) {
|
||||
if (!nodeIsSynthesized(node) && node.parent && !(isNumericLiteral(node) && node.numericLiteralFlags & TokenFlags.ContainsSeparator)) {
|
||||
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
|
||||
}
|
||||
|
||||
@ -547,7 +550,7 @@ namespace ts {
|
||||
// Return display name of an identifier
|
||||
// Computed property names will just be emitted as "[<expr>]", where <expr> is the source
|
||||
// text of the expression in the computed property.
|
||||
export function declarationNameToString(name: DeclarationName) {
|
||||
export function declarationNameToString(name: DeclarationName | QualifiedName) {
|
||||
return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
|
||||
}
|
||||
|
||||
@ -783,7 +786,7 @@ namespace ts {
|
||||
case SyntaxKind.PropertySignature:
|
||||
case SyntaxKind.Parameter:
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
return node === (<VariableLikeDeclaration>parent).type;
|
||||
return node === (parent as HasType).type;
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
@ -801,7 +804,7 @@ namespace ts {
|
||||
return node === (<TypeAssertion>parent).type;
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
return (<CallExpression>parent).typeArguments && indexOf((<CallExpression>parent).typeArguments, node) >= 0;
|
||||
return contains((<CallExpression>parent).typeArguments, node);
|
||||
case SyntaxKind.TaggedTemplateExpression:
|
||||
// TODO (drosen): TaggedTemplateExpressions may eventually support type arguments.
|
||||
return false;
|
||||
@ -1339,7 +1342,7 @@ namespace ts {
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
case SyntaxKind.BindingElement:
|
||||
return (<VariableLikeDeclaration>parent).initializer === node;
|
||||
return (parent as HasInitializer).initializer === node;
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
@ -1417,6 +1420,8 @@ namespace ts {
|
||||
* exactly one argument (of the form 'require("name")').
|
||||
* This function does not test if the node is in a JavaScript file or not.
|
||||
*/
|
||||
export function isRequireCall(callExpression: Node, checkArgumentIsStringLiteral: true): callExpression is CallExpression & { expression: Identifier, arguments: [StringLiteralLike] };
|
||||
export function isRequireCall(callExpression: Node, checkArgumentIsStringLiteral: boolean): callExpression is CallExpression;
|
||||
export function isRequireCall(callExpression: Node, checkArgumentIsStringLiteral: boolean): callExpression is CallExpression {
|
||||
if (callExpression.kind !== SyntaxKind.CallExpression) {
|
||||
return false;
|
||||
@ -1454,7 +1459,7 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function getRightMostAssignedExpression(node: Node) {
|
||||
export function getRightMostAssignedExpression(node: Expression): Expression {
|
||||
while (isAssignmentExpression(node, /*excludeCompoundAssignements*/ true)) {
|
||||
node = node.right;
|
||||
}
|
||||
@ -1649,7 +1654,7 @@ namespace ts {
|
||||
result = addRange(result, getJSDocParameterTags(node as ParameterDeclaration));
|
||||
}
|
||||
|
||||
if (isVariableLike(node) && node.initializer && hasJSDocNodes(node.initializer)) {
|
||||
if (isVariableLike(node) && hasInitializer(node) && hasJSDocNodes(node.initializer)) {
|
||||
result = addRange(result, node.initializer.jsDoc);
|
||||
}
|
||||
|
||||
@ -2117,6 +2122,10 @@ namespace ts {
|
||||
return "__@" + symbolName as __String;
|
||||
}
|
||||
|
||||
export function isKnownSymbol(symbol: Symbol): boolean {
|
||||
return startsWith(symbol.escapedName as string, "__@");
|
||||
}
|
||||
|
||||
/**
|
||||
* Includes the word "Symbol" with unicode escapes
|
||||
*/
|
||||
@ -2815,8 +2824,8 @@ namespace ts {
|
||||
* Gets the effective type annotation of a variable, parameter, or property. If the node was
|
||||
* parsed in a JavaScript file, gets the type annotation from JSDoc.
|
||||
*/
|
||||
export function getEffectiveTypeAnnotationNode(node: VariableLikeDeclaration, checkJSDoc?: boolean): TypeNode | undefined {
|
||||
if (node.type) {
|
||||
export function getEffectiveTypeAnnotationNode(node: Node, checkJSDoc?: boolean): TypeNode | undefined {
|
||||
if (hasType(node)) {
|
||||
return node.type;
|
||||
}
|
||||
if (checkJSDoc || isInJavaScriptFile(node)) {
|
||||
@ -3696,6 +3705,10 @@ namespace ts {
|
||||
export function typeHasCallOrConstructSignatures(type: Type, checker: TypeChecker) {
|
||||
return checker.getSignaturesOfType(type, SignatureKind.Call).length !== 0 || checker.getSignaturesOfType(type, SignatureKind.Construct).length !== 0;
|
||||
}
|
||||
|
||||
export function forSomeAncestorDirectory(directory: string, callback: (directory: string) => boolean): boolean {
|
||||
return !!forEachAncestorDirectory(directory, d => callback(d) ? true : undefined);
|
||||
}
|
||||
}
|
||||
|
||||
namespace ts {
|
||||
@ -3911,8 +3924,8 @@ namespace ts {
|
||||
//
|
||||
// {
|
||||
// oldStart3: Min(oldStart1, oldStart2),
|
||||
// oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
|
||||
// newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
|
||||
// oldEnd3: Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
|
||||
// newEnd3: Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
|
||||
// }
|
||||
|
||||
const oldStart1 = oldStartN;
|
||||
@ -4397,7 +4410,7 @@ namespace ts {
|
||||
return node.kind === SyntaxKind.RegularExpressionLiteral;
|
||||
}
|
||||
|
||||
export function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression {
|
||||
export function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral {
|
||||
return node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
}
|
||||
|
||||
@ -5228,6 +5241,18 @@ namespace ts {
|
||||
return node && (node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isMethodOrAccessor(node: Node): node is MethodDeclaration | AccessorDeclaration {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Type members
|
||||
|
||||
export function isTypeElement(node: Node): node is TypeElement {
|
||||
@ -5807,4 +5832,37 @@ namespace ts {
|
||||
export function hasJSDocNodes(node: Node): node is HasJSDoc {
|
||||
return !!(node as JSDocContainer).jsDoc && (node as JSDocContainer).jsDoc.length > 0;
|
||||
}
|
||||
|
||||
/** True if has type node attached to it. */
|
||||
/* @internal */
|
||||
export function hasType(node: Node): node is HasType {
|
||||
return !!(node as HasType).type;
|
||||
}
|
||||
|
||||
/** True if has initializer node attached to it. */
|
||||
/* @internal */
|
||||
export function hasInitializer(node: Node): node is HasInitializer {
|
||||
return !!(node as HasInitializer).initializer;
|
||||
}
|
||||
|
||||
/** True if has initializer node attached to it. */
|
||||
/* @internal */
|
||||
export function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer {
|
||||
return hasInitializer(node) && !isForStatement(node) && !isForInStatement(node) && !isForOfStatement(node) && !isJsxAttribute(node);
|
||||
}
|
||||
|
||||
export function isObjectLiteralElement(node: Node): node is ObjectLiteralElement {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.JsxAttribute:
|
||||
case SyntaxKind.JsxSpreadAttribute:
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
case SyntaxKind.ShorthandPropertyAssignment:
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -622,7 +622,7 @@ namespace ts {
|
||||
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return updateForOf(<ForOfStatement>node,
|
||||
(<ForOfStatement>node).awaitModifier,
|
||||
visitNode((<ForOfStatement>node).awaitModifier, visitor, isToken),
|
||||
visitNode((<ForOfStatement>node).initializer, visitor, isForInitializer),
|
||||
visitNode((<ForOfStatement>node).expression, visitor, isExpression),
|
||||
visitNode((<ForOfStatement>node).statement, visitor, isStatement, liftToBlock));
|
||||
|
||||
@ -48,6 +48,15 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createWatchDiagnosticReporterWithColor(system = sys): DiagnosticReporter {
|
||||
return diagnostic => {
|
||||
let output = `[${ formatColorAndReset(new Date().toLocaleTimeString(), ForegroundColorEscapeSequences.Grey) }] `;
|
||||
output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${system.newLine + system.newLine + system.newLine}`;
|
||||
system.write(output);
|
||||
};
|
||||
}
|
||||
|
||||
export function reportDiagnostics(diagnostics: Diagnostic[], reportDiagnostic: DiagnosticReporter): void {
|
||||
for (const diagnostic of diagnostics) {
|
||||
reportDiagnostic(diagnostic);
|
||||
@ -131,7 +140,7 @@ namespace ts {
|
||||
reportWatchDiagnostic?: DiagnosticReporter
|
||||
): WatchingSystemHost {
|
||||
reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system, pretty ? reportDiagnosticWithColorAndContext : reportDiagnosticSimply);
|
||||
reportWatchDiagnostic = reportWatchDiagnostic || createWatchDiagnosticReporter(system);
|
||||
reportWatchDiagnostic = reportWatchDiagnostic || pretty ? createWatchDiagnosticReporterWithColor(system) : createWatchDiagnosticReporter(system);
|
||||
parseConfigFile = parseConfigFile || ts.parseConfigFile;
|
||||
return {
|
||||
system,
|
||||
@ -302,6 +311,8 @@ namespace ts {
|
||||
// There is no extra check needed since we can just rely on the program to decide emit
|
||||
const builder = createBuilder({ getCanonicalFileName, computeHash });
|
||||
|
||||
clearHostScreen();
|
||||
reportWatchDiagnostic(createCompilerDiagnostic(Diagnostics.Starting_compilation_in_watch_mode));
|
||||
synchronizeProgram();
|
||||
|
||||
// Update the wild card directory watch
|
||||
@ -492,10 +503,14 @@ namespace ts {
|
||||
scheduleProgramUpdate();
|
||||
}
|
||||
|
||||
function updateProgram() {
|
||||
function clearHostScreen() {
|
||||
if (watchingHost.system.clearScreen) {
|
||||
watchingHost.system.clearScreen();
|
||||
}
|
||||
}
|
||||
|
||||
function updateProgram() {
|
||||
clearHostScreen();
|
||||
|
||||
timerToUpdateProgram = undefined;
|
||||
reportWatchDiagnostic(createCompilerDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation));
|
||||
|
||||
@ -42,21 +42,29 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
|
||||
const stdio = isWorker ? "pipe" : "inherit";
|
||||
let types: string[];
|
||||
if (fs.existsSync(path.join(cwd, "test.json"))) {
|
||||
const update = cp.spawnSync("git", ["submodule", "update", "--remote"], { cwd, timeout, shell: true, stdio });
|
||||
if (update.status !== 0) throw new Error(`git submodule update for ${directoryName} failed!`);
|
||||
const submoduleDir = path.join(cwd, directoryName);
|
||||
const reset = cp.spawnSync("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir, timeout, shell: true, stdio });
|
||||
if (reset.status !== 0) throw new Error(`git reset for ${directoryName} failed: ${reset.stderr.toString()}`);
|
||||
const clean = cp.spawnSync("git", ["clean", "-f"], { cwd: submoduleDir, timeout, shell: true, stdio });
|
||||
if (clean.status !== 0) throw new Error(`git clean for ${directoryName} failed: ${clean.stderr.toString()}`);
|
||||
const update = cp.spawnSync("git", ["submodule", "update", "--remote", "."], { cwd: submoduleDir, timeout, shell: true, stdio });
|
||||
if (update.status !== 0) throw new Error(`git submodule update for ${directoryName} failed: ${update.stderr.toString()}`);
|
||||
|
||||
const config = JSON.parse(fs.readFileSync(path.join(cwd, "test.json"), { encoding: "utf8" })) as UserConfig;
|
||||
ts.Debug.assert(!!config.types, "Bad format from test.json: Types field must be present.");
|
||||
types = config.types;
|
||||
|
||||
cwd = path.join(cwd, directoryName);
|
||||
cwd = submoduleDir;
|
||||
}
|
||||
if (fs.existsSync(path.join(cwd, "package.json"))) {
|
||||
if (fs.existsSync(path.join(cwd, "package-lock.json"))) {
|
||||
fs.unlinkSync(path.join(cwd, "package-lock.json"));
|
||||
}
|
||||
if (fs.existsSync(path.join(cwd, "node_modules"))) {
|
||||
require("del").sync(path.join(cwd, "node_modules"));
|
||||
}
|
||||
const install = cp.spawnSync(`npm`, ["i"], { cwd, timeout, shell: true, stdio });
|
||||
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed!`);
|
||||
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed: ${install.stderr.toString()}`);
|
||||
}
|
||||
const args = [path.join(__dirname, "tsc.js")];
|
||||
if (types) {
|
||||
|
||||
@ -27,6 +27,7 @@ namespace FourSlash {
|
||||
// The contents of the file (with markers, etc stripped out)
|
||||
content: string;
|
||||
fileName: string;
|
||||
symlinks?: string[];
|
||||
version: number;
|
||||
// File-specific options (name/value pairs)
|
||||
fileOptions: Harness.TestCaseParser.CompilerSettings;
|
||||
@ -106,15 +107,16 @@ namespace FourSlash {
|
||||
// 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
|
||||
const metadataOptionNames = {
|
||||
baselineFile: "BaselineFile",
|
||||
emitThisFile: "emitThisFile", // This flag is used for testing getEmitOutput feature. It allows test-cases to indicate what file to be output in multiple files project
|
||||
fileName: "Filename",
|
||||
resolveReference: "ResolveReference", // This flag is used to specify entry file for resolve file references. The flag is only allow once per test file
|
||||
};
|
||||
const enum MetadataOptionNames {
|
||||
baselineFile = "BaselineFile",
|
||||
emitThisFile = "emitThisFile", // This flag is used for testing getEmitOutput feature. It allows test-cases to indicate what file to be output in multiple files project
|
||||
fileName = "Filename",
|
||||
resolveReference = "ResolveReference", // This flag is used to specify entry file for resolve file references. The flag is only allow once per test file
|
||||
symlink = "Symlink",
|
||||
}
|
||||
|
||||
// List of allowed metadata names
|
||||
const fileMetadataNames = [metadataOptionNames.fileName, metadataOptionNames.emitThisFile, metadataOptionNames.resolveReference];
|
||||
const fileMetadataNames = [MetadataOptionNames.fileName, MetadataOptionNames.emitThisFile, MetadataOptionNames.resolveReference, MetadataOptionNames.symlink];
|
||||
|
||||
function convertGlobalOptionsToCompilerOptions(globalOptions: Harness.TestCaseParser.CompilerSettings): ts.CompilerOptions {
|
||||
const settings: ts.CompilerOptions = { target: ts.ScriptTarget.ES5 };
|
||||
@ -263,7 +265,7 @@ namespace FourSlash {
|
||||
ts.forEach(testData.files, file => {
|
||||
// Create map between fileName and its content for easily looking up when resolveReference flag is specified
|
||||
this.inputFiles.set(file.fileName, file.content);
|
||||
if (ts.getBaseFileName(file.fileName).toLowerCase() === "tsconfig.json") {
|
||||
if (isTsconfig(file)) {
|
||||
const configJson = ts.parseConfigFileTextToJson(file.fileName, file.content);
|
||||
if (configJson.config === undefined) {
|
||||
throw new Error(`Failed to parse test tsconfig.json: ${configJson.error.messageText}`);
|
||||
@ -281,7 +283,7 @@ namespace FourSlash {
|
||||
configFileName = file.fileName;
|
||||
}
|
||||
|
||||
if (!startResolveFileRef && file.fileOptions[metadataOptionNames.resolveReference] === "true") {
|
||||
if (!startResolveFileRef && file.fileOptions[MetadataOptionNames.resolveReference] === "true") {
|
||||
startResolveFileRef = file;
|
||||
}
|
||||
else if (startResolveFileRef) {
|
||||
@ -295,7 +297,7 @@ namespace FourSlash {
|
||||
const host = new Utils.MockParseConfigHost(baseDir, /*ignoreCase*/ false, this.inputFiles);
|
||||
|
||||
const configJsonObj = ts.parseConfigFileTextToJson(configFileName, this.inputFiles.get(configFileName));
|
||||
assert(configJsonObj.config !== undefined);
|
||||
assert.isTrue(configJsonObj.config !== undefined);
|
||||
|
||||
const { options, errors } = ts.parseJsonConfigFileContent(configJsonObj.config, host, baseDir);
|
||||
|
||||
@ -354,6 +356,10 @@ namespace FourSlash {
|
||||
Harness.Compiler.getDefaultLibrarySourceFile().text, /*isRootFile*/ false);
|
||||
}
|
||||
|
||||
for (const file of testData.files) {
|
||||
ts.forEach(file.symlinks, link => this.languageServiceAdapterHost.addSymlink(link, file.fileName));
|
||||
}
|
||||
|
||||
this.formatCodeSettings = {
|
||||
baseIndentSize: 0,
|
||||
indentSize: 4,
|
||||
@ -375,6 +381,7 @@ namespace FourSlash {
|
||||
insertSpaceAfterTypeAssertion: false,
|
||||
placeOpenBraceOnNewLineForFunctions: false,
|
||||
placeOpenBraceOnNewLineForControlBlocks: false,
|
||||
insertSpaceBeforeTypeAnnotation: false
|
||||
};
|
||||
|
||||
// Open the first file by default
|
||||
@ -435,20 +442,19 @@ namespace FourSlash {
|
||||
this.goToPosition(marker.position);
|
||||
}
|
||||
|
||||
public goToEachMarker(action: () => void) {
|
||||
const markers = this.getMarkers();
|
||||
assert(markers.length !== 0);
|
||||
for (const marker of markers) {
|
||||
this.goToMarker(marker);
|
||||
action();
|
||||
public goToEachMarker(markers: ReadonlyArray<Marker>, action: (marker: FourSlash.Marker, index: number) => void) {
|
||||
assert(markers.length);
|
||||
for (let i = 0; i < markers.length; i++) {
|
||||
this.goToMarker(markers[i]);
|
||||
action(markers[i], i);
|
||||
}
|
||||
}
|
||||
|
||||
public goToEachRange(action: () => void) {
|
||||
const ranges = this.getRanges();
|
||||
assert(ranges.length !== 0);
|
||||
assert(ranges.length);
|
||||
for (const range of ranges) {
|
||||
this.goToRangeStart(range);
|
||||
this.selectRange(range);
|
||||
action();
|
||||
}
|
||||
}
|
||||
@ -476,6 +482,11 @@ namespace FourSlash {
|
||||
this.selectionEnd = end.position;
|
||||
}
|
||||
|
||||
public selectRange(range: Range): void {
|
||||
this.goToRangeStart(range);
|
||||
this.selectionEnd = range.end;
|
||||
}
|
||||
|
||||
public moveCaretRight(count = 1) {
|
||||
this.currentCaretPosition += count;
|
||||
this.currentCaretPosition = Math.min(this.currentCaretPosition, this.getFileContent(this.activeFile.fileName).length);
|
||||
@ -505,7 +516,7 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
private raiseError(message: string) {
|
||||
private raiseError(message: string): never {
|
||||
throw new Error(this.messageAtLastKnownMarker(message));
|
||||
}
|
||||
|
||||
@ -653,7 +664,7 @@ namespace FourSlash {
|
||||
this.verifyGoToXPlain(arg0, endMarkerNames, getDefs);
|
||||
}
|
||||
else if (ts.isArray(arg0)) {
|
||||
const pairs: ReadonlyArray<[string | string[], string | string[]]> = arg0;
|
||||
const pairs = arg0 as ReadonlyArray<[string | string[], string | string[]]>;
|
||||
for (const [start, end] of pairs) {
|
||||
this.verifyGoToXPlain(start, end, getDefs);
|
||||
}
|
||||
@ -793,7 +804,7 @@ namespace FourSlash {
|
||||
}
|
||||
|
||||
const entries = this.getCompletionListAtCaret().entries;
|
||||
assert(items.length <= entries.length, `Amount of expected items in completion list [ ${items.length} ] is greater than actual number of items in list [ ${entries.length} ]`);
|
||||
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, (entry, item) => {
|
||||
assert.equal(entry.name, item, `Unexpected item in completion list`);
|
||||
});
|
||||
@ -842,10 +853,10 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionsAt(markerName: string, expected: string[], options?: FourSlashInterface.CompletionsAtOptions) {
|
||||
public verifyCompletionsAt(markerName: string, expected: ReadonlyArray<FourSlashInterface.ExpectedCompletionEntry>, options?: FourSlashInterface.CompletionsAtOptions) {
|
||||
this.goToMarker(markerName);
|
||||
|
||||
const actualCompletions = this.getCompletionListAtCaret();
|
||||
const actualCompletions = this.getCompletionListAtCaret(options);
|
||||
if (!actualCompletions) {
|
||||
this.raiseError(`No completions at position '${this.currentCaretPosition}'.`);
|
||||
}
|
||||
@ -861,13 +872,24 @@ namespace FourSlash {
|
||||
}
|
||||
|
||||
ts.zipWith(actual, expected, (completion, expectedCompletion, index) => {
|
||||
if (completion.name !== expectedCompletion) {
|
||||
const { name, insertText, replacementSpan } = typeof expectedCompletion === "string" ? { name: expectedCompletion, insertText: undefined, replacementSpan: undefined } : expectedCompletion;
|
||||
if (completion.name !== name) {
|
||||
this.raiseError(`Expected completion at index ${index} to be ${expectedCompletion}, got ${completion.name}`);
|
||||
}
|
||||
if (completion.insertText !== insertText) {
|
||||
this.raiseError(`Expected completion insert text at index ${index} to be ${insertText}, got ${completion.insertText}`);
|
||||
}
|
||||
const convertedReplacementSpan = replacementSpan && textSpanFromRange(replacementSpan);
|
||||
try {
|
||||
assert.deepEqual(completion.replacementSpan, convertedReplacementSpan);
|
||||
}
|
||||
catch {
|
||||
this.raiseError(`Expected completion replacementSpan at index ${index} to be ${stringify(convertedReplacementSpan)}, got ${stringify(completion.replacementSpan)}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public verifyCompletionListContains(entryId: ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string, spanIndex?: number, hasAction?: boolean, options?: FourSlashInterface.VerifyCompletionListContainsOptions) {
|
||||
public verifyCompletionListContains(entryId: ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string | { kind?: string, kindModifiers?: string }, spanIndex?: number, hasAction?: boolean, options?: FourSlashInterface.VerifyCompletionListContainsOptions) {
|
||||
const completions = this.getCompletionListAtCaret(options);
|
||||
if (completions) {
|
||||
this.assertItemInCompletionList(completions.entries, entryId, text, documentation, kind, spanIndex, hasAction, options);
|
||||
@ -888,7 +910,7 @@ namespace FourSlash {
|
||||
* @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
|
||||
*/
|
||||
public verifyCompletionListDoesNotContain(entryId: ts.Completions.CompletionEntryIdentifier, expectedText?: string, expectedDocumentation?: string, expectedKind?: string, spanIndex?: number, options?: FourSlashInterface.CompletionsAtOptions) {
|
||||
public verifyCompletionListDoesNotContain(entryId: ts.Completions.CompletionEntryIdentifier, expectedText?: string, expectedDocumentation?: string, expectedKind?: string | { kind?: string, kindModifiers?: string }, spanIndex?: number, options?: FourSlashInterface.CompletionsAtOptions) {
|
||||
let replacementSpan: ts.TextSpan;
|
||||
if (spanIndex !== undefined) {
|
||||
replacementSpan = this.getTextSpanForRangeAtIndex(spanIndex);
|
||||
@ -897,7 +919,7 @@ namespace FourSlash {
|
||||
const completions = this.getCompletionListAtCaret(options);
|
||||
if (completions) {
|
||||
let filterCompletions = completions.entries.filter(e => e.name === entryId.name && e.source === entryId.source);
|
||||
filterCompletions = expectedKind ? filterCompletions.filter(e => e.kind === expectedKind) : filterCompletions;
|
||||
filterCompletions = expectedKind ? filterCompletions.filter(e => e.kind === expectedKind || (typeof expectedKind === "object" && e.kind === expectedKind.kind)) : filterCompletions;
|
||||
filterCompletions = filterCompletions.filter(entry => {
|
||||
const details = this.getCompletionEntryDetails(entry.name);
|
||||
const documentation = details && ts.displayPartsToString(details.documentation);
|
||||
@ -947,7 +969,7 @@ namespace FourSlash {
|
||||
public verifyCompletionEntryDetails(entryName: string, expectedText: string, expectedDocumentation?: string, kind?: string, tags?: ts.JSDocTagInfo[]) {
|
||||
const details = this.getCompletionEntryDetails(entryName);
|
||||
|
||||
assert.isDefined(details, "no completion entry available");
|
||||
assert(details, "no completion entry available");
|
||||
|
||||
assert.equal(ts.displayPartsToString(details.displayParts), expectedText, this.assertionMessageAtLastKnownMarker("completion entry details text"));
|
||||
|
||||
@ -1082,7 +1104,7 @@ namespace FourSlash {
|
||||
|
||||
public verifyRangesReferenceEachOther(ranges?: Range[]) {
|
||||
ranges = ranges || this.getRanges();
|
||||
assert(ranges.length !== 0);
|
||||
assert(ranges.length);
|
||||
for (const range of ranges) {
|
||||
this.verifyReferencesOf(range, ranges);
|
||||
}
|
||||
@ -1368,6 +1390,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
|
||||
public verifyCurrentParameterIsVariable(isVariable: boolean) {
|
||||
const signature = this.getActiveSignatureHelpItem();
|
||||
assert.isOk(signature);
|
||||
assert.equal(isVariable, signature.isVariadic);
|
||||
}
|
||||
|
||||
@ -1562,7 +1585,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
public baselineCurrentFileBreakpointLocations() {
|
||||
let baselineFile = this.testData.globalOptions[metadataOptionNames.baselineFile];
|
||||
let baselineFile = this.testData.globalOptions[MetadataOptionNames.baselineFile];
|
||||
if (!baselineFile) {
|
||||
baselineFile = this.activeFile.fileName.replace(this.basePath + "/breakpointValidation", "bpSpan");
|
||||
baselineFile = baselineFile.replace(ts.Extension.Ts, ".baseline");
|
||||
@ -1581,7 +1604,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
|
||||
const allFourSlashFiles = this.testData.files;
|
||||
for (const file of allFourSlashFiles) {
|
||||
if (file.fileOptions[metadataOptionNames.emitThisFile] === "true") {
|
||||
if (file.fileOptions[MetadataOptionNames.emitThisFile] === "true") {
|
||||
// Find a file with the flag emitThisFile turned on
|
||||
emitFiles.push(file);
|
||||
}
|
||||
@ -1593,7 +1616,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
Harness.Baseline.runBaseline(
|
||||
this.testData.globalOptions[metadataOptionNames.baselineFile],
|
||||
this.testData.globalOptions[MetadataOptionNames.baselineFile],
|
||||
() => {
|
||||
let resultString = "";
|
||||
// Loop through all the emittedFiles and emit them one by one
|
||||
@ -1633,7 +1656,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
public baselineQuickInfo() {
|
||||
let baselineFile = this.testData.globalOptions[metadataOptionNames.baselineFile];
|
||||
let baselineFile = this.testData.globalOptions[MetadataOptionNames.baselineFile];
|
||||
if (!baselineFile) {
|
||||
baselineFile = ts.getBaseFileName(this.activeFile.fileName).replace(ts.Extension.Ts, ".baseline");
|
||||
}
|
||||
@ -1801,7 +1824,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
else if (prevChar === " " && /A-Za-z_/.test(ch)) {
|
||||
/* Completions */
|
||||
this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset, { includeExternalModuleExports: false });
|
||||
this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset, { includeExternalModuleExports: false, includeInsertTextCompletions: false });
|
||||
}
|
||||
|
||||
if (i % checkCadence === 0) {
|
||||
@ -2018,7 +2041,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
const implementations = this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
|
||||
if (negative) {
|
||||
assert(implementations && implementations.length > 0, "Expected at least one implementation but got 0");
|
||||
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");
|
||||
@ -2243,7 +2266,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
|
||||
public baselineCurrentFileNameOrDottedNameSpans() {
|
||||
Harness.Baseline.runBaseline(
|
||||
this.testData.globalOptions[metadataOptionNames.baselineFile],
|
||||
this.testData.globalOptions[MetadataOptionNames.baselineFile],
|
||||
() => {
|
||||
return this.baselineCurrentFileLocations(pos =>
|
||||
this.getNameOrDottedNameSpan(pos));
|
||||
@ -2370,13 +2393,14 @@ Actual: ${stringify(fullActual)}`);
|
||||
*/
|
||||
public getAndApplyCodeActions(errorCode?: number, index?: number) {
|
||||
const fileName = this.activeFile.fileName;
|
||||
this.applyCodeActions(this.getCodeFixActions(fileName, errorCode), index);
|
||||
this.applyCodeActions(this.getCodeFixes(fileName, errorCode), index);
|
||||
}
|
||||
|
||||
public applyCodeActionFromCompletion(markerName: string, options: FourSlashInterface.VerifyCompletionActionOptions) {
|
||||
this.goToMarker(markerName);
|
||||
|
||||
const actualCompletion = this.getCompletionListAtCaret({ includeExternalModuleExports: true }).entries.find(e => e.name === options.name && e.source === options.source);
|
||||
const actualCompletion = this.getCompletionListAtCaret({ includeExternalModuleExports: true, includeInsertTextCompletions: false }).entries.find(e =>
|
||||
e.name === options.name && e.source === options.source);
|
||||
|
||||
if (!actualCompletion.hasAction) {
|
||||
this.raiseError(`Completion for ${options.name} does not have an associated action.`);
|
||||
@ -2423,6 +2447,17 @@ Actual: ${stringify(fullActual)}`);
|
||||
this.verifyRangeIs(expectedText, includeWhiteSpace);
|
||||
}
|
||||
|
||||
public verifyCodeFixAll(options: FourSlashInterface.VerifyCodeFixAllOptions): void {
|
||||
const { fixId, newFileContent } = options;
|
||||
const fixIds = ts.mapDefined(this.getCodeFixes(this.activeFile.fileName), a => a.fixId);
|
||||
ts.Debug.assert(ts.contains(fixIds, fixId), "No available code fix has that group id.", () => `Expected '${fixId}'. Available action ids: ${fixIds}`);
|
||||
const { changes, commands } = this.languageService.getCombinedCodeFix({ type: "file", fileName: this.activeFile.fileName }, fixId, this.formatCodeSettings);
|
||||
assert.deepEqual(commands, options.commands);
|
||||
assert(changes.every(c => 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.
|
||||
@ -2435,7 +2470,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
public verifyFileAfterCodeFix(expectedContents: string, fileName?: string) {
|
||||
fileName = fileName ? fileName : this.activeFile.fileName;
|
||||
|
||||
this.applyCodeActions(this.getCodeFixActions(fileName));
|
||||
this.applyCodeActions(this.getCodeFixes(fileName));
|
||||
|
||||
const actualContents: string = this.getFileContent(fileName);
|
||||
if (this.removeWhitespace(actualContents) !== this.removeWhitespace(expectedContents)) {
|
||||
@ -2445,7 +2480,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
|
||||
public verifyCodeFix(options: FourSlashInterface.VerifyCodeFixOptions) {
|
||||
const fileName = this.activeFile.fileName;
|
||||
const actions = this.getCodeFixActions(fileName, options.errorCode);
|
||||
const actions = this.getCodeFixes(fileName, options.errorCode);
|
||||
let index = options.index;
|
||||
if (index === undefined) {
|
||||
if (!(actions && actions.length === 1)) {
|
||||
@ -2471,7 +2506,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
private verifyNewContent(options: FourSlashInterface.NewContentOptions) {
|
||||
if (options.newFileContent) {
|
||||
if (options.newFileContent !== undefined) {
|
||||
assert(!options.newRangeContent);
|
||||
this.verifyCurrentFileContent(options.newFileContent);
|
||||
}
|
||||
@ -2484,7 +2519,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
* 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 getCodeFixActions(fileName: string, errorCode?: number): ts.CodeAction[] {
|
||||
private getCodeFixes(fileName: string, errorCode?: number): ts.CodeFixAction[] {
|
||||
const diagnosticsForCodeFix = this.getDiagnostics(fileName).map(diagnostic => ({
|
||||
start: diagnostic.start,
|
||||
length: diagnostic.length,
|
||||
@ -2500,7 +2535,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
});
|
||||
}
|
||||
|
||||
private applyCodeActions(actions: ts.CodeAction[], index?: number): void {
|
||||
private applyCodeActions(actions: ReadonlyArray<ts.CodeAction>, index?: number): void {
|
||||
if (index === undefined) {
|
||||
if (!(actions && actions.length === 1)) {
|
||||
this.raiseError(`Should find exactly one codefix, but ${actions ? actions.length : "none"} found. ${actions ? actions.map(a => `${Harness.IO.newLine()} "${a.description}"`) : ""}`);
|
||||
@ -2513,8 +2548,10 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
}
|
||||
|
||||
const changes = actions[index].changes;
|
||||
this.applyChanges(actions[index].changes);
|
||||
}
|
||||
|
||||
private applyChanges(changes: ReadonlyArray<ts.FileTextChanges>): void {
|
||||
for (const change of changes) {
|
||||
this.applyEdits(change.fileName, change.textChanges, /*isFormattingEdit*/ false);
|
||||
}
|
||||
@ -2526,7 +2563,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
this.raiseError("Exactly one range should be specified in the testfile.");
|
||||
}
|
||||
|
||||
const codeFixes = this.getCodeFixActions(this.activeFile.fileName, errorCode);
|
||||
const codeFixes = this.getCodeFixes(this.activeFile.fileName, errorCode);
|
||||
|
||||
if (codeFixes.length === 0) {
|
||||
if (expectedTextArray.length !== 0) {
|
||||
@ -2865,7 +2902,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
public verifyCodeFixAvailable(negative: boolean, info: FourSlashInterface.VerifyCodeFixAvailableOptions[] | undefined) {
|
||||
const codeFixes = this.getCodeFixActions(this.activeFile.fileName);
|
||||
const codeFixes = this.getCodeFixes(this.activeFile.fileName);
|
||||
|
||||
if (negative) {
|
||||
if (codeFixes.length) {
|
||||
@ -3032,7 +3069,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
public printAvailableCodeFixes() {
|
||||
const codeFixes = this.getCodeFixActions(this.activeFile.fileName);
|
||||
const codeFixes = this.getCodeFixes(this.activeFile.fileName);
|
||||
Harness.IO.log(stringify(codeFixes));
|
||||
}
|
||||
|
||||
@ -3070,7 +3107,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
entryId: ts.Completions.CompletionEntryIdentifier,
|
||||
text: string | undefined,
|
||||
documentation: string | undefined,
|
||||
kind: string | undefined,
|
||||
kind: string | undefined | { kind?: string, kindModifiers?: string },
|
||||
spanIndex: number | undefined,
|
||||
hasAction: boolean | undefined,
|
||||
options: FourSlashInterface.VerifyCompletionListContainsOptions | undefined,
|
||||
@ -3104,12 +3141,24 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
|
||||
if (kind !== undefined) {
|
||||
assert.equal(item.kind, kind, this.assertionMessageAtLastKnownMarker("completion item kind for " + entryId));
|
||||
if (typeof kind === "string") {
|
||||
assert.equal(item.kind, kind, this.assertionMessageAtLastKnownMarker("completion item kind for " + entryId));
|
||||
}
|
||||
else {
|
||||
if (kind.kind) {
|
||||
assert.equal(item.kind, kind.kind, this.assertionMessageAtLastKnownMarker("completion item kind for " + entryId));
|
||||
}
|
||||
if (kind.kindModifiers !== undefined) {
|
||||
assert.equal(item.kindModifiers, kind.kindModifiers, this.assertionMessageAtLastKnownMarker("completion item kindModifiers for " + entryId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (spanIndex !== undefined) {
|
||||
const span = this.getTextSpanForRangeAtIndex(spanIndex);
|
||||
assert(TestState.textSpansEqual(span, item.replacementSpan), this.assertionMessageAtLastKnownMarker(stringify(span) + " does not equal " + stringify(item.replacementSpan) + " replacement span for " + entryId));
|
||||
assert.isTrue(TestState.textSpansEqual(span, item.replacementSpan), this.assertionMessageAtLastKnownMarker(stringify(span) + " does not equal " + stringify(item.replacementSpan) + " replacement span for " + entryId));
|
||||
}
|
||||
|
||||
assert.equal(item.hasAction, hasAction);
|
||||
@ -3163,8 +3212,7 @@ Actual: ${stringify(fullActual)}`);
|
||||
private getTextSpanForRangeAtIndex(index: number): ts.TextSpan {
|
||||
const ranges = this.getRanges();
|
||||
if (ranges && ranges.length > index) {
|
||||
const range = ranges[index];
|
||||
return { start: range.start, length: range.end - range.start };
|
||||
return textSpanFromRange(ranges[index]);
|
||||
}
|
||||
else {
|
||||
this.raiseError("Supplied span index: " + index + " does not exist in range list of size: " + (ranges ? 0 : ranges.length));
|
||||
@ -3194,6 +3242,10 @@ Actual: ${stringify(fullActual)}`);
|
||||
}
|
||||
}
|
||||
|
||||
function textSpanFromRange(range: FourSlash.Range): ts.TextSpan {
|
||||
return ts.createTextSpanFromBounds(range.start, range.end);
|
||||
}
|
||||
|
||||
export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string) {
|
||||
const content = Harness.IO.readFile(fileName);
|
||||
runFourSlashTestContent(basePath, testType, content, fileName);
|
||||
@ -3269,12 +3321,21 @@ ${code}
|
||||
// Stuff related to the subfile we're parsing
|
||||
let currentFileContent: string = undefined;
|
||||
let currentFileName = fileName;
|
||||
let currentFileSymlinks: string[] | undefined;
|
||||
let currentFileOptions: { [s: string]: string } = {};
|
||||
|
||||
function resetLocalData() {
|
||||
function nextFile() {
|
||||
const 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 (let line of lines) {
|
||||
@ -3303,8 +3364,7 @@ ${code}
|
||||
const match = optionRegex.exec(line.substr(2));
|
||||
if (match) {
|
||||
const [key, value] = match.slice(1);
|
||||
const fileMetadataNamesIndex = fileMetadataNames.indexOf(key);
|
||||
if (fileMetadataNamesIndex === -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`);
|
||||
@ -3312,24 +3372,22 @@ ${code}
|
||||
globalOptions[key] = value;
|
||||
}
|
||||
else {
|
||||
if (fileMetadataNamesIndex === fileMetadataNames.indexOf(metadataOptionNames.fileName)) {
|
||||
// Found an @FileName directive, if this is not the first then create a new subfile
|
||||
if (currentFileContent) {
|
||||
const file = parseFileContent(currentFileContent, currentFileName, markerPositions, markers, ranges);
|
||||
file.fileOptions = currentFileOptions;
|
||||
switch (key) {
|
||||
case MetadataOptionNames.fileName:
|
||||
// Found an @FileName directive, if this is not the first then create a new subfile
|
||||
if (currentFileContent) {
|
||||
nextFile();
|
||||
}
|
||||
|
||||
// Store result file
|
||||
files.push(file);
|
||||
|
||||
resetLocalData();
|
||||
}
|
||||
|
||||
currentFileName = ts.isRootedDiskPath(value) ? value : basePath + "/" + value;
|
||||
currentFileOptions[key] = value;
|
||||
}
|
||||
else {
|
||||
// Add other fileMetadata flag
|
||||
currentFileOptions[key] = value;
|
||||
currentFileName = ts.isRootedDiskPath(value) ? value : basePath + "/" + value;
|
||||
currentFileOptions[key] = value;
|
||||
break;
|
||||
case MetadataOptionNames.symlink:
|
||||
currentFileSymlinks = ts.append(currentFileSymlinks, value);
|
||||
break;
|
||||
default:
|
||||
// Add other fileMetadata flag
|
||||
currentFileOptions[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3341,19 +3399,13 @@ ${code}
|
||||
else {
|
||||
// Empty line or code line, terminate current subfile if there is one
|
||||
if (currentFileContent) {
|
||||
const file = parseFileContent(currentFileContent, currentFileName, markerPositions, markers, ranges);
|
||||
file.fileOptions = currentFileOptions;
|
||||
|
||||
// Store result file
|
||||
files.push(file);
|
||||
|
||||
resetLocalData();
|
||||
nextFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @Filename is the only directive that can be used in a test that contains tsconfig.json file.
|
||||
if (containTSConfigJson(files)) {
|
||||
if (files.some(isTsconfig)) {
|
||||
let directive = getNonFileNameOptionInFileList(files);
|
||||
if (!directive) {
|
||||
directive = getNonFileNameOptionInObject(globalOptions);
|
||||
@ -3372,8 +3424,8 @@ ${code}
|
||||
};
|
||||
}
|
||||
|
||||
function containTSConfigJson(files: FourSlashFile[]): boolean {
|
||||
return ts.forEach(files, f => f.fileOptions.Filename === "tsconfig.json");
|
||||
function isTsconfig(file: FourSlashFile): boolean {
|
||||
return ts.getBaseFileName(file.fileName).toLowerCase() === "tsconfig.json";
|
||||
}
|
||||
|
||||
function getNonFileNameOptionInFileList(files: FourSlashFile[]): string {
|
||||
@ -3382,7 +3434,7 @@ ${code}
|
||||
|
||||
function getNonFileNameOptionInObject(optionObject: { [s: string]: string }): string {
|
||||
for (const option in optionObject) {
|
||||
if (option !== metadataOptionNames.fileName) {
|
||||
if (option !== MetadataOptionNames.fileName) {
|
||||
return option;
|
||||
}
|
||||
}
|
||||
@ -3744,8 +3796,11 @@ namespace FourSlashInterface {
|
||||
this.state.goToMarker(name);
|
||||
}
|
||||
|
||||
public eachMarker(action: () => void) {
|
||||
this.state.goToEachMarker(action);
|
||||
public eachMarker(markers: ReadonlyArray<string>, action: (marker: FourSlash.Marker, index: number) => void): void;
|
||||
public eachMarker(action: (marker: FourSlash.Marker, index: number) => void): void;
|
||||
public eachMarker(a: ReadonlyArray<string> | ((marker: FourSlash.Marker, index: number) => void), b?: (marker: FourSlash.Marker, index: number) => void): void {
|
||||
const markers = typeof a === "function" ? this.state.getMarkers() : a.map(m => this.state.getMarkerByName(m));
|
||||
this.state.goToEachMarker(markers, typeof a === "function" ? a : b);
|
||||
}
|
||||
|
||||
public rangeStart(range: FourSlash.Range) {
|
||||
@ -3785,6 +3840,10 @@ namespace FourSlashInterface {
|
||||
public select(startMarker: string, endMarker: string) {
|
||||
this.state.select(startMarker, endMarker);
|
||||
}
|
||||
|
||||
public selectRange(range: FourSlash.Range): void {
|
||||
this.state.selectRange(range);
|
||||
}
|
||||
}
|
||||
|
||||
export class VerifyNegatable {
|
||||
@ -3820,7 +3879,7 @@ namespace FourSlashInterface {
|
||||
|
||||
// Verifies the completion list contains the specified symbol. The
|
||||
// completion list is brought up if necessary
|
||||
public completionListContains(entryId: string | ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string, spanIndex?: number, hasAction?: boolean, options?: VerifyCompletionListContainsOptions) {
|
||||
public completionListContains(entryId: string | ts.Completions.CompletionEntryIdentifier, text?: string, documentation?: string, kind?: string | { kind?: string, kindModifiers?: string }, spanIndex?: number, hasAction?: boolean, options?: VerifyCompletionListContainsOptions) {
|
||||
if (typeof entryId === "string") {
|
||||
entryId = { name: entryId, source: undefined };
|
||||
}
|
||||
@ -3932,7 +3991,7 @@ namespace FourSlashInterface {
|
||||
super(state);
|
||||
}
|
||||
|
||||
public completionsAt(markerName: string, completions: string[], options?: CompletionsAtOptions) {
|
||||
public completionsAt(markerName: string, completions: ReadonlyArray<ExpectedCompletionEntry>, options?: CompletionsAtOptions) {
|
||||
this.state.verifyCompletionsAt(markerName, completions, options);
|
||||
}
|
||||
|
||||
@ -4143,6 +4202,10 @@ namespace FourSlashInterface {
|
||||
this.state.verifyRangeAfterCodeFix(expectedText, includeWhiteSpace, errorCode, index);
|
||||
}
|
||||
|
||||
public codeFixAll(options: VerifyCodeFixAllOptions): void {
|
||||
this.state.verifyCodeFixAll(options);
|
||||
}
|
||||
|
||||
public fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, actionName: string, formattingOptions?: ts.FormatCodeSettings): void {
|
||||
this.state.verifyFileAfterApplyingRefactorAtMarker(markerName, expectedContent, refactorNameToApply, actionName, formattingOptions);
|
||||
}
|
||||
@ -4552,6 +4615,7 @@ namespace FourSlashInterface {
|
||||
newContent: string;
|
||||
}
|
||||
|
||||
export type ExpectedCompletionEntry = string | { name: string, insertText?: string, replacementSpan?: FourSlash.Range };
|
||||
export interface CompletionsAtOptions extends ts.GetCompletionsAtPositionOptions {
|
||||
isNewIdentifierLocation?: boolean;
|
||||
}
|
||||
@ -4578,6 +4642,12 @@ namespace FourSlashInterface {
|
||||
commands?: ts.CodeActionCommand[];
|
||||
}
|
||||
|
||||
export interface VerifyCodeFixAllOptions {
|
||||
fixId: string;
|
||||
newFileContent: string;
|
||||
commands: ReadonlyArray<{}>;
|
||||
}
|
||||
|
||||
export interface VerifyRefactorOptions {
|
||||
name: string;
|
||||
actionName: string;
|
||||
|
||||
@ -23,60 +23,39 @@
|
||||
/// <reference path="virtualFileSystem.ts" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="mocha" />
|
||||
/// <reference types="chai" />
|
||||
|
||||
|
||||
// Block scoped definitions work poorly for global variables, temporarily enable var
|
||||
/* tslint:disable:no-var-keyword */
|
||||
|
||||
function assert(expr: boolean, msg?: string | (() => string)): void {
|
||||
if (!expr) {
|
||||
throw new Error(typeof msg === "string" ? msg : msg());
|
||||
}
|
||||
}
|
||||
namespace assert {
|
||||
export function isFalse(expr: boolean, msg = "Expected value to be false."): void {
|
||||
assert(!expr, msg);
|
||||
}
|
||||
export function equal<T>(a: T, b: T, msg = "Expected values to be equal."): void {
|
||||
assert(a === b, msg);
|
||||
}
|
||||
export function notEqual<T>(a: T, b: T, msg = "Expected values to not be equal."): void {
|
||||
assert(a !== b, msg);
|
||||
}
|
||||
export function isDefined(x: {} | null | undefined, msg = "Expected value to be defined."): void {
|
||||
assert(x !== undefined && x !== null, msg);
|
||||
}
|
||||
export function isUndefined(x: {} | null | undefined, msg = "Expected value to be undefined."): void {
|
||||
assert(x === undefined, msg);
|
||||
}
|
||||
export function deepEqual<T>(a: T, b: T, msg?: string): void {
|
||||
assert(isDeepEqual(a, b), msg || (() => `Expected values to be deeply equal:\nExpected:\n${JSON.stringify(a, undefined, 4)}\nActual:\n${JSON.stringify(b, undefined, 4)}`));
|
||||
}
|
||||
export function lengthOf(a: ReadonlyArray<{}>, length: number, msg = "Expected length to match."): void {
|
||||
assert(a.length === length, msg);
|
||||
}
|
||||
export function throws(cb: () => void, msg = "Expected callback to throw"): void {
|
||||
let threw = false;
|
||||
try {
|
||||
cb();
|
||||
}
|
||||
catch {
|
||||
threw = true;
|
||||
}
|
||||
assert(threw, msg);
|
||||
}
|
||||
// this will work in the browser via browserify
|
||||
var _chai: typeof chai = require("chai");
|
||||
var assert: typeof _chai.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 = (expr, msg) => { if (expr as any as boolean !== false) throw new Error(msg); };
|
||||
|
||||
function isDeepEqual<T>(a: T, b: T): boolean {
|
||||
if (a === b) {
|
||||
return true;
|
||||
const assertDeepImpl = assert.deepEqual;
|
||||
assert.deepEqual = (a, b, msg) => {
|
||||
if (ts.isArray(a) && ts.isArray(b)) {
|
||||
assertDeepImpl(arrayExtraKeysObject(a), arrayExtraKeysObject(b), "Array extra keys differ");
|
||||
}
|
||||
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) {
|
||||
return false;
|
||||
assertDeepImpl(a, b, msg);
|
||||
|
||||
function arrayExtraKeysObject(a: ReadonlyArray<{} | null | undefined>): object {
|
||||
const obj: { [key: string]: {} | null | undefined } = {};
|
||||
for (const key in a) {
|
||||
if (Number.isNaN(Number(key))) {
|
||||
obj[key] = a[key];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
const aKeys = Object.keys(a).sort();
|
||||
const bKeys = Object.keys(b).sort();
|
||||
return aKeys.length === bKeys.length && aKeys.every((key, i) => bKeys[i] === key && isDeepEqual((a as any)[key], (b as any)[key]));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
declare var __dirname: string; // Node-specific
|
||||
var global: NodeJS.Global = <any>Function("return this").call(undefined);
|
||||
|
||||
@ -84,7 +63,7 @@ declare var window: {};
|
||||
declare var XMLHttpRequest: {
|
||||
new(): XMLHttpRequest;
|
||||
};
|
||||
interface XMLHttpRequest {
|
||||
interface XMLHttpRequest {
|
||||
readonly readyState: number;
|
||||
readonly responseText: string;
|
||||
readonly status: number;
|
||||
@ -389,8 +368,8 @@ namespace Utils {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!!array1, "array1");
|
||||
assert(!!array2, "array2");
|
||||
assert(array1, "array1");
|
||||
assert(array2, "array2");
|
||||
|
||||
assert.equal(array1.length, array2.length, "array1.length !== array2.length");
|
||||
|
||||
@ -413,8 +392,8 @@ namespace Utils {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!!node1, "node1");
|
||||
assert(!!node2, "node2");
|
||||
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");
|
||||
@ -444,8 +423,8 @@ namespace Utils {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(!!array1, "array1");
|
||||
assert(!!array2, "array2");
|
||||
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");
|
||||
@ -895,7 +874,7 @@ namespace Harness {
|
||||
// Cache of lib files from "built/local"
|
||||
let libFileNameSourceFileMap: ts.Map<ts.SourceFile> | undefined;
|
||||
|
||||
// Cache of lib files from "tests/lib/"
|
||||
// Cache of lib files from "tests/lib/"
|
||||
const testLibFileNameSourceFileMap = ts.createMap<ts.SourceFile>();
|
||||
const es6TestLibFileNameSourceFileMap = ts.createMap<ts.SourceFile>();
|
||||
|
||||
@ -1301,7 +1280,7 @@ namespace Harness {
|
||||
|
||||
function findResultCodeFile(fileName: string) {
|
||||
const sourceFile = result.program.getSourceFile(fileName);
|
||||
assert.isDefined(sourceFile, "Program has no source file with name '" + fileName + "'");
|
||||
assert(sourceFile, "Program has no source file with name '" + fileName + "'");
|
||||
// Is this file going to be emitted separately
|
||||
let sourceFileName: string;
|
||||
const outFile = options.outFile || options.out;
|
||||
@ -1984,7 +1963,7 @@ namespace Harness {
|
||||
const data = testUnitData[i];
|
||||
if (ts.getBaseFileName(data.name).toLowerCase() === "tsconfig.json") {
|
||||
const configJson = ts.parseJsonText(data.name, data.content);
|
||||
assert(configJson.endOfFileToken !== undefined);
|
||||
assert.isTrue(configJson.endOfFileToken !== undefined);
|
||||
let baseDir = ts.normalizePath(ts.getDirectoryPath(data.name));
|
||||
if (rootDir) {
|
||||
baseDir = ts.getNormalizedAbsolutePath(baseDir, rootDir);
|
||||
|
||||
@ -122,7 +122,7 @@ namespace Harness.LanguageService {
|
||||
getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo;
|
||||
}
|
||||
|
||||
export class LanguageServiceAdapterHost {
|
||||
export abstract class LanguageServiceAdapterHost {
|
||||
public typesRegistry: ts.Map<void> | undefined;
|
||||
protected virtualFileSystem: Utils.VirtualFileSystem = new Utils.VirtualFileSystem(virtualFileSystemRoot, /*useCaseSensitiveFilenames*/false);
|
||||
|
||||
@ -166,6 +166,8 @@ namespace Harness.LanguageService {
|
||||
throw new Error("No script with name '" + fileName + "'");
|
||||
}
|
||||
|
||||
public abstract addSymlink(from: string, target: string): void;
|
||||
|
||||
public openFile(_fileName: string, _content?: string, _scriptKindName?: string): void { /*overridden*/ }
|
||||
|
||||
/**
|
||||
@ -174,13 +176,16 @@ namespace Harness.LanguageService {
|
||||
*/
|
||||
public positionToLineAndCharacter(fileName: string, position: number): ts.LineAndCharacter {
|
||||
const script: ScriptInfo = this.getScriptInfo(fileName);
|
||||
assert(!!script);
|
||||
assert.isOk(script);
|
||||
|
||||
return ts.computeLineAndCharacterOfPosition(script.getLineMap(), position);
|
||||
}
|
||||
}
|
||||
|
||||
/// Native adapter
|
||||
class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts.LanguageServiceHost {
|
||||
class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts.LanguageServiceHost, LanguageServiceAdapterHost {
|
||||
symlinks = ts.createMap<string>();
|
||||
|
||||
isKnownTypesPackageName(name: string): boolean {
|
||||
return this.typesRegistry && this.typesRegistry.has(name);
|
||||
}
|
||||
@ -211,13 +216,16 @@ namespace Harness.LanguageService {
|
||||
}
|
||||
|
||||
directoryExists(dirName: string): boolean {
|
||||
if (ts.forEachEntry(this.symlinks, (_, key) => ts.forSomeAncestorDirectory(key, ancestor => ancestor === dirName))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const fileEntry = this.virtualFileSystem.traversePath(dirName);
|
||||
return fileEntry && fileEntry.isDirectory();
|
||||
}
|
||||
|
||||
fileExists(fileName: string): boolean {
|
||||
const script = this.getScriptSnapshot(fileName);
|
||||
return script !== undefined;
|
||||
return this.symlinks.has(fileName) || this.getScriptSnapshot(fileName) !== undefined;
|
||||
}
|
||||
readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[] {
|
||||
return ts.matchFiles(path, extensions, exclude, include,
|
||||
@ -227,9 +235,19 @@ namespace Harness.LanguageService {
|
||||
(p) => this.virtualFileSystem.getAccessibleFileSystemEntries(p));
|
||||
}
|
||||
readFile(path: string): string | undefined {
|
||||
const target = this.symlinks.get(path);
|
||||
if (target !== undefined) {
|
||||
return this.readFile(target);
|
||||
}
|
||||
|
||||
const snapshot = this.getScriptSnapshot(path);
|
||||
return snapshot.getText(0, snapshot.getLength());
|
||||
}
|
||||
addSymlink(from: string, target: string) { this.symlinks.set(from, target); }
|
||||
realpath(path: string): string {
|
||||
const target = this.symlinks.get(path);
|
||||
return target === undefined ? path : target;
|
||||
}
|
||||
getTypeRootsVersion() {
|
||||
return 0;
|
||||
}
|
||||
@ -245,7 +263,7 @@ namespace Harness.LanguageService {
|
||||
constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) {
|
||||
this.host = new NativeLanguageServiceHost(cancellationToken, options);
|
||||
}
|
||||
getHost() { return this.host; }
|
||||
getHost(): LanguageServiceAdapterHost { return this.host; }
|
||||
getLanguageService(): ts.LanguageService { return ts.createLanguageService(this.host); }
|
||||
getClassifier(): ts.Classifier { return ts.createClassifier(); }
|
||||
getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo { return ts.preProcessFile(fileContents, /* readImportFiles */ true, ts.hasJavaScriptFileExtension(fileName)); }
|
||||
@ -258,6 +276,8 @@ namespace Harness.LanguageService {
|
||||
public getModuleResolutionsForFile: (fileName: string) => string;
|
||||
public getTypeReferenceDirectiveResolutionsForFile: (fileName: string) => string;
|
||||
|
||||
addSymlink() { return ts.notImplemented(); }
|
||||
|
||||
constructor(preprocessToResolve: boolean, cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) {
|
||||
super(cancellationToken, options);
|
||||
this.nativeHost = new NativeLanguageServiceHost(cancellationToken, options);
|
||||
@ -359,7 +379,7 @@ namespace Harness.LanguageService {
|
||||
classification: parseInt(result[i + 1])
|
||||
};
|
||||
|
||||
assert(t.length > 0, "Result length should be greater than 0, got :" + t.length);
|
||||
assert.isTrue(t.length > 0, "Result length should be greater than 0, got :" + t.length);
|
||||
position += t.length;
|
||||
}
|
||||
const finalLexState = parseInt(result[result.length - 1]);
|
||||
@ -502,9 +522,10 @@ namespace Harness.LanguageService {
|
||||
getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): ts.TextSpan {
|
||||
return unwrapJSONCallResult(this.shim.getSpanOfEnclosingComment(fileName, position, onlyMultiLine));
|
||||
}
|
||||
getCodeFixesAtPosition(): ts.CodeAction[] {
|
||||
getCodeFixesAtPosition(): never {
|
||||
throw new Error("Not supported on the shim.");
|
||||
}
|
||||
getCombinedCodeFix = ts.notImplemented;
|
||||
applyCodeActionCommand = ts.notImplemented;
|
||||
getCodeFixDiagnostics(): ts.Diagnostic[] {
|
||||
throw new Error("Not supported on the shim.");
|
||||
|
||||
@ -9,6 +9,8 @@ namespace Harness.Parallel.Host {
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "exit", listener: (code: number, signal: string) => void): this;
|
||||
on(event: "message", listener: (message: ParallelClientMessage) => void): this;
|
||||
kill(signal?: string): void;
|
||||
currentTasks?: {file: string}[]; // Custom monkeypatch onto child process handle
|
||||
}
|
||||
|
||||
interface ProgressBarsOptions {
|
||||
@ -134,6 +136,11 @@ namespace Harness.Parallel.Host {
|
||||
const newPerfData: {[testHash: string]: number} = {};
|
||||
|
||||
const workers: ChildProcessPartial[] = [];
|
||||
const defaultTimeout = globalTimeout !== undefined
|
||||
? globalTimeout
|
||||
: mocha && mocha.suite && mocha.suite._timeout
|
||||
? mocha.suite._timeout
|
||||
: 20000; // 20 seconds
|
||||
let closedWorkers = 0;
|
||||
for (let i = 0; i < workerCount; i++) {
|
||||
// TODO: Just send the config over the IPC channel or in the command line arguments
|
||||
@ -141,6 +148,14 @@ namespace Harness.Parallel.Host {
|
||||
const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`);
|
||||
Harness.IO.writeFile(configPath, JSON.stringify(config));
|
||||
const child = fork(__filename, [`--config="${configPath}"`]);
|
||||
let currentTimeout = defaultTimeout;
|
||||
const killChild = () => {
|
||||
child.kill();
|
||||
console.error(`Worker exceeded ${currentTimeout}ms timeout ${child.currentTasks && child.currentTasks.length ? `while running test '${child.currentTasks[0].file}'.` : `during test setup.`}`);
|
||||
return process.exit(2);
|
||||
};
|
||||
let timer = setTimeout(killChild, currentTimeout);
|
||||
const timeoutStack: number[] = [];
|
||||
child.on("error", err => {
|
||||
console.error("Unexpected error in child process:");
|
||||
console.error(err);
|
||||
@ -160,8 +175,25 @@ namespace Harness.Parallel.Host {
|
||||
Stack: ${data.payload.stack}`);
|
||||
return process.exit(2);
|
||||
}
|
||||
case "timeout": {
|
||||
clearTimeout(timer);
|
||||
if (data.payload.duration === "reset") {
|
||||
currentTimeout = timeoutStack.pop() || defaultTimeout;
|
||||
}
|
||||
else {
|
||||
timeoutStack.push(currentTimeout);
|
||||
currentTimeout = data.payload.duration;
|
||||
}
|
||||
timer = setTimeout(killChild, currentTimeout); // Reset timeout on timeout update, for when a timeout changes while a suite is executing
|
||||
break;
|
||||
}
|
||||
case "progress":
|
||||
case "result": {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(killChild, currentTimeout);
|
||||
if (child.currentTasks) {
|
||||
child.currentTasks.shift();
|
||||
}
|
||||
totalPassing += data.payload.passing;
|
||||
if (data.payload.errors.length) {
|
||||
errorResults = errorResults.concat(data.payload.errors);
|
||||
@ -195,6 +227,7 @@ namespace Harness.Parallel.Host {
|
||||
while (tasks.length && taskList.reduce((p, c) => p + c.size, 0) < chunkSize) {
|
||||
taskList.push(tasks.pop());
|
||||
}
|
||||
child.currentTasks = taskList;
|
||||
if (taskList.length === 1) {
|
||||
child.send({ type: "test", payload: taskList[0] });
|
||||
}
|
||||
@ -252,18 +285,22 @@ namespace Harness.Parallel.Host {
|
||||
for (const worker of workers) {
|
||||
const payload = batches.pop();
|
||||
if (payload) {
|
||||
worker.currentTasks = payload;
|
||||
worker.send({ type: "batch", payload });
|
||||
}
|
||||
else { // Out of batches, send off just one test
|
||||
const payload = tasks.pop();
|
||||
ts.Debug.assert(!!payload); // The reserve kept above should ensure there is always an initial task available, even in suboptimal scenarios
|
||||
worker.currentTasks = [payload];
|
||||
worker.send({ type: "test", payload });
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < workerCount; i++) {
|
||||
workers[i].send({ type: "test", payload: tasks.pop() });
|
||||
const task = tasks.pop();
|
||||
workers[i].currentTasks = [task];
|
||||
workers[i].send({ type: "test", payload: task });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,5 +10,6 @@ namespace Harness.Parallel {
|
||||
export type ErrorInfo = ParallelErrorMessage["payload"] & { name: string[] };
|
||||
export type ParallelResultMessage = { type: "result", payload: { passing: number, errors: ErrorInfo[], duration: number, runner: TestRunnerKind | "unittest", file: string } } | never;
|
||||
export type ParallelBatchProgressMessage = { type: "progress", payload: ParallelResultMessage["payload"] } | never;
|
||||
export type ParallelClientMessage = ParallelErrorMessage | ParallelResultMessage | ParallelBatchProgressMessage;
|
||||
export type ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: number | "reset" } } | never;
|
||||
export type ParallelClientMessage = ParallelErrorMessage | ParallelResultMessage | ParallelBatchProgressMessage | ParallelTimeoutChangeMessage;
|
||||
}
|
||||
@ -36,11 +36,28 @@ namespace Harness.Parallel.Worker {
|
||||
}) as Mocha.ITestDefinition;
|
||||
}
|
||||
|
||||
function setTimeoutAndExecute(timeout: number | undefined, f: () => void) {
|
||||
if (timeout !== undefined) {
|
||||
const timeoutMsg: ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: timeout } };
|
||||
process.send(timeoutMsg);
|
||||
}
|
||||
f();
|
||||
if (timeout !== undefined) {
|
||||
// Reset timeout
|
||||
const timeoutMsg: ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: "reset" } };
|
||||
process.send(timeoutMsg);
|
||||
}
|
||||
}
|
||||
|
||||
function executeSuiteCallback(name: string, callback: MochaCallback) {
|
||||
let timeout: number;
|
||||
const fakeContext: Mocha.ISuiteCallbackContext = {
|
||||
retries() { return this; },
|
||||
slow() { return this; },
|
||||
timeout() { return this; },
|
||||
timeout(n) {
|
||||
timeout = n as number;
|
||||
return this;
|
||||
},
|
||||
};
|
||||
namestack.push(name);
|
||||
let beforeFunc: Callable;
|
||||
@ -71,7 +88,10 @@ namespace Harness.Parallel.Worker {
|
||||
finally {
|
||||
beforeFunc = undefined;
|
||||
}
|
||||
testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind));
|
||||
|
||||
setTimeoutAndExecute(timeout, () => {
|
||||
testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind));
|
||||
});
|
||||
|
||||
try {
|
||||
if (afterFunc) {
|
||||
@ -103,9 +123,15 @@ namespace Harness.Parallel.Worker {
|
||||
}
|
||||
|
||||
function executeTestCallback(name: string, callback: MochaCallback) {
|
||||
let timeout: number;
|
||||
const fakeContext: Mocha.ITestCallbackContext = {
|
||||
skip() { return this; },
|
||||
timeout() { return this; },
|
||||
timeout(n) {
|
||||
timeout = n as number;
|
||||
const timeoutMsg: ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: timeout } };
|
||||
process.send(timeoutMsg);
|
||||
return this;
|
||||
},
|
||||
retries() { return this; },
|
||||
slow() { return this; },
|
||||
};
|
||||
@ -131,6 +157,10 @@ namespace Harness.Parallel.Worker {
|
||||
}
|
||||
finally {
|
||||
namestack.pop();
|
||||
if (timeout !== undefined) {
|
||||
const timeoutMsg: ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: "reset" } };
|
||||
process.send(timeoutMsg);
|
||||
}
|
||||
}
|
||||
passing++;
|
||||
}
|
||||
@ -157,6 +187,10 @@ namespace Harness.Parallel.Worker {
|
||||
}
|
||||
finally {
|
||||
namestack.pop();
|
||||
if (timeout !== undefined) {
|
||||
const timeoutMsg: ParallelTimeoutChangeMessage = { type: "timeout", payload: { duration: "reset" } };
|
||||
process.send(timeoutMsg);
|
||||
}
|
||||
}
|
||||
if (!completed) {
|
||||
errors.push({ error: "Test completes asynchronously, which is unsupported by the parallel harness", stack: "", name: [...namestack] });
|
||||
|
||||
@ -186,7 +186,7 @@ class ProjectRunner extends RunnerBase {
|
||||
getCanonicalFileName: Harness.Compiler.getCanonicalFileName,
|
||||
useCaseSensitiveFileNames: () => Harness.IO.useCaseSensitiveFileNames(),
|
||||
getNewLine: () => Harness.IO.newLine(),
|
||||
fileExists: fileName => fileName === Harness.Compiler.defaultLibFileName || getSourceFileText(fileName) !== undefined,
|
||||
fileExists: fileName => fileName === Harness.Compiler.defaultLibFileName || getSourceFileText(fileName) !== undefined,
|
||||
readFile: fileName => Harness.IO.readFile(fileName),
|
||||
getDirectories: path => Harness.IO.getDirectories(path)
|
||||
};
|
||||
|
||||
@ -100,6 +100,7 @@ interface TestConfig {
|
||||
runners?: string[];
|
||||
runUnitTests?: boolean;
|
||||
noColors?: boolean;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
interface TaskSet {
|
||||
@ -108,12 +109,16 @@ interface TaskSet {
|
||||
}
|
||||
|
||||
let configOption: string;
|
||||
let globalTimeout: number;
|
||||
function handleTestConfig() {
|
||||
if (testConfigContent !== "") {
|
||||
const testConfig = <TestConfig>JSON.parse(testConfigContent);
|
||||
if (testConfig.light) {
|
||||
Harness.lightMode = true;
|
||||
}
|
||||
if (testConfig.timeout) {
|
||||
globalTimeout = testConfig.timeout;
|
||||
}
|
||||
runUnitTests = testConfig.runUnitTests;
|
||||
if (testConfig.workerCount) {
|
||||
workerCount = +testConfig.workerCount;
|
||||
|
||||
@ -285,10 +285,10 @@ namespace Harness.SourceMapRecorder {
|
||||
}
|
||||
|
||||
export function recordNewSourceFileSpan(sourceMapSpan: ts.SourceMapSpan, newSourceFileCode: string) {
|
||||
assert(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");
|
||||
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(spansOnSingleLine.length === 1);
|
||||
assert.isTrue(spansOnSingleLine.length === 1);
|
||||
sourceMapRecorder.WriteLine("-------------------------------------------------------------------");
|
||||
sourceMapRecorder.WriteLine("emittedFile:" + jsFile.fileName);
|
||||
sourceMapRecorder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]);
|
||||
@ -331,7 +331,7 @@ namespace Harness.SourceMapRecorder {
|
||||
function getMarkerId(markerIndex: number) {
|
||||
let markerId = "";
|
||||
if (spanMarkerContinues) {
|
||||
assert(markerIndex === 0);
|
||||
assert.isTrue(markerIndex === 0);
|
||||
markerId = "1->";
|
||||
}
|
||||
else {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"outFile": "../../built/local/run.js",
|
||||
"declaration": false,
|
||||
"types": [
|
||||
"node", "mocha"
|
||||
"node", "mocha", "chai"
|
||||
],
|
||||
"lib": [
|
||||
"es6",
|
||||
@ -108,6 +108,7 @@
|
||||
"./unittests/reuseProgramStructure.ts",
|
||||
"./unittests/moduleResolution.ts",
|
||||
"./unittests/tsconfigParsing.ts",
|
||||
"./unittests/asserts.ts",
|
||||
"./unittests/builder.ts",
|
||||
"./unittests/commandLineParsing.ts",
|
||||
"./unittests/configurationExtension.ts",
|
||||
|
||||
11
src/harness/unittests/asserts.ts
Normal file
11
src/harness/unittests/asserts.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
namespace ts {
|
||||
describe("assert", () => {
|
||||
it("deepEqual", () => {
|
||||
assert.throws(() => assert.deepEqual(createNodeArray([createIdentifier("A")]), createNodeArray([createIdentifier("B")])));
|
||||
assert.throws(() => assert.deepEqual(createNodeArray([], /*hasTrailingComma*/ true), createNodeArray([], /*hasTrailingComma*/ false)));
|
||||
assert.deepEqual(createNodeArray([createIdentifier("A")], /*hasTrailingComma*/ true), createNodeArray([createIdentifier("A")], /*hasTrailingComma*/ true));
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -43,7 +43,7 @@ namespace ts {
|
||||
});
|
||||
});
|
||||
|
||||
function makeAssertChanges(getProgram: () => Program): (fileNames: ReadonlyArray<string>) => void {
|
||||
function makeAssertChanges(getProgram: () => Program): (fileNames: ReadonlyArray<string>) => void {
|
||||
const builder = createBuilder({
|
||||
getCanonicalFileName: identity,
|
||||
computeHash: identity
|
||||
|
||||
@ -12,7 +12,7 @@ namespace ts {
|
||||
|
||||
const parsedErrors = parsed.errors;
|
||||
const expectedErrors = expectedParsedCommandLine.errors;
|
||||
assert(parsedErrors.length === expectedErrors.length, `Expected error: ${JSON.stringify(expectedErrors)}. Actual error: ${JSON.stringify(parsedErrors)}.`);
|
||||
assert.isTrue(parsedErrors.length === expectedErrors.length, `Expected error: ${JSON.stringify(expectedErrors)}. Actual error: ${JSON.stringify(parsedErrors)}.`);
|
||||
for (let i = 0; i < parsedErrors.length; i++) {
|
||||
const parsedError = parsedErrors[i];
|
||||
const expectedError = expectedErrors[i];
|
||||
@ -23,7 +23,7 @@ namespace ts {
|
||||
|
||||
const parsedFileNames = parsed.fileNames;
|
||||
const expectedFileNames = expectedParsedCommandLine.fileNames;
|
||||
assert(parsedFileNames.length === expectedFileNames.length, `Expected fileNames: [${JSON.stringify(expectedFileNames)}]. Actual fileNames: [${JSON.stringify(parsedFileNames)}].`);
|
||||
assert.isTrue(parsedFileNames.length === expectedFileNames.length, `Expected fileNames: [${JSON.stringify(expectedFileNames)}]. Actual fileNames: [${JSON.stringify(parsedFileNames)}].`);
|
||||
for (let i = 0; i < parsedFileNames.length; i++) {
|
||||
const parsedFileName = parsedFileNames[i];
|
||||
const expectedFileName = expectedFileNames[i];
|
||||
@ -60,7 +60,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5,invalidOption", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@ -263,7 +263,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5,", "es7", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
@ -283,7 +283,7 @@ namespace ts {
|
||||
assertParseResult(["--lib", "es5, ", "es7", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
|
||||
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ namespace ts.projectSystem {
|
||||
|
||||
const actualResultSingleProjectFileNameList = actualResultSingleProject.fileNames.sort();
|
||||
const expectedResultSingleProjectFileNameList = map(expectedResultSingleProject.files, f => f.path).sort();
|
||||
assert(
|
||||
assert.isTrue(
|
||||
arrayIsEqualTo(actualResultSingleProjectFileNameList, expectedResultSingleProjectFileNameList),
|
||||
`For project ${actualResultSingleProject.projectFileName}, the actual result is ${actualResultSingleProjectFileNameList}, while expected ${expectedResultSingleProjectFileNameList}`);
|
||||
}
|
||||
@ -563,7 +563,7 @@ namespace ts.projectSystem {
|
||||
session.executeCommand(compileFileRequest);
|
||||
|
||||
const expectedEmittedFileName = "/a/b/f1.js";
|
||||
assert(host.fileExists(expectedEmittedFileName));
|
||||
assert.isTrue(host.fileExists(expectedEmittedFileName));
|
||||
assert.equal(host.readFile(expectedEmittedFileName), `"use strict";\r\nexports.__esModule = true;\r\nfunction Foo() { return 10; }\r\nexports.Foo = Foo;\r\n`);
|
||||
});
|
||||
|
||||
@ -600,11 +600,11 @@ namespace ts.projectSystem {
|
||||
session.executeCommand(emitRequest);
|
||||
|
||||
const expectedOutFileName = "/a/b/dist.js";
|
||||
assert(host.fileExists(expectedOutFileName));
|
||||
assert.isTrue(host.fileExists(expectedOutFileName));
|
||||
const outFileContent = host.readFile(expectedOutFileName);
|
||||
assert(outFileContent.indexOf(file1.content) !== -1);
|
||||
assert(outFileContent.indexOf(file2.content) === -1);
|
||||
assert(outFileContent.indexOf(file3.content) === -1);
|
||||
assert.isTrue(outFileContent.indexOf(file1.content) !== -1);
|
||||
assert.isTrue(outFileContent.indexOf(file2.content) === -1);
|
||||
assert.isTrue(outFileContent.indexOf(file3.content) === -1);
|
||||
});
|
||||
|
||||
it("should use project root as current directory so that compile on save results in correct file mapping", () => {
|
||||
@ -634,19 +634,19 @@ namespace ts.projectSystem {
|
||||
|
||||
// Verify js file
|
||||
const expectedOutFileName = "/root/TypeScriptProject3/TypeScriptProject3/" + outFileName;
|
||||
assert(host.fileExists(expectedOutFileName));
|
||||
assert.isTrue(host.fileExists(expectedOutFileName));
|
||||
const outFileContent = host.readFile(expectedOutFileName);
|
||||
verifyContentHasString(outFileContent, file1.content);
|
||||
verifyContentHasString(outFileContent, `//# ${"sourceMappingURL"}=${outFileName}.map`); // Sometimes tools can sometimes see this line as a source mapping url comment, so we obfuscate it a little
|
||||
|
||||
// Verify map file
|
||||
const expectedMapFileName = expectedOutFileName + ".map";
|
||||
assert(host.fileExists(expectedMapFileName));
|
||||
assert.isTrue(host.fileExists(expectedMapFileName));
|
||||
const mapFileContent = host.readFile(expectedMapFileName);
|
||||
verifyContentHasString(mapFileContent, `"sources":["${inputFileName}"]`);
|
||||
|
||||
function verifyContentHasString(content: string, str: string) {
|
||||
assert(stringContains(content, str), `Expected "${content}" to have "${str}"`);
|
||||
assert.isTrue(stringContains(content, str), `Expected "${content}" to have "${str}"`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -113,7 +113,7 @@ namespace ts {
|
||||
const caseSensitiveHost = new Utils.MockParseConfigHost(caseSensitiveBasePath, /*useCaseSensitiveFileNames*/ true, testContents);
|
||||
|
||||
function verifyDiagnostics(actual: Diagnostic[], expected: {code: number, category: DiagnosticCategory, messageText: string}[]) {
|
||||
assert(expected.length === actual.length, `Expected error: ${JSON.stringify(expected)}. Actual error: ${JSON.stringify(actual)}.`);
|
||||
assert.isTrue(expected.length === actual.length, `Expected error: ${JSON.stringify(expected)}. Actual error: ${JSON.stringify(actual)}.`);
|
||||
for (let i = 0; i < actual.length; i++) {
|
||||
const actualError = actual[i];
|
||||
const expectedError = expected[i];
|
||||
|
||||
@ -16,7 +16,7 @@ namespace ts {
|
||||
assert.equal(parsedCompilerOptions, expectedCompilerOptions);
|
||||
|
||||
const expectedErrors = expectedResult.errors;
|
||||
assert(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
assert.isTrue(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
for (let i = 0; i < actualErrors.length; i++) {
|
||||
const actualError = actualErrors[i];
|
||||
const expectedError = expectedErrors[i];
|
||||
@ -42,15 +42,15 @@ namespace ts {
|
||||
|
||||
const actualErrors = filter(actualParseErrors, error => error.code !== Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code);
|
||||
const expectedErrors = expectedResult.errors;
|
||||
assert(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
assert.isTrue(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
for (let i = 0; i < actualErrors.length; i++) {
|
||||
const actualError = actualErrors[i];
|
||||
const expectedError = expectedErrors[i];
|
||||
assert.equal(actualError.code, expectedError.code, `Expected error-code: ${JSON.stringify(expectedError.code)}. Actual error-code: ${JSON.stringify(actualError.code)}.`);
|
||||
assert.equal(actualError.category, expectedError.category, `Expected error-category: ${JSON.stringify(expectedError.category)}. Actual error-category: ${JSON.stringify(actualError.category)}.`);
|
||||
assert.isDefined(actualError.file);
|
||||
assert(actualError.start > 0);
|
||||
assert(actualError.length > 0);
|
||||
assert(actualError.file);
|
||||
assert(actualError.start);
|
||||
assert(actualError.length);
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@ -297,7 +297,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@ -328,7 +328,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
@ -359,7 +359,7 @@ namespace ts {
|
||||
file: undefined,
|
||||
start: 0,
|
||||
length: 0,
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.asynciterable'.",
|
||||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'esnext.array', 'esnext.asynciterable', 'esnext.promise'.",
|
||||
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
|
||||
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
|
||||
}]
|
||||
|
||||
@ -17,16 +17,16 @@ namespace ts {
|
||||
|
||||
function verifyErrors(actualErrors: Diagnostic[], expectedResult: ExpectedResult, hasLocation?: boolean) {
|
||||
const expectedErrors = expectedResult.errors;
|
||||
assert(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
assert.isTrue(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`);
|
||||
for (let i = 0; i < actualErrors.length; i++) {
|
||||
const actualError = actualErrors[i];
|
||||
const expectedError = expectedErrors[i];
|
||||
assert.equal(actualError.code, expectedError.code, `Expected error-code: ${JSON.stringify(expectedError.code)}. Actual error-code: ${JSON.stringify(actualError.code)}.`);
|
||||
assert.equal(actualError.category, expectedError.category, `Expected error-category: ${JSON.stringify(expectedError.category)}. Actual error-category: ${JSON.stringify(actualError.category)}.`);
|
||||
if (hasLocation) {
|
||||
assert.isDefined(actualError.file);
|
||||
assert(actualError.start > 0);
|
||||
assert(actualError.length > 0);
|
||||
assert(actualError.file);
|
||||
assert(actualError.start);
|
||||
assert(actualError.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,6 +262,18 @@ namespace N { // Force this test to be TS-only
|
||||
y = [#|this.x|];
|
||||
}
|
||||
}`);
|
||||
|
||||
// TODO (https://github.com/Microsoft/TypeScript/issues/20727): the extracted constant should have a type annotation.
|
||||
testExtractConstant("extractConstant_ContextualType", `
|
||||
interface I { a: 1 | 2 | 3 }
|
||||
let i: I = [#|{ a: 1 }|];
|
||||
`);
|
||||
|
||||
testExtractConstant("extractConstant_ContextualType_Lambda", `
|
||||
const myObj: { member(x: number, y: string): void } = {
|
||||
member: [#|(x, y) => x + y|],
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
function testExtractConstant(caption: string, text: string) {
|
||||
|
||||
@ -39,7 +39,7 @@ namespace ts {
|
||||
assert.equal(end, expectedRange.end, "incorrect end of range");
|
||||
}
|
||||
else {
|
||||
assert(!result.targetRange, `expected range to extract to be undefined`);
|
||||
assert.isTrue(!result.targetRange, `expected range to extract to be undefined`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ namespace ts {
|
||||
assert(!result.emitSkipped, "emit was skipped");
|
||||
assert(result.outputFiles.length === 1, "a number of files other than 1 was output");
|
||||
assert(result.outputFiles[0].name === "input.js", `Expected output file name input.js, but got ${result.outputFiles[0].name}`);
|
||||
assert.isDefined(result.outputFiles[0].text.match(options.newLine === NewLineKind.CarriageReturnLineFeed ? /\r\n/ : /[^\r]\n/), "expected to find appropriate newlines");
|
||||
assert(result.outputFiles[0].text.match(options.newLine === NewLineKind.CarriageReturnLineFeed ? /\r\n/ : /[^\r]\n/), "expected to find appropriate newlines");
|
||||
assert(!result.outputFiles[0].text.match(options.newLine === NewLineKind.CarriageReturnLineFeed ? /[^\r]\n/ : /\r\n/), "expected not to find inappropriate newlines");
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ namespace ts {
|
||||
assertSameDiagnostics(newTree, incrementalNewTree);
|
||||
|
||||
// There should be no reused nodes between two trees that are fully parsed.
|
||||
assert(reusedElements(oldTree, newTree) === 0);
|
||||
assert.isTrue(reusedElements(oldTree, newTree) === 0);
|
||||
|
||||
assert.equal(newTree.fileName, incrementalNewTree.fileName, "newTree.fileName !== incrementalNewTree.fileName");
|
||||
assert.equal(newTree.text, incrementalNewTree.text, "newTree.text !== incrementalNewTree.text");
|
||||
|
||||
@ -7,7 +7,7 @@ namespace ts {
|
||||
function parsesCorrectly(name: string, content: string) {
|
||||
it(name, () => {
|
||||
const typeAndDiagnostics = ts.parseJSDocTypeExpressionForTests(content);
|
||||
assert(typeAndDiagnostics && typeAndDiagnostics.diagnostics.length === 0, "no errors issued");
|
||||
assert.isTrue(typeAndDiagnostics && typeAndDiagnostics.diagnostics.length === 0, "no errors issued");
|
||||
|
||||
Harness.Baseline.runBaseline("JSDocParsing/TypeExpressions.parsesCorrectly." + name + ".json",
|
||||
() => Utils.sourceFileToJSON(typeAndDiagnostics.jsDocTypeExpression.type));
|
||||
@ -17,7 +17,7 @@ namespace ts {
|
||||
function parsesIncorrectly(name: string, content: string) {
|
||||
it(name, () => {
|
||||
const type = ts.parseJSDocTypeExpressionForTests(content);
|
||||
assert(!type || type.diagnostics.length > 0);
|
||||
assert.isTrue(!type || type.diagnostics.length > 0);
|
||||
});
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ namespace ts {
|
||||
function parsesIncorrectly(name: string, content: string) {
|
||||
it(name, () => {
|
||||
const type = parseIsolatedJSDocComment(content);
|
||||
assert(!type || type.diagnostics.length > 0);
|
||||
assert.isTrue(!type || type.diagnostics.length > 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -40,12 +40,9 @@ export function Component(x: Config): any;`
|
||||
getDefaultLibFileName(options) {
|
||||
return ts.getDefaultLibFilePath(options);
|
||||
},
|
||||
fileExists: noop as any,
|
||||
readFile: noop as any,
|
||||
readDirectory: noop as any,
|
||||
});
|
||||
const definitions = languageService.getDefinitionAtPosition("foo.ts", 160); // 160 is the latter `vueTemplateHtml` position
|
||||
assert.isDefined(definitions);
|
||||
expect(definitions).to.exist; // tslint:disable-line no-unused-expression
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -50,6 +50,7 @@ namespace ts {
|
||||
"/dev/x/b.ts",
|
||||
"/dev/x/y/a.ts",
|
||||
"/dev/x/y/b.ts",
|
||||
"/dev/q/a/c/b/d.ts",
|
||||
"/dev/js/a.js",
|
||||
"/dev/js/b.js",
|
||||
]);
|
||||
@ -1171,13 +1172,17 @@ namespace ts {
|
||||
};
|
||||
const expected: ts.ParsedCommandLine = {
|
||||
options: {},
|
||||
errors: [
|
||||
createDiagnosticForConfigFile(json, 12, 11, ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, "**/x/**/*"),
|
||||
ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,
|
||||
caseInsensitiveTsconfigPath, JSON.stringify(json.include), "[]")
|
||||
errors: [],
|
||||
fileNames: [
|
||||
"c:/dev/x/a.ts",
|
||||
"c:/dev/x/aa.ts",
|
||||
"c:/dev/x/b.ts",
|
||||
"c:/dev/x/y/a.ts",
|
||||
"c:/dev/x/y/b.ts",
|
||||
],
|
||||
fileNames: [],
|
||||
wildcardDirectories: {}
|
||||
wildcardDirectories: {
|
||||
"c:/dev": ts.WatchDirectoryFlags.Recursive
|
||||
}
|
||||
};
|
||||
validateMatches(expected, json, caseInsensitiveHost, caseInsensitiveBasePath, /*existingOptions*/ undefined, caseInsensitiveTsconfigPath);
|
||||
});
|
||||
@ -1192,13 +1197,9 @@ namespace ts {
|
||||
};
|
||||
const expected: ts.ParsedCommandLine = {
|
||||
options: {},
|
||||
errors: [
|
||||
createDiagnosticForConfigFile(json, 34, 9, ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, "**/x/**")
|
||||
],
|
||||
errors: [],
|
||||
fileNames: [
|
||||
"c:/dev/a.ts",
|
||||
"c:/dev/x/a.ts",
|
||||
"c:/dev/x/y/a.ts",
|
||||
"c:/dev/z/a.ts"
|
||||
],
|
||||
wildcardDirectories: {
|
||||
@ -1426,5 +1427,60 @@ namespace ts {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("exclude or include patterns which start with **", () => {
|
||||
it("can exclude dirs whose pattern starts with **", () => {
|
||||
const json = {
|
||||
exclude: [
|
||||
"**/x"
|
||||
]
|
||||
};
|
||||
const expected: ts.ParsedCommandLine = {
|
||||
options: {},
|
||||
errors: [],
|
||||
fileNames: [
|
||||
"/dev/A.ts",
|
||||
"/dev/B.ts",
|
||||
"/dev/a.ts",
|
||||
"/dev/b.ts",
|
||||
"/dev/c.d.ts",
|
||||
"/dev/q/a/c/b/d.ts",
|
||||
"/dev/z/a.ts",
|
||||
"/dev/z/aba.ts",
|
||||
"/dev/z/abz.ts",
|
||||
"/dev/z/b.ts",
|
||||
"/dev/z/bba.ts",
|
||||
"/dev/z/bbz.ts",
|
||||
],
|
||||
wildcardDirectories: {
|
||||
"/dev": ts.WatchDirectoryFlags.Recursive
|
||||
}
|
||||
};
|
||||
validateMatches(expected, json, caseSensitiveHost, caseSensitiveBasePath);
|
||||
});
|
||||
it("can include dirs whose pattern starts with **", () => {
|
||||
const json = {
|
||||
include: [
|
||||
"**/x",
|
||||
"**/a/**/b"
|
||||
]
|
||||
};
|
||||
const expected: ts.ParsedCommandLine = {
|
||||
options: {},
|
||||
errors: [],
|
||||
fileNames: [
|
||||
"/dev/x/a.ts",
|
||||
"/dev/x/b.ts",
|
||||
"/dev/x/y/a.ts",
|
||||
"/dev/x/y/b.ts",
|
||||
"/dev/q/a/c/b/d.ts",
|
||||
],
|
||||
wildcardDirectories: {
|
||||
"/dev": ts.WatchDirectoryFlags.Recursive
|
||||
}
|
||||
};
|
||||
validateMatches(expected, json, caseSensitiveHost, caseSensitiveBasePath);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,9 +4,9 @@ namespace ts {
|
||||
export function checkResolvedModule(expected: ResolvedModuleFull, actual: ResolvedModuleFull): boolean {
|
||||
if (!expected === !actual) {
|
||||
if (expected) {
|
||||
assert(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`);
|
||||
assert(expected.extension === actual.extension, `'ext': expected '${expected.extension}' to be equal to '${actual.extension}'`);
|
||||
assert(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`);
|
||||
assert.isTrue(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`);
|
||||
assert.isTrue(expected.extension === actual.extension, `'ext': expected '${expected.extension}' to be equal to '${actual.extension}'`);
|
||||
assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -14,7 +14,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function checkResolvedModuleWithFailedLookupLocations(actual: ResolvedModuleWithFailedLookupLocations, expectedResolvedModule: ResolvedModuleFull, expectedFailedLookupLocations: string[]): void {
|
||||
assert(actual.resolvedModule !== undefined, "module should be resolved");
|
||||
assert.isTrue(actual.resolvedModule !== undefined, "module should be resolved");
|
||||
checkResolvedModule(actual.resolvedModule, expectedResolvedModule);
|
||||
assert.deepEqual(actual.failedLookupLocations, expectedFailedLookupLocations);
|
||||
}
|
||||
@ -58,7 +58,7 @@ namespace ts {
|
||||
realpath,
|
||||
directoryExists: path => directories.has(path),
|
||||
fileExists: path => {
|
||||
assert(directories.has(getDirectoryPath(path)), `'fileExists' '${path}' request in non-existing directory`);
|
||||
assert.isTrue(directories.has(getDirectoryPath(path)), `'fileExists' '${path}' request in non-existing directory`);
|
||||
return map.has(path);
|
||||
}
|
||||
};
|
||||
@ -313,7 +313,7 @@ namespace ts {
|
||||
const host = createModuleResolutionHost(/*hasDirectoryExists*/ true, { name: realFileName, symlinks: [symlinkFileName] });
|
||||
const resolution = nodeModuleNameResolver("linked", "/app/app.ts", { preserveSymlinks }, host);
|
||||
const resolvedFileName = preserveSymlinks ? symlinkFileName : realFileName;
|
||||
checkResolvedModule(resolution.resolvedModule, { resolvedFileName, isExternalLibraryImport: true, extension: Extension.Dts });
|
||||
checkResolvedModule(resolution.resolvedModule, createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/ true));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -338,7 +338,7 @@ namespace ts {
|
||||
const path = normalizePath(combinePaths(currentDirectory, fileName));
|
||||
return files.has(path);
|
||||
},
|
||||
readFile: notImplemented
|
||||
readFile: notImplemented,
|
||||
};
|
||||
|
||||
const program = createProgram(rootFiles, options, host);
|
||||
@ -351,7 +351,7 @@ namespace ts {
|
||||
|
||||
// try to get file using a relative name
|
||||
for (const relativeFileName of relativeNamesToCheck) {
|
||||
assert(program.getSourceFile(relativeFileName) !== undefined, `expected to get file by relative name, got undefined`);
|
||||
assert.isTrue(program.getSourceFile(relativeFileName) !== undefined, `expected to get file by relative name, got undefined`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ export = C;
|
||||
const path = getCanonicalFileName(normalizePath(combinePaths(currentDirectory, fileName)));
|
||||
return files.has(path);
|
||||
},
|
||||
readFile: notImplemented
|
||||
readFile: notImplemented,
|
||||
};
|
||||
const program = createProgram(rootFiles, options, host);
|
||||
const diagnostics = sortAndDeduplicateDiagnostics([...program.getSemanticDiagnostics(), ...program.getOptionsDiagnostics()]);
|
||||
@ -441,7 +441,7 @@ export = C;
|
||||
"/a/b/c.ts": `/// <reference path="d.ts"/>`,
|
||||
"/a/b/d.ts": "var x"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.AMD }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "/a/b/d.ts"], []);
|
||||
test(files, { module: ts.ModuleKind.AMD }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "/a/b/d.ts"], []);
|
||||
});
|
||||
|
||||
it("should fail when two files used in program differ only in casing (tripleslash references)", () => {
|
||||
@ -449,7 +449,7 @@ export = C;
|
||||
"/a/b/c.ts": `/// <reference path="D.ts"/>`,
|
||||
"/a/b/d.ts": "var x"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.AMD, forceConsistentCasingInFileNames: true }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "d.ts"], [1149]);
|
||||
test(files, { module: ts.ModuleKind.AMD, forceConsistentCasingInFileNames: true }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "d.ts"], [1149]);
|
||||
});
|
||||
|
||||
it("should fail when two files used in program differ only in casing (imports)", () => {
|
||||
@ -457,7 +457,7 @@ export = C;
|
||||
"/a/b/c.ts": `import {x} from "D"`,
|
||||
"/a/b/d.ts": "export var x"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.AMD, forceConsistentCasingInFileNames: true }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "d.ts"], [1149]);
|
||||
test(files, { module: ts.ModuleKind.AMD, forceConsistentCasingInFileNames: true }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "d.ts"], [1149]);
|
||||
});
|
||||
|
||||
it("should fail when two files used in program differ only in casing (imports, relative module names)", () => {
|
||||
@ -465,7 +465,7 @@ export = C;
|
||||
"moduleA.ts": `import {x} from "./ModuleB"`,
|
||||
"moduleB.ts": "export var x"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "", /*useCaseSensitiveFileNames*/ false, ["moduleA.ts", "moduleB.ts"], [1149]);
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "", /*useCaseSensitiveFileNames*/ false, ["moduleA.ts", "moduleB.ts"], [1149]);
|
||||
});
|
||||
|
||||
it("should fail when two files exist on disk that differs only in casing", () => {
|
||||
@ -474,7 +474,7 @@ export = C;
|
||||
"/a/b/D.ts": "export var x",
|
||||
"/a/b/d.ts": "export var y"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.AMD }, "/a/b", /*useCaseSensitiveFileNames*/ true, ["c.ts", "d.ts"], [1149]);
|
||||
test(files, { module: ts.ModuleKind.AMD }, "/a/b", /*useCaseSensitiveFileNames*/ true, ["c.ts", "d.ts"], [1149]);
|
||||
});
|
||||
|
||||
it("should fail when module name in 'require' calls has inconsistent casing", () => {
|
||||
@ -483,7 +483,7 @@ export = C;
|
||||
"moduleB.ts": `import a = require("./moduleC")`,
|
||||
"moduleC.ts": "export var x"
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "", /*useCaseSensitiveFileNames*/ false, ["moduleA.ts", "moduleB.ts", "moduleC.ts"], [1149, 1149]);
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "", /*useCaseSensitiveFileNames*/ false, ["moduleA.ts", "moduleB.ts", "moduleC.ts"], [1149, 1149]);
|
||||
});
|
||||
|
||||
it("should fail when module names in 'require' calls has inconsistent casing and current directory has uppercase chars", () => {
|
||||
@ -496,7 +496,7 @@ import a = require("./moduleA");
|
||||
import b = require("./moduleB");
|
||||
`
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /*useCaseSensitiveFileNames*/ false, ["moduleD.ts"], [1149]);
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /*useCaseSensitiveFileNames*/ false, ["moduleD.ts"], [1149]);
|
||||
});
|
||||
it("should not fail when module names in 'require' calls has consistent casing and current directory has uppercase chars", () => {
|
||||
const files = createMapFromTemplate({
|
||||
@ -508,7 +508,7 @@ import a = require("./moduleA");
|
||||
import b = require("./moduleB");
|
||||
`
|
||||
});
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /*useCaseSensitiveFileNames*/ false, ["moduleD.ts"], []);
|
||||
test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /*useCaseSensitiveFileNames*/ false, ["moduleD.ts"], []);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1067,14 +1067,14 @@ import b = require("./moduleB");
|
||||
readFile: fileName => {
|
||||
const file = sourceFiles.get(fileName);
|
||||
return file && file.text;
|
||||
}
|
||||
},
|
||||
};
|
||||
const program1 = createProgram(names, {}, compilerHost);
|
||||
const diagnostics1 = program1.getFileProcessingDiagnostics().getDiagnostics();
|
||||
assert.equal(diagnostics1.length, 1, "expected one diagnostic");
|
||||
|
||||
createProgram(names, {}, compilerHost, program1);
|
||||
assert(program1.structureIsReused === StructureIsReused.Completely);
|
||||
assert.isTrue(program1.structureIsReused === StructureIsReused.Completely);
|
||||
const diagnostics2 = program1.getFileProcessingDiagnostics().getDiagnostics();
|
||||
assert.equal(diagnostics2.length, 1, "expected one diagnostic");
|
||||
assert.equal(diagnostics1[0].messageText, diagnostics2[0].messageText, "expected one diagnostic");
|
||||
|
||||
@ -6,10 +6,10 @@ namespace ts {
|
||||
const map = arrayToSet(expected) as Map<boolean>;
|
||||
for (const missing of missingPaths) {
|
||||
const value = map.get(missing);
|
||||
assert(value, `${missing} to be ${value === undefined ? "not present" : "present only once"}, in actual: ${missingPaths} expected: ${expected}`);
|
||||
assert.isTrue(value, `${missing} to be ${value === undefined ? "not present" : "present only once"}, in actual: ${missingPaths} expected: ${expected}`);
|
||||
map.set(missing, false);
|
||||
}
|
||||
const notFound = mapDefinedIter(map.keys(), k => map.get(k) === true ? k : undefined);
|
||||
const notFound = arrayFrom(mapDefinedIterator(map.keys(), k => map.get(k) === true ? k : undefined));
|
||||
assert.equal(notFound.length, 0, `Not found ${notFound} in actual: ${missingPaths} expected: ${expected}`);
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
namespace ts.projectSystem {
|
||||
describe("Project errors", () => {
|
||||
function checkProjectErrors(projectFiles: server.ProjectFilesWithTSDiagnostics, expectedErrors: ReadonlyArray<string>): void {
|
||||
assert(projectFiles !== undefined, "missing project files");
|
||||
assert.isTrue(projectFiles !== undefined, "missing project files");
|
||||
checkProjectErrorsWorker(projectFiles.projectErrors, expectedErrors);
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ namespace ts.projectSystem {
|
||||
for (let i = 0; i < errors.length; i++) {
|
||||
const actualMessage = flattenDiagnosticMessageText(errors[i].messageText, "\n");
|
||||
const expectedMessage = expectedErrors[i];
|
||||
assert(actualMessage.indexOf(expectedMessage) === 0, `error message does not match, expected ${actualMessage} to start with ${expectedMessage}`);
|
||||
assert.isTrue(actualMessage.indexOf(expectedMessage) === 0, `error message does not match, expected ${actualMessage} to start with ${expectedMessage}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ namespace ts.projectSystem {
|
||||
assert.equal(errors ? errors.length : 0, expectedErrors.length, `expected ${expectedErrors.length} error in the list`);
|
||||
if (expectedErrors.length) {
|
||||
zipWith(errors, expectedErrors, ({ message: actualMessage }, expectedMessage) => {
|
||||
assert(startsWith(actualMessage, actualMessage), `error message does not match, expected ${actualMessage} to start with ${expectedMessage}`);
|
||||
assert.isTrue(startsWith(actualMessage, actualMessage), `error message does not match, expected ${actualMessage} to start with ${expectedMessage}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -137,13 +137,13 @@ namespace ts.projectSystem {
|
||||
{
|
||||
projectService.checkNumberOfProjects({ configuredProjects: 1 });
|
||||
const configuredProject = forEach(projectService.synchronizeProjectList([]), f => f.info.projectName === corruptedConfig.path && f);
|
||||
assert(configuredProject !== undefined, "should find configured project");
|
||||
assert.isTrue(configuredProject !== undefined, "should find configured project");
|
||||
checkProjectErrors(configuredProject, []);
|
||||
const projectErrors = configuredProjectAt(projectService, 0).getAllProjectErrors();
|
||||
checkProjectErrorsWorker(projectErrors, [
|
||||
"'{' expected."
|
||||
]);
|
||||
assert.isDefined(projectErrors[0].file);
|
||||
assert.isNotNull(projectErrors[0].file);
|
||||
assert.equal(projectErrors[0].file.fileName, corruptedConfig.path);
|
||||
}
|
||||
// fix config and trigger watcher
|
||||
@ -151,7 +151,7 @@ namespace ts.projectSystem {
|
||||
{
|
||||
projectService.checkNumberOfProjects({ configuredProjects: 1 });
|
||||
const configuredProject = forEach(projectService.synchronizeProjectList([]), f => f.info.projectName === corruptedConfig.path && f);
|
||||
assert(configuredProject !== undefined, "should find configured project");
|
||||
assert.isTrue(configuredProject !== undefined, "should find configured project");
|
||||
checkProjectErrors(configuredProject, []);
|
||||
const projectErrors = configuredProjectAt(projectService, 0).getAllProjectErrors();
|
||||
checkProjectErrorsWorker(projectErrors, []);
|
||||
@ -182,7 +182,7 @@ namespace ts.projectSystem {
|
||||
{
|
||||
projectService.checkNumberOfProjects({ configuredProjects: 1 });
|
||||
const configuredProject = forEach(projectService.synchronizeProjectList([]), f => f.info.projectName === corruptedConfig.path && f);
|
||||
assert(configuredProject !== undefined, "should find configured project");
|
||||
assert.isTrue(configuredProject !== undefined, "should find configured project");
|
||||
checkProjectErrors(configuredProject, []);
|
||||
const projectErrors = configuredProjectAt(projectService, 0).getAllProjectErrors();
|
||||
checkProjectErrorsWorker(projectErrors, []);
|
||||
@ -192,13 +192,13 @@ namespace ts.projectSystem {
|
||||
{
|
||||
projectService.checkNumberOfProjects({ configuredProjects: 1 });
|
||||
const configuredProject = forEach(projectService.synchronizeProjectList([]), f => f.info.projectName === corruptedConfig.path && f);
|
||||
assert(configuredProject !== undefined, "should find configured project");
|
||||
assert.isTrue(configuredProject !== undefined, "should find configured project");
|
||||
checkProjectErrors(configuredProject, []);
|
||||
const projectErrors = configuredProjectAt(projectService, 0).getAllProjectErrors();
|
||||
checkProjectErrorsWorker(projectErrors, [
|
||||
"'{' expected."
|
||||
]);
|
||||
assert.isDefined(projectErrors[0].file);
|
||||
assert.isNotNull(projectErrors[0].file);
|
||||
assert.equal(projectErrors[0].file.fileName, corruptedConfig.path);
|
||||
}
|
||||
});
|
||||
|
||||
@ -193,14 +193,14 @@ namespace ts {
|
||||
|
||||
function checkCache<T>(caption: string, program: Program, fileName: string, expectedContent: Map<T>, getCache: (f: SourceFile) => Map<T>, entryChecker: (expected: T, original: T) => boolean): void {
|
||||
const file = program.getSourceFile(fileName);
|
||||
assert(file !== undefined, `cannot find file ${fileName}`);
|
||||
assert.isTrue(file !== undefined, `cannot find file ${fileName}`);
|
||||
const cache = getCache(file);
|
||||
if (expectedContent === undefined) {
|
||||
assert(cache === undefined, `expected ${caption} to be undefined`);
|
||||
assert.isTrue(cache === undefined, `expected ${caption} to be undefined`);
|
||||
}
|
||||
else {
|
||||
assert(cache !== undefined, `expected ${caption} to be set`);
|
||||
assert(mapsAreEqual(expectedContent, cache, entryChecker), `contents of ${caption} did not match the expected contents.`);
|
||||
assert.isTrue(cache !== undefined, `expected ${caption} to be set`);
|
||||
assert.isTrue(mapsAreEqual(expectedContent, cache, entryChecker), `contents of ${caption} did not match the expected contents.`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ namespace ts {
|
||||
const options: CompilerOptions = { target, noLib: true };
|
||||
|
||||
const program1 = newProgram(files, ["a.ts"], options);
|
||||
assert(program1.getMissingFilePaths().length !== 0);
|
||||
assert.notDeepEqual(emptyArray, program1.getMissingFilePaths());
|
||||
|
||||
const program2 = updateProgram(program1, ["a.ts"], options, noop);
|
||||
assert.deepEqual(program1.getMissingFilePaths(), program2.getMissingFilePaths());
|
||||
@ -341,7 +341,7 @@ namespace ts {
|
||||
const options: CompilerOptions = { target, noLib: true };
|
||||
|
||||
const program1 = newProgram(files, ["a.ts"], options);
|
||||
assert(program1.getMissingFilePaths().length !== 0);
|
||||
assert.notDeepEqual(emptyArray, program1.getMissingFilePaths());
|
||||
|
||||
const newTexts: NamedSourceText[] = files.concat([{ name: "non-existing-file.ts", text: SourceText.New("", "", `var x = 1`) }]);
|
||||
const program2 = updateProgram(program1, ["a.ts"], options, noop, newTexts);
|
||||
@ -389,6 +389,19 @@ namespace ts {
|
||||
checkResolvedModulesCache(program4, "a.ts", createMapFromTemplate({ b: createResolvedModule("b.ts"), c: undefined }));
|
||||
});
|
||||
|
||||
it("set the resolvedImports after re-using an ambient external module declaration", () => {
|
||||
const files = [
|
||||
{ name: "/a.ts", text: SourceText.New("", "", 'import * as a from "a";') },
|
||||
{ name: "/types/zzz/index.d.ts", text: SourceText.New("", "", 'declare module "a" { }') },
|
||||
];
|
||||
const options: CompilerOptions = { target, typeRoots: ["/types"] };
|
||||
const program1 = newProgram(files, ["/a.ts"], options);
|
||||
const program2 = updateProgram(program1, ["/a.ts"], options, files => {
|
||||
files[0].text = files[0].text.updateProgram('import * as aa from "a";');
|
||||
});
|
||||
assert.isDefined(program2.getSourceFile("/a.ts").resolvedModules.get("a"), "'a' is not an unresolved module after re-use");
|
||||
});
|
||||
|
||||
it("resolved type directives cache follows type directives", () => {
|
||||
const files = [
|
||||
{ name: "/a.ts", text: SourceText.New("/// <reference types='typedefs'/>", "", "var x = $") },
|
||||
@ -860,7 +873,7 @@ namespace ts {
|
||||
updateProgramText(files, bxPackage, JSON.stringify({ name: "x", version: "1.2.3" }));
|
||||
});
|
||||
assert.equal(program1.structureIsReused, StructureIsReused.Not);
|
||||
assert.lengthOf(program2.getSemanticDiagnostics(), 0);
|
||||
assert.deepEqual(program2.getSemanticDiagnostics(), []);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -888,7 +901,7 @@ namespace ts {
|
||||
/*hasInvalidatedResolution*/ returnFalse,
|
||||
/*hasChangedAutomaticTypeDirectiveNames*/ false
|
||||
);
|
||||
assert(actual);
|
||||
assert.isTrue(actual);
|
||||
}
|
||||
|
||||
function duplicate(options: CompilerOptions): CompilerOptions;
|
||||
|
||||
@ -50,7 +50,7 @@ describe("Colorization", () => {
|
||||
|
||||
const actualEntry = getEntryAtPosition(result, actualEntryPosition);
|
||||
|
||||
assert.isDefined(actualEntry, "Could not find classification entry for '" + expectedEntry.value + "' at position: " + actualEntryPosition);
|
||||
assert(actualEntry, "Could not find classification entry for '" + expectedEntry.value + "' at position: " + actualEntryPosition);
|
||||
assert.equal(actualEntry.classification, expectedEntry.classification, "Classification class does not match expected. Expected: " + ts.TokenClass[expectedEntry.classification] + ", Actual: " + ts.TokenClass[actualEntry.classification]);
|
||||
assert.equal(actualEntry.length, expectedEntry.value.length, "Classification length does not match expected. Expected: " + ts.TokenClass[expectedEntry.value.length] + ", Actual: " + ts.TokenClass[actualEntry.length]);
|
||||
}
|
||||
|
||||
@ -140,25 +140,25 @@ describe("PatternMatcher", () => {
|
||||
it("PreferCaseSensitiveCamelCaseMatchToLongPattern1", () => {
|
||||
const match = getFirstMatch("FogBar", "FBB");
|
||||
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("PreferCaseSensitiveCamelCaseMatchToLongPattern2", () => {
|
||||
const match = getFirstMatch("FogBar", "FoooB");
|
||||
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("CamelCaseMatchPartiallyUnmatched", () => {
|
||||
const match = getFirstMatch("FogBarBaz", "FZ");
|
||||
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("CamelCaseMatchCompletelyUnmatched", () => {
|
||||
const match = getFirstMatch("FogBarBaz", "ZZ");
|
||||
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("TwoUppercaseCharacters", () => {
|
||||
@ -220,7 +220,7 @@ describe("PatternMatcher", () => {
|
||||
it("PreferCaseSensitiveMiddleUnderscore3", () => {
|
||||
const match = getFirstMatch("Fog_Bar", "F__B");
|
||||
|
||||
assert(undefined === match);
|
||||
assert.isTrue(undefined === match);
|
||||
});
|
||||
|
||||
it("PreferCaseSensitiveMiddleUnderscore4", () => {
|
||||
@ -264,25 +264,25 @@ describe("PatternMatcher", () => {
|
||||
it("AllLowerPattern1", () => {
|
||||
const match = getFirstMatch("FogBarChangedEventArgs", "changedeventargs");
|
||||
|
||||
assert(undefined !== match);
|
||||
assert.isTrue(undefined !== match);
|
||||
});
|
||||
|
||||
it("AllLowerPattern2", () => {
|
||||
const match = getFirstMatch("FogBarChangedEventArgs", "changedeventarrrgh");
|
||||
|
||||
assert(undefined === match);
|
||||
assert.isTrue(undefined === match);
|
||||
});
|
||||
|
||||
it("AllLowerPattern3", () => {
|
||||
const match = getFirstMatch("ABCDEFGH", "bcd");
|
||||
|
||||
assert(undefined !== match);
|
||||
assert.isTrue(undefined !== match);
|
||||
});
|
||||
|
||||
it("AllLowerPattern4", () => {
|
||||
const match = getFirstMatch("AbcdefghijEfgHij", "efghij");
|
||||
|
||||
assert(undefined === match);
|
||||
assert.isTrue(undefined === match);
|
||||
});
|
||||
});
|
||||
|
||||
@ -370,13 +370,13 @@ describe("PatternMatcher", () => {
|
||||
it("BlankPattern", () => {
|
||||
const matches = getAllMatches("AddMetadataReference", "");
|
||||
|
||||
assert(matches === undefined);
|
||||
assert.isTrue(matches === undefined);
|
||||
});
|
||||
|
||||
it("WhitespaceOnlyPattern", () => {
|
||||
const matches = getAllMatches("AddMetadataReference", " ");
|
||||
|
||||
assert(matches === undefined);
|
||||
assert.isTrue(matches === undefined);
|
||||
});
|
||||
|
||||
it("EachWordSeparately1", () => {
|
||||
@ -403,13 +403,13 @@ describe("PatternMatcher", () => {
|
||||
it("MixedCasing", () => {
|
||||
const matches = getAllMatches("AddMetadataReference", "mEta");
|
||||
|
||||
assert(matches === undefined);
|
||||
assert.isTrue(matches === undefined);
|
||||
});
|
||||
|
||||
it("MixedCasing2", () => {
|
||||
const matches = getAllMatches("AddMetadataReference", "Data");
|
||||
|
||||
assert(matches === undefined);
|
||||
assert.isTrue(matches === undefined);
|
||||
});
|
||||
|
||||
it("AsteriskSplit", () => {
|
||||
@ -421,7 +421,7 @@ describe("PatternMatcher", () => {
|
||||
it("LowercaseSubstring1", () => {
|
||||
const matches = getAllMatches("Operator", "a");
|
||||
|
||||
assert(matches === undefined);
|
||||
assert.isTrue(matches === undefined);
|
||||
});
|
||||
|
||||
it("LowercaseSubstring2", () => {
|
||||
@ -441,7 +441,7 @@ describe("PatternMatcher", () => {
|
||||
|
||||
it("DottedPattern2", () => {
|
||||
const match = getFirstMatchForDottedPattern("Foo.Bar.Baz", "Quux", "C.Q");
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("DottedPattern3", () => {
|
||||
@ -464,13 +464,13 @@ describe("PatternMatcher", () => {
|
||||
|
||||
it("DottedPattern6", () => {
|
||||
const match = getFirstMatchForDottedPattern("Foo.Bar.Baz", "Quux", "F.F.B.B.Quux");
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
|
||||
it("DottedPattern7", () => {
|
||||
let match = getFirstMatch("UIElement", "UIElement");
|
||||
match = getFirstMatch("GetKeyword", "UIElement");
|
||||
assert(match === undefined);
|
||||
assert.isTrue(match === undefined);
|
||||
});
|
||||
});
|
||||
|
||||
@ -508,8 +508,8 @@ describe("PatternMatcher", () => {
|
||||
}
|
||||
|
||||
function assertInRange(val: number, low: number, high: number) {
|
||||
assert(val >= low);
|
||||
assert(val <= high);
|
||||
assert.isTrue(val >= low);
|
||||
assert.isTrue(val <= high);
|
||||
}
|
||||
|
||||
function verifyBreakIntoCharacterSpans(original: string, ...parts: string[]): void {
|
||||
@ -521,6 +521,6 @@ describe("PatternMatcher", () => {
|
||||
}
|
||||
|
||||
function assertContainsKind(kind: ts.PatternMatchKind, results: ts.PatternMatch[]) {
|
||||
assert(ts.forEach(results, r => r.kind === kind));
|
||||
assert.isTrue(ts.forEach(results, r => r.kind === kind));
|
||||
}
|
||||
});
|
||||
|
||||
@ -18,7 +18,7 @@ describe("PreProcessFile:", () => {
|
||||
return;
|
||||
}
|
||||
if (!expected) {
|
||||
assert(false, `Expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`);
|
||||
assert.isTrue(false, `Expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`);
|
||||
}
|
||||
assert.equal(actual.length, expected.length, `[${kind}] Actual array's length does not match expected length. Expected files: ${JSON.stringify(expected)}, actual files: ${JSON.stringify(actual)}`);
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/// <reference path="..\harness.ts" />
|
||||
|
||||
const expect: typeof _chai.expect = _chai.expect;
|
||||
|
||||
namespace ts.server {
|
||||
let lastWrittenToHost: string;
|
||||
const mockHost: ServerHost = {
|
||||
@ -80,7 +82,7 @@ namespace ts.server {
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(() => session.executeCommand(req));
|
||||
expect(() => session.executeCommand(req)).to.throw();
|
||||
});
|
||||
it("should output an error response when a command does not exist", () => {
|
||||
const req: protocol.Request = {
|
||||
@ -99,7 +101,7 @@ namespace ts.server {
|
||||
request_seq: 0,
|
||||
success: false
|
||||
};
|
||||
assert.deepEqual(lastSent, expected);
|
||||
expect(lastSent).to.deep.equal(expected);
|
||||
});
|
||||
it("should return a tuple containing the response and if a response is required on success", () => {
|
||||
const req: protocol.ConfigureRequest = {
|
||||
@ -114,18 +116,17 @@ namespace ts.server {
|
||||
}
|
||||
};
|
||||
|
||||
assert.deepEqual(session.executeCommand(req), {
|
||||
expect(session.executeCommand(req)).to.deep.equal({
|
||||
responseRequired: false
|
||||
});
|
||||
const expected: protocol.Response = {
|
||||
expect(lastSent).to.deep.equal({
|
||||
command: CommandNames.Configure,
|
||||
type: "response",
|
||||
success: true,
|
||||
request_seq: 0,
|
||||
seq: 0,
|
||||
body: undefined
|
||||
};
|
||||
assert.deepEqual(lastSent, expected);
|
||||
});
|
||||
});
|
||||
it("should handle literal types in request", () => {
|
||||
const configureRequest: protocol.ConfigureRequest = {
|
||||
@ -169,6 +170,19 @@ namespace ts.server {
|
||||
allowNonTsExtensions: true // injected by tsserver
|
||||
});
|
||||
});
|
||||
|
||||
it("Status request gives ts.version", () => {
|
||||
const req: protocol.StatusRequest = {
|
||||
command: CommandNames.Status,
|
||||
seq: 0,
|
||||
type: "request"
|
||||
};
|
||||
|
||||
const expected: protocol.StatusResponseBody = {
|
||||
version: ts.version
|
||||
};
|
||||
assert.deepEqual(session.executeCommand(req).response, expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe("onMessage", () => {
|
||||
@ -220,6 +234,7 @@ namespace ts.server {
|
||||
CommandNames.Saveto,
|
||||
CommandNames.SignatureHelp,
|
||||
CommandNames.SignatureHelpFull,
|
||||
CommandNames.Status,
|
||||
CommandNames.TypeDefinition,
|
||||
CommandNames.ProjectInfo,
|
||||
CommandNames.ReloadProjects,
|
||||
@ -296,15 +311,14 @@ namespace ts.server {
|
||||
|
||||
session.onMessage(JSON.stringify(req));
|
||||
|
||||
const expected: protocol.ConfigureResponse = {
|
||||
expect(lastSent).to.deep.equal(<protocol.ConfigureResponse>{
|
||||
command: CommandNames.Configure,
|
||||
type: "response",
|
||||
success: true,
|
||||
request_seq: 0,
|
||||
seq: 0,
|
||||
body: undefined
|
||||
};
|
||||
assert.deepEqual(lastSent, expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -316,9 +330,9 @@ namespace ts.server {
|
||||
const resultMsg = `Content-Length: ${len}\r\n\r\n${strmsg}\n`;
|
||||
|
||||
session.send = Session.prototype.send;
|
||||
assert.isDefined(session.send);
|
||||
session.send(msg);
|
||||
assert.equal(lastWrittenToHost, resultMsg);
|
||||
assert(session.send);
|
||||
expect(session.send(msg)).to.not.exist; // tslint:disable-line no-unused-expression
|
||||
expect(lastWrittenToHost).to.equal(resultMsg);
|
||||
});
|
||||
});
|
||||
|
||||
@ -335,7 +349,11 @@ namespace ts.server {
|
||||
|
||||
session.addProtocolHandler(command, () => result);
|
||||
|
||||
assert.deepEqual(session.executeCommand({ command, seq: 0, type: "request" }), result);
|
||||
expect(session.executeCommand({
|
||||
command,
|
||||
seq: 0,
|
||||
type: "request"
|
||||
})).to.deep.equal(result);
|
||||
});
|
||||
it("throws when a duplicate handler is passed", () => {
|
||||
const respBody = {
|
||||
@ -349,7 +367,8 @@ namespace ts.server {
|
||||
|
||||
session.addProtocolHandler(command, () => resp);
|
||||
|
||||
assert.throws(() => session.addProtocolHandler(command, () => resp), `Protocol handler already exists for command "${command}"`);
|
||||
expect(() => session.addProtocolHandler(command, () => resp))
|
||||
.to.throw(`Protocol handler already exists for command "${command}"`);
|
||||
});
|
||||
});
|
||||
|
||||
@ -362,13 +381,12 @@ namespace ts.server {
|
||||
|
||||
session.event(info, evt);
|
||||
|
||||
const expected: protocol.Event = {
|
||||
expect(lastSent).to.deep.equal({
|
||||
type: "event",
|
||||
seq: 0,
|
||||
event: evt,
|
||||
body: info
|
||||
};
|
||||
assert.deepEqual(lastSent, expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -383,15 +401,14 @@ namespace ts.server {
|
||||
|
||||
session.output(body, command, /*reqSeq*/ 0);
|
||||
|
||||
const expected: protocol.Response = {
|
||||
expect(lastSent).to.deep.equal({
|
||||
seq: 0,
|
||||
request_seq: 0,
|
||||
type: "response",
|
||||
command,
|
||||
body,
|
||||
success: true
|
||||
};
|
||||
assert.deepEqual(lastSent, expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -452,16 +469,14 @@ namespace ts.server {
|
||||
session.onMessage(JSON.stringify(request));
|
||||
const lastSent = session.lastSent as protocol.Response;
|
||||
|
||||
assert.deepEqual({ ...lastSent, message: undefined }, {
|
||||
request_seq: 0,
|
||||
expect(lastSent).to.contain({
|
||||
seq: 0,
|
||||
type: "response",
|
||||
command,
|
||||
success: false,
|
||||
message: undefined,
|
||||
success: false
|
||||
});
|
||||
|
||||
assert(ts.stringContains(lastSent.message, "myMessage") && ts.stringContains(lastSent.message, "f1"));
|
||||
expect(lastSent.message).has.string("myMessage").and.has.string("f1");
|
||||
});
|
||||
});
|
||||
|
||||
@ -501,24 +516,23 @@ namespace ts.server {
|
||||
|
||||
session.output(body, command, /*reqSeq*/ 0);
|
||||
|
||||
const expected: protocol.Response = {
|
||||
expect(session.lastSent).to.deep.equal({
|
||||
seq: 0,
|
||||
request_seq: 0,
|
||||
type: "response",
|
||||
command,
|
||||
body,
|
||||
success: true
|
||||
};
|
||||
assert.deepEqual(session.lastSent, expected);
|
||||
});
|
||||
});
|
||||
it("can add and respond to new protocol handlers", () => {
|
||||
const session = new TestSession();
|
||||
|
||||
assert.deepEqual(session.executeCommand({
|
||||
expect(session.executeCommand({
|
||||
seq: 0,
|
||||
type: "request",
|
||||
command: session.customHandler
|
||||
}), {
|
||||
})).to.deep.equal({
|
||||
response: undefined,
|
||||
responseRequired: true
|
||||
});
|
||||
@ -528,7 +542,8 @@ namespace ts.server {
|
||||
new class extends TestSession {
|
||||
constructor() {
|
||||
super();
|
||||
assert(this.projectService instanceof ProjectService);
|
||||
assert(this.projectService);
|
||||
expect(this.projectService).to.be.instanceOf(ProjectService);
|
||||
}
|
||||
}();
|
||||
});
|
||||
@ -652,9 +667,9 @@ namespace ts.server {
|
||||
|
||||
// Add an event handler
|
||||
cli.on("testevent", (eventinfo) => {
|
||||
assert.equal(eventinfo, toEvent);
|
||||
expect(eventinfo).to.equal(toEvent);
|
||||
responses++;
|
||||
assert.equal(responses, 1);
|
||||
expect(responses).to.equal(1);
|
||||
});
|
||||
|
||||
// Trigger said event from the server
|
||||
@ -664,8 +679,8 @@ namespace ts.server {
|
||||
cli.execute("echo", toEcho, (resp) => {
|
||||
assert(resp.success, resp.message);
|
||||
responses++;
|
||||
assert.equal(responses, 2);
|
||||
assert.deepEqual(resp.body, toEcho);
|
||||
expect(responses).to.equal(2);
|
||||
expect(resp.body).to.deep.equal(toEcho);
|
||||
});
|
||||
|
||||
// Queue a configure command
|
||||
@ -677,7 +692,7 @@ namespace ts.server {
|
||||
}, (resp) => {
|
||||
assert(resp.success, resp.message);
|
||||
responses++;
|
||||
assert.equal(responses, 3);
|
||||
expect(responses).to.equal(3);
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ namespace M
|
||||
/*body */ createBlock(statements)
|
||||
);
|
||||
|
||||
changeTracker.insertNodeBefore(sourceFile, /*before*/findChild("M2", sourceFile), newFunction, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeBefore(sourceFile, /*before*/findChild("M2", sourceFile), newFunction);
|
||||
|
||||
// replace statements with return statement
|
||||
const newStatement = createReturn(
|
||||
@ -129,12 +129,11 @@ function bar() {
|
||||
changeTracker.deleteRange(sourceFile, { pos: text.indexOf("function foo"), end: text.indexOf("function bar") });
|
||||
});
|
||||
}
|
||||
function findVariableStatementContaining(name: string, sourceFile: SourceFile) {
|
||||
const varDecl = findChild(name, sourceFile);
|
||||
assert.equal(varDecl.kind, SyntaxKind.VariableDeclaration);
|
||||
const varStatement = varDecl.parent.parent;
|
||||
assert.equal(varStatement.kind, SyntaxKind.VariableStatement);
|
||||
return varStatement;
|
||||
function findVariableStatementContaining(name: string, sourceFile: SourceFile): VariableStatement {
|
||||
return cast(findVariableDeclarationContaining(name, sourceFile).parent.parent, isVariableStatement);
|
||||
}
|
||||
function findVariableDeclarationContaining(name: string, sourceFile: SourceFile): VariableDeclaration {
|
||||
return cast(findChild(name, sourceFile), isVariableDeclaration);
|
||||
}
|
||||
{
|
||||
const text = `
|
||||
@ -306,11 +305,11 @@ var y; // comment 4
|
||||
var z = 3; // comment 5
|
||||
// comment 6
|
||||
var a = 4; // comment 7`;
|
||||
runSingleFileTest("insertNodeAt1", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAt(sourceFile, text.indexOf("var y"), createTestClass(), { suffix: newLineCharacter });
|
||||
runSingleFileTest("insertNodeBefore3", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeBefore(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass());
|
||||
});
|
||||
runSingleFileTest("insertNodeAt2", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAt(sourceFile, text.indexOf("; // comment 4"), createTestVariableDeclaration("z1"));
|
||||
runSingleFileTest("insertNodeAfterVariableDeclaration", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableDeclarationContaining("y", sourceFile), createTestVariableDeclaration("z1"));
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -325,23 +324,22 @@ namespace M {
|
||||
var a = 4; // comment 7
|
||||
}`;
|
||||
runSingleFileTest("insertNodeBefore1", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeBefore(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeBefore(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass());
|
||||
});
|
||||
runSingleFileTest("insertNodeBefore2", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeBefore(sourceFile, findChild("M", sourceFile), createTestClass(), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeBefore(sourceFile, findChild("M", sourceFile), createTestClass());
|
||||
});
|
||||
runSingleFileTest("insertNodeAfter1", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass());
|
||||
});
|
||||
runSingleFileTest("insertNodeAfter2", /*placeOpenBraceOnNewLineForFunctions*/ true, text, /*validateNodes*/ true, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("M", sourceFile), createTestClass(), { prefix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("M", sourceFile), createTestClass());
|
||||
});
|
||||
}
|
||||
|
||||
function findOpenBraceForConstructor(sourceFile: SourceFile) {
|
||||
function findConstructor(sourceFile: SourceFile): ConstructorDeclaration {
|
||||
const classDecl = <ClassDeclaration>sourceFile.statements[0];
|
||||
const constructorDecl = forEach(classDecl.members, m => m.kind === SyntaxKind.Constructor && (<ConstructorDeclaration>m).body && <ConstructorDeclaration>m);
|
||||
return constructorDecl.body.getFirstToken();
|
||||
return find<ClassElement, ConstructorDeclaration>(classDecl.members, (m): m is ConstructorDeclaration => isConstructorDeclaration(m) && !!m.body)!;
|
||||
}
|
||||
function createTestSuperCall() {
|
||||
const superCall = createCall(
|
||||
@ -359,8 +357,8 @@ class A {
|
||||
}
|
||||
}
|
||||
`;
|
||||
runSingleFileTest("insertNodeAfter3", /*placeOpenBraceOnNewLineForFunctions*/ false, text1, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findOpenBraceForConstructor(sourceFile), createTestSuperCall(), { suffix: newLineCharacter });
|
||||
runSingleFileTest("insertNodeAtConstructorStart", /*placeOpenBraceOnNewLineForFunctions*/ false, text1, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAtConstructorStart(sourceFile, findConstructor(sourceFile), createTestSuperCall());
|
||||
});
|
||||
const text2 = `
|
||||
class A {
|
||||
@ -370,7 +368,7 @@ class A {
|
||||
}
|
||||
`;
|
||||
runSingleFileTest("insertNodeAfter4", /*placeOpenBraceOnNewLineForFunctions*/ false, text2, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), createTestSuperCall(), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), createTestSuperCall());
|
||||
});
|
||||
const text3 = `
|
||||
class A {
|
||||
@ -379,8 +377,8 @@ class A {
|
||||
}
|
||||
}
|
||||
`;
|
||||
runSingleFileTest("insertNodeAfter3-block with newline", /*placeOpenBraceOnNewLineForFunctions*/ false, text3, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findOpenBraceForConstructor(sourceFile), createTestSuperCall(), { suffix: newLineCharacter });
|
||||
runSingleFileTest("insertNodeAtConstructorStart-block with newline", /*placeOpenBraceOnNewLineForFunctions*/ false, text3, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAtConstructorStart(sourceFile, findConstructor(sourceFile), createTestSuperCall());
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -638,7 +636,7 @@ class A {
|
||||
}
|
||||
const insertAfter = findChild("x", sourceFile);
|
||||
for (const newNode of newNodes) {
|
||||
changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -649,7 +647,7 @@ class A {
|
||||
}
|
||||
`;
|
||||
runSingleFileTest("insertNodeAfterInClass1", /*placeOpenBraceOnNewLineForFunctions*/ false, text, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined));
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -659,7 +657,7 @@ class A {
|
||||
}
|
||||
`;
|
||||
runSingleFileTest("insertNodeAfterInClass2", /*placeOpenBraceOnNewLineForFunctions*/ false, text, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined), { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined));
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -698,7 +696,7 @@ class A {
|
||||
/*questionToken*/ undefined,
|
||||
createKeywordTypeNode(SyntaxKind.AnyKeyword),
|
||||
/*initializer*/ undefined);
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode);
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -716,7 +714,7 @@ class A {
|
||||
/*questionToken*/ undefined,
|
||||
createKeywordTypeNode(SyntaxKind.AnyKeyword),
|
||||
/*initializer*/ undefined);
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode);
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -733,7 +731,7 @@ interface A {
|
||||
/*questionToken*/ undefined,
|
||||
createKeywordTypeNode(SyntaxKind.AnyKeyword),
|
||||
/*initializer*/ undefined);
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode);
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -750,7 +748,7 @@ interface A {
|
||||
/*questionToken*/ undefined,
|
||||
createKeywordTypeNode(SyntaxKind.AnyKeyword),
|
||||
/*initializer*/ undefined);
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode);
|
||||
});
|
||||
}
|
||||
{
|
||||
@ -759,7 +757,7 @@ let x = foo
|
||||
`;
|
||||
runSingleFileTest("insertNodeInStatementListAfterNodeWithoutSeparator1", /*placeOpenBraceOnNewLineForFunctions*/ false, text, /*validateNodes*/ false, (sourceFile, changeTracker) => {
|
||||
const newNode = createStatement(createParen(createLiteral(1)));
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), newNode, { suffix: newLineCharacter });
|
||||
changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), newNode);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -33,20 +33,20 @@ namespace ts.textStorage {
|
||||
for (let offset = 0; offset < end - start; offset++) {
|
||||
const pos1 = ts1.lineOffsetToPosition(line + 1, offset + 1);
|
||||
const pos2 = ts2.lineOffsetToPosition(line + 1, offset + 1);
|
||||
assert(pos1 === pos2, `lineOffsetToPosition ${line + 1}-${offset + 1}: expected ${pos1} to equal ${pos2}`);
|
||||
assert.isTrue(pos1 === pos2, `lineOffsetToPosition ${line + 1}-${offset + 1}: expected ${pos1} to equal ${pos2}`);
|
||||
}
|
||||
|
||||
const {start: start1, length: length1 } = ts1.lineToTextSpan(line);
|
||||
const {start: start2, length: length2 } = ts2.lineToTextSpan(line);
|
||||
assert(start1 === start2, `lineToTextSpan ${line}::start:: expected ${start1} to equal ${start2}`);
|
||||
assert(length1 === length2, `lineToTextSpan ${line}::length:: expected ${length1} to equal ${length2}`);
|
||||
assert.isTrue(start1 === start2, `lineToTextSpan ${line}::start:: expected ${start1} to equal ${start2}`);
|
||||
assert.isTrue(length1 === length2, `lineToTextSpan ${line}::length:: expected ${length1} to equal ${length2}`);
|
||||
}
|
||||
|
||||
for (let pos = 0; pos < f.content.length; pos++) {
|
||||
const { line: line1, offset: offset1 } = ts1.positionToLineOffset(pos);
|
||||
const { line: line2, offset: offset2 } = ts2.positionToLineOffset(pos);
|
||||
assert(line1 === line2, `positionToLineOffset ${pos}::line:: expected ${line1} to equal ${line2}`);
|
||||
assert(offset1 === offset2, `positionToLineOffset ${pos}::offset:: expected ${offset1} to equal ${offset2}`);
|
||||
assert.isTrue(line1 === line2, `positionToLineOffset ${pos}::line:: expected ${line1} to equal ${line2}`);
|
||||
assert.isTrue(offset1 === offset2, `positionToLineOffset ${pos}::offset:: expected ${offset1} to equal ${offset2}`);
|
||||
}
|
||||
});
|
||||
|
||||
@ -55,16 +55,16 @@ namespace ts.textStorage {
|
||||
const ts1 = new server.TextStorage(host, server.asNormalizedPath(f.path));
|
||||
|
||||
ts1.getSnapshot();
|
||||
assert(!ts1.hasScriptVersionCache_TestOnly(), "should not have script version cache - 1");
|
||||
assert.isTrue(!ts1.hasScriptVersionCache_TestOnly(), "should not have script version cache - 1");
|
||||
|
||||
ts1.edit(0, 5, " ");
|
||||
assert(ts1.hasScriptVersionCache_TestOnly(), "have script version cache - 1");
|
||||
assert.isTrue(ts1.hasScriptVersionCache_TestOnly(), "have script version cache - 1");
|
||||
|
||||
ts1.useText();
|
||||
assert(!ts1.hasScriptVersionCache_TestOnly(), "should not have script version cache - 2");
|
||||
assert.isTrue(!ts1.hasScriptVersionCache_TestOnly(), "should not have script version cache - 2");
|
||||
|
||||
ts1.getLineInfo(0);
|
||||
assert(ts1.hasScriptVersionCache_TestOnly(), "have script version cache - 2");
|
||||
assert.isTrue(ts1.hasScriptVersionCache_TestOnly(), "have script version cache - 2");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -80,20 +80,47 @@ namespace ts.tscWatch {
|
||||
checkOutputDoesNotContain(host, expectedNonAffectedFiles);
|
||||
}
|
||||
|
||||
function checkOutputErrors(host: WatchedSystem, errors: ReadonlyArray<Diagnostic>, isInitial?: true, skipWaiting?: true) {
|
||||
enum ExpectedOutputErrorsPosition {
|
||||
BeforeCompilationStarts,
|
||||
AfterCompilationStarting,
|
||||
AfterFileChangeDetected
|
||||
}
|
||||
|
||||
function checkOutputErrors(
|
||||
host: WatchedSystem,
|
||||
errors: ReadonlyArray<Diagnostic>,
|
||||
errorsPosition: ExpectedOutputErrorsPosition,
|
||||
skipWaiting?: true
|
||||
) {
|
||||
const outputs = host.getOutput();
|
||||
const expectedOutputCount = (isInitial ? 0 : 1) + errors.length + (skipWaiting ? 0 : 1);
|
||||
const expectedOutputCount = errors.length + (skipWaiting ? 0 : 1) + 1;
|
||||
assert.equal(outputs.length, expectedOutputCount, "Outputs = " + outputs.toString());
|
||||
let index = 0;
|
||||
if (!isInitial) {
|
||||
assertWatchDiagnosticAt(host, index, Diagnostics.File_change_detected_Starting_incremental_compilation);
|
||||
index++;
|
||||
let index: number;
|
||||
|
||||
switch (errorsPosition) {
|
||||
case ExpectedOutputErrorsPosition.AfterCompilationStarting:
|
||||
assertWatchDiagnosticAt(host, 0, Diagnostics.Starting_compilation_in_watch_mode);
|
||||
index = 1;
|
||||
break;
|
||||
case ExpectedOutputErrorsPosition.AfterFileChangeDetected:
|
||||
assertWatchDiagnosticAt(host, 0, Diagnostics.File_change_detected_Starting_incremental_compilation);
|
||||
index = 1;
|
||||
break;
|
||||
case ExpectedOutputErrorsPosition.BeforeCompilationStarts:
|
||||
assertWatchDiagnosticAt(host, errors.length, Diagnostics.Starting_compilation_in_watch_mode);
|
||||
index = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
forEach(errors, error => {
|
||||
assertDiagnosticAt(host, index, error);
|
||||
index++;
|
||||
});
|
||||
if (!skipWaiting) {
|
||||
if (errorsPosition === ExpectedOutputErrorsPosition.BeforeCompilationStarts) {
|
||||
assertWatchDiagnosticAt(host, index, ts.Diagnostics.Starting_compilation_in_watch_mode);
|
||||
index += 1;
|
||||
}
|
||||
assertWatchDiagnosticAt(host, index, Diagnostics.Compilation_complete_Watching_for_file_changes);
|
||||
}
|
||||
host.clearOutput();
|
||||
@ -106,7 +133,7 @@ namespace ts.tscWatch {
|
||||
|
||||
function assertWatchDiagnosticAt(host: WatchedSystem, outputAt: number, diagnosticMessage: DiagnosticMessage) {
|
||||
const output = host.getOutput()[outputAt];
|
||||
assert(endsWith(output, getWatchDiagnosticWithoutDate(host, diagnosticMessage)), "outputs[" + outputAt + "] is " + output);
|
||||
assert.isTrue(endsWith(output, getWatchDiagnosticWithoutDate(host, diagnosticMessage)), "outputs[" + outputAt + "] is " + output);
|
||||
}
|
||||
|
||||
function getWatchDiagnosticWithoutDate(host: WatchedSystem, diagnosticMessage: DiagnosticMessage) {
|
||||
@ -333,13 +360,13 @@ namespace ts.tscWatch {
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf(commonFile2Name), commonFile2Name.length, Diagnostics.File_0_not_found, commonFile2.path),
|
||||
getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf("y"), 1, Diagnostics.Cannot_find_name_0, "y")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
host.reloadFS([file1, commonFile2, libFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkProgramRootFiles(watch(), [file1.path]);
|
||||
checkProgramActualFiles(watch(), [file1.path, libFile.path, commonFile2.path]);
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("should reflect change in config file", () => {
|
||||
@ -667,7 +694,7 @@ namespace ts.tscWatch {
|
||||
const watch = createWatchModeWithConfigFile(config.path, host);
|
||||
|
||||
checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]);
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
host.reloadFS([file1, file2, libFile]);
|
||||
host.checkTimeoutQueueLengthAndRun(1);
|
||||
@ -675,7 +702,7 @@ namespace ts.tscWatch {
|
||||
assert.equal(host.exitCode, ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticWithoutFile(Diagnostics.File_0_not_found, config.path)
|
||||
], /*isInitial*/ undefined, /*skipWaiting*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected, /*skipWaiting*/ true);
|
||||
});
|
||||
|
||||
it("Proper errors: document is not contained in project", () => {
|
||||
@ -778,7 +805,7 @@ namespace ts.tscWatch {
|
||||
};
|
||||
const host = createWatchedSystem([moduleFile, file1, libFile]);
|
||||
const watch = createWatchModeWithoutConfigFile([file1.path], host);
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
const moduleFileOldPath = moduleFile.path;
|
||||
const moduleFileNewPath = "/a/b/moduleFile1.ts";
|
||||
@ -787,12 +814,12 @@ namespace ts.tscWatch {
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile")
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
|
||||
moduleFile.path = moduleFileOldPath;
|
||||
host.reloadFS([moduleFile, file1, libFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("rename a module file and rename back should restore the states for configured projects", () => {
|
||||
@ -810,7 +837,7 @@ namespace ts.tscWatch {
|
||||
};
|
||||
const host = createWatchedSystem([moduleFile, file1, configFile, libFile]);
|
||||
const watch = createWatchModeWithConfigFile(configFile.path, host);
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
const moduleFileOldPath = moduleFile.path;
|
||||
const moduleFileNewPath = "/a/b/moduleFile1.ts";
|
||||
@ -819,12 +846,12 @@ namespace ts.tscWatch {
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile")
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
|
||||
moduleFile.path = moduleFileOldPath;
|
||||
host.reloadFS([moduleFile, file1, configFile, libFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("types should load from config file path if config exists", () => {
|
||||
@ -863,11 +890,11 @@ namespace ts.tscWatch {
|
||||
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
host.reloadFS([file1, moduleFile, libFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("Configure file diagnostics events are generated when the config file has errors", () => {
|
||||
@ -890,7 +917,7 @@ namespace ts.tscWatch {
|
||||
checkOutputErrors(host, [
|
||||
getUnknownCompilerOption(watch(), configFile, "foo"),
|
||||
getUnknownCompilerOption(watch(), configFile, "allowJS")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.BeforeCompilationStarts);
|
||||
});
|
||||
|
||||
it("If config file doesnt have errors, they are not reported", () => {
|
||||
@ -907,7 +934,7 @@ namespace ts.tscWatch {
|
||||
|
||||
const host = createWatchedSystem([file, configFile, libFile]);
|
||||
createWatchModeWithConfigFile(configFile.path, host);
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
});
|
||||
|
||||
it("Reports errors when the config file changes", () => {
|
||||
@ -924,7 +951,7 @@ namespace ts.tscWatch {
|
||||
|
||||
const host = createWatchedSystem([file, configFile, libFile]);
|
||||
const watch = createWatchModeWithConfigFile(configFile.path, host);
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
configFile.content = `{
|
||||
"compilerOptions": {
|
||||
@ -935,14 +962,14 @@ namespace ts.tscWatch {
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, [
|
||||
getUnknownCompilerOption(watch(), configFile, "haha")
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
|
||||
configFile.content = `{
|
||||
"compilerOptions": {}
|
||||
}`;
|
||||
host.reloadFS([file, configFile, libFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("non-existing directories listed in config file input array should be tolerated without crashing the server", () => {
|
||||
@ -1030,13 +1057,13 @@ namespace ts.tscWatch {
|
||||
getDiagnosticOfFile(watch().getCompilerOptions().configFile, configFile.content.indexOf('"declaration"'), '"declaration"'.length, Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration")
|
||||
];
|
||||
const intialErrors = errors();
|
||||
checkOutputErrors(host, intialErrors, /*isInitial*/ true);
|
||||
checkOutputErrors(host, intialErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
configFile.content = configFileContentWithoutCommentLine;
|
||||
host.reloadFS(files);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
const nowErrors = errors();
|
||||
checkOutputErrors(host, nowErrors);
|
||||
checkOutputErrors(host, nowErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
assert.equal(nowErrors[0].start, intialErrors[0].start - configFileContentComment.length);
|
||||
assert.equal(nowErrors[1].start, intialErrors[1].start - configFileContentComment.length);
|
||||
});
|
||||
@ -1516,11 +1543,11 @@ namespace ts.tscWatch {
|
||||
function verifyEmittedFiles(host: WatchedSystem, emittedFiles: EmittedFile[]) {
|
||||
for (const { path, content, shouldBeWritten } of emittedFiles) {
|
||||
if (shouldBeWritten) {
|
||||
assert(host.fileExists(path), `Expected file ${path} to be present`);
|
||||
assert.isTrue(host.fileExists(path), `Expected file ${path} to be present`);
|
||||
assert.equal(host.readFile(path), content, `Contents of file ${path} do not match`);
|
||||
}
|
||||
else {
|
||||
assert(!host.fileExists(path), `Expected file ${path} to be absent`);
|
||||
assert.isNotTrue(host.fileExists(path), `Expected file ${path} to be absent`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1667,7 +1694,7 @@ namespace ts.tscWatch {
|
||||
const cannotFindFoo = getDiagnosticOfFileFromProgram(watch(), imported.path, imported.content.indexOf("foo"), "foo".length, Diagnostics.Cannot_find_name_0, "foo");
|
||||
|
||||
// ensure that imported file was found
|
||||
checkOutputErrors(host, [f1IsNotModule, cannotFindFoo], /*isInitial*/ true);
|
||||
checkOutputErrors(host, [f1IsNotModule, cannotFindFoo], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
const originalFileExists = host.fileExists;
|
||||
{
|
||||
@ -1687,7 +1714,7 @@ namespace ts.tscWatch {
|
||||
f1IsNotModule,
|
||||
getDiagnosticOfFileFromProgram(watch(), root.path, newContent.indexOf("var x") + "var ".length, "x".length, Diagnostics.Type_0_is_not_assignable_to_type_1, 1, "string"),
|
||||
cannotFindFoo
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
}
|
||||
{
|
||||
let fileExistsIsCalled = false;
|
||||
@ -1696,7 +1723,7 @@ namespace ts.tscWatch {
|
||||
return false;
|
||||
}
|
||||
fileExistsIsCalled = true;
|
||||
assert(fileName.indexOf("/f2.") !== -1);
|
||||
assert.isTrue(fileName.indexOf("/f2.") !== -1);
|
||||
return originalFileExists.call(host, fileName);
|
||||
};
|
||||
|
||||
@ -1709,9 +1736,9 @@ namespace ts.tscWatch {
|
||||
// ensure file has correct number of errors after edit
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), root, "f2")
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
|
||||
assert(fileExistsIsCalled);
|
||||
assert.isTrue(fileExistsIsCalled);
|
||||
}
|
||||
{
|
||||
let fileExistsCalled = false;
|
||||
@ -1720,7 +1747,7 @@ namespace ts.tscWatch {
|
||||
return false;
|
||||
}
|
||||
fileExistsCalled = true;
|
||||
assert(fileName.indexOf("/f1.") !== -1);
|
||||
assert.isTrue(fileName.indexOf("/f1.") !== -1);
|
||||
return originalFileExists.call(host, fileName);
|
||||
};
|
||||
|
||||
@ -1730,8 +1757,8 @@ namespace ts.tscWatch {
|
||||
host.reloadFS(files);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
|
||||
checkOutputErrors(host, [f1IsNotModule, cannotFindFoo]);
|
||||
assert(fileExistsCalled);
|
||||
checkOutputErrors(host, [f1IsNotModule, cannotFindFoo], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
assert.isTrue(fileExistsCalled);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1764,18 +1791,18 @@ namespace ts.tscWatch {
|
||||
|
||||
const watch = createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD });
|
||||
|
||||
assert(fileExistsCalledForBar, "'fileExists' should be called");
|
||||
assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called");
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), root, "bar")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
fileExistsCalledForBar = false;
|
||||
root.content = `import {y} from "bar"`;
|
||||
host.reloadFS(files.concat(imported));
|
||||
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
assert(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
});
|
||||
|
||||
it("should compile correctly when resolved module goes missing and then comes back (module is not part of the root)", () => {
|
||||
@ -1806,22 +1833,22 @@ namespace ts.tscWatch {
|
||||
|
||||
const watch = createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD });
|
||||
|
||||
assert(fileExistsCalledForBar, "'fileExists' should be called");
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called");
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
fileExistsCalledForBar = false;
|
||||
host.reloadFS(files);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
assert(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), root, "bar")
|
||||
]);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
|
||||
fileExistsCalledForBar = false;
|
||||
host.reloadFS(filesWithImported);
|
||||
host.checkTimeoutQueueLengthAndRun(1);
|
||||
assert(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called.");
|
||||
});
|
||||
|
||||
it("works when module resolution changes to ambient module", () => {
|
||||
@ -1857,11 +1884,11 @@ declare module "fs" {
|
||||
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), root, "fs")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
host.reloadFS(filesWithNodeType);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("works when included file with ambient module changes", () => {
|
||||
@ -1899,12 +1926,12 @@ declare module "fs" {
|
||||
|
||||
checkOutputErrors(host, [
|
||||
getDiagnosticModuleNotFoundOfFile(watch(), root, "fs")
|
||||
], /*isInitial*/ true);
|
||||
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
|
||||
file.content += fileContentWithFS;
|
||||
host.reloadFS(files);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
});
|
||||
|
||||
it("works when reusing program with files from external library", () => {
|
||||
@ -1939,7 +1966,7 @@ declare module "fs" {
|
||||
const host = createWatchedSystem(programFiles.concat(configFile), { currentDirectory: "/a/b/projects/myProject/" });
|
||||
const watch = createWatchModeWithConfigFile(configFile.path, host);
|
||||
checkProgramActualFiles(watch(), programFiles.map(f => f.path));
|
||||
checkOutputErrors(host, emptyArray, /*isInitial*/ true);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
|
||||
const expectedFiles: ExpectedFile[] = [
|
||||
createExpectedEmittedFile(file1),
|
||||
createExpectedEmittedFile(file2),
|
||||
@ -1958,7 +1985,7 @@ declare module "fs" {
|
||||
host.reloadFS(programFiles.concat(configFile));
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
checkProgramActualFiles(watch(), programFiles.map(f => f.path));
|
||||
checkOutputErrors(host, emptyArray);
|
||||
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
|
||||
verifyExpectedFiles(expectedFiles);
|
||||
|
||||
|
||||
@ -2023,13 +2050,13 @@ declare module "fs" {
|
||||
|
||||
checkProgramActualFiles(watch(), mapDefined(files, f => f === configFile ? undefined : f.path));
|
||||
const outputFile1 = changeExtension((outputFolder + getBaseFileName(file1.path)), ".js");
|
||||
assert(host.fileExists(outputFile1));
|
||||
assert.isTrue(host.fileExists(outputFile1));
|
||||
assert.equal(host.readFile(outputFile1), file1.content + host.newLine);
|
||||
});
|
||||
});
|
||||
|
||||
describe("tsc-watch console clearing", () => {
|
||||
it("doesn't clear the console when it starts", () => {
|
||||
it("clears the console when it starts", () => {
|
||||
const file = {
|
||||
path: "f.ts",
|
||||
content: ""
|
||||
@ -2039,7 +2066,7 @@ declare module "fs" {
|
||||
createWatchModeWithoutConfigFile([file.path], host);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
|
||||
host.checkScreenClears(0);
|
||||
host.checkScreenClears(1);
|
||||
});
|
||||
|
||||
it("clears the console on recompile", () => {
|
||||
@ -2057,7 +2084,7 @@ declare module "fs" {
|
||||
host.reloadFS([modifiedFile]);
|
||||
host.runQueuedTimeoutCallbacks();
|
||||
|
||||
host.checkScreenClears(1);
|
||||
host.checkScreenClears(2);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -11,20 +11,20 @@ namespace ts {
|
||||
function assertParseError(jsonText: string) {
|
||||
const parsed = ts.parseConfigFileTextToJson("/apath/tsconfig.json", jsonText);
|
||||
assert.deepEqual(parsed.config, {});
|
||||
assert(undefined !== parsed.error);
|
||||
assert.isTrue(undefined !== parsed.error);
|
||||
}
|
||||
|
||||
function assertParseErrorWithExcludesKeyword(jsonText: string) {
|
||||
{
|
||||
const parsed = ts.parseConfigFileTextToJson("/apath/tsconfig.json", jsonText);
|
||||
const parsedCommand = ts.parseJsonConfigFileContent(parsed.config, ts.sys, "tests/cases/unittests");
|
||||
assert(parsedCommand.errors && parsedCommand.errors.length === 1 &&
|
||||
assert.isTrue(parsedCommand.errors && parsedCommand.errors.length === 1 &&
|
||||
parsedCommand.errors[0].code === ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude.code);
|
||||
}
|
||||
{
|
||||
const parsed = ts.parseJsonText("/apath/tsconfig.json", jsonText);
|
||||
const parsedCommand = ts.parseJsonSourceFileConfigFileContent(parsed, ts.sys, "tests/cases/unittests");
|
||||
assert(parsedCommand.errors && parsedCommand.errors.length === 1 &&
|
||||
assert.isTrue(parsedCommand.errors && parsedCommand.errors.length === 1 &&
|
||||
parsedCommand.errors[0].code === ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude.code);
|
||||
}
|
||||
}
|
||||
@ -44,26 +44,26 @@ namespace ts {
|
||||
function assertParseFileList(jsonText: string, configFileName: string, basePath: string, allFileList: string[], expectedFileList: string[]) {
|
||||
{
|
||||
const parsed = getParsedCommandJson(jsonText, configFileName, basePath, allFileList);
|
||||
assert(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort()));
|
||||
assert.isTrue(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort()));
|
||||
}
|
||||
{
|
||||
const parsed = getParsedCommandJsonNode(jsonText, configFileName, basePath, allFileList);
|
||||
assert(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort()));
|
||||
assert.isTrue(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort()));
|
||||
}
|
||||
}
|
||||
|
||||
function assertParseFileDiagnostics(jsonText: string, configFileName: string, basePath: string, allFileList: string[], expectedDiagnosticCode: number, noLocation?: boolean) {
|
||||
{
|
||||
const parsed = getParsedCommandJson(jsonText, configFileName, basePath, allFileList);
|
||||
assert(parsed.errors.length >= 0);
|
||||
assert(parsed.errors.filter(e => e.code === expectedDiagnosticCode).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)}`);
|
||||
assert.isTrue(parsed.errors.length >= 0);
|
||||
assert.isTrue(parsed.errors.filter(e => e.code === expectedDiagnosticCode).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)}`);
|
||||
}
|
||||
{
|
||||
const parsed = getParsedCommandJsonNode(jsonText, configFileName, basePath, allFileList);
|
||||
assert(parsed.errors.length >= 0);
|
||||
assert(parsed.errors.filter(e => e.code === expectedDiagnosticCode).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)}`);
|
||||
assert.isTrue(parsed.errors.length >= 0);
|
||||
assert.isTrue(parsed.errors.filter(e => e.code === expectedDiagnosticCode).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)}`);
|
||||
if (!noLocation) {
|
||||
assert(parsed.errors.filter(e => e.code === expectedDiagnosticCode && e.file && e.start && e.length).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)} with location information`);
|
||||
assert.isTrue(parsed.errors.filter(e => e.code === expectedDiagnosticCode && e.file && e.start && e.length).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)} with location information`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -241,7 +241,7 @@ namespace ts {
|
||||
},
|
||||
files: ["file1.ts"]
|
||||
};
|
||||
assert(diagnostics.length === 2);
|
||||
assert.isTrue(diagnostics.length === 2);
|
||||
assert.equal(JSON.stringify(configJsonObject), JSON.stringify(expectedResult));
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -228,6 +228,37 @@ namespace ts.projectSystem {
|
||||
projectService.checkNumberOfProjects({ externalProjects: 1 });
|
||||
});
|
||||
|
||||
it("external project - deduplicate from local @types packages", () => {
|
||||
const appJs = {
|
||||
path: "/a/b/app.js",
|
||||
content: ""
|
||||
};
|
||||
const nodeDts = {
|
||||
path: "/node_modules/@types/node/index.d.ts",
|
||||
content: "declare var node;"
|
||||
};
|
||||
const host = createServerHost([appJs, nodeDts]);
|
||||
const installer = new (class extends Installer {
|
||||
constructor() {
|
||||
super(host, { typesRegistry: createTypesRegistry("node") });
|
||||
}
|
||||
installWorker() {
|
||||
assert(false, "nothing should get installed");
|
||||
}
|
||||
})();
|
||||
|
||||
const projectFileName = "/a/app/test.csproj";
|
||||
const projectService = createProjectService(host, { typingsInstaller: installer });
|
||||
projectService.openExternalProject({
|
||||
projectFileName,
|
||||
options: {},
|
||||
rootFiles: [toExternalFile(appJs.path)],
|
||||
typeAcquisition: { enable: true, include: ["node"] }
|
||||
});
|
||||
installer.checkPendingCommands(/*expectedCount*/ 0);
|
||||
projectService.checkNumberOfProjects({ externalProjects: 1 });
|
||||
});
|
||||
|
||||
it("external project - no auto in typing acquisition, no .d.ts/js files", () => {
|
||||
const file1 = {
|
||||
path: "/a/b/app.ts",
|
||||
@ -292,7 +323,7 @@ namespace ts.projectSystem {
|
||||
typeAcquisition: { enable: true, include: ["jquery"] }
|
||||
});
|
||||
|
||||
assert(enqueueIsCalled, "expected enqueueIsCalled to be true");
|
||||
assert.isTrue(enqueueIsCalled, "expected enqueueIsCalled to be true");
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
|
||||
// auto is set in type acquisition - use it even if project contains only .ts files
|
||||
@ -598,7 +629,7 @@ namespace ts.projectSystem {
|
||||
installer.executePendingCommands();
|
||||
// expected all typings file to exist
|
||||
for (const f of typingFiles) {
|
||||
assert(host.fileExists(f.path), `expected file ${f.path} to exist`);
|
||||
assert.isTrue(host.fileExists(f.path), `expected file ${f.path} to exist`);
|
||||
}
|
||||
host.checkTimeoutQueueLengthAndRun(2);
|
||||
checkNumberOfProjects(projectService, { externalProjects: 1 });
|
||||
@ -934,8 +965,8 @@ namespace ts.projectSystem {
|
||||
|
||||
installer.installAll(/*expectedCount*/1);
|
||||
|
||||
assert(host.fileExists(node.path), "typings for 'node' should be created");
|
||||
assert(host.fileExists(commander.path), "typings for 'commander' should be created");
|
||||
assert.isTrue(host.fileExists(node.path), "typings for 'node' should be created");
|
||||
assert.isTrue(host.fileExists(commander.path), "typings for 'commander' should be created");
|
||||
|
||||
checkProjectActualFiles(service.inferredProjects[0], [file.path, node.path, commander.path]);
|
||||
});
|
||||
@ -978,7 +1009,7 @@ namespace ts.projectSystem {
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
});
|
||||
|
||||
it("cached unresolved typings are not recomputed if program structure did not change", () => {
|
||||
it("should recompute resolutions after typings are installed", () => {
|
||||
const host = createServerHost([]);
|
||||
const session = createSession(host);
|
||||
const f = {
|
||||
@ -1020,7 +1051,7 @@ namespace ts.projectSystem {
|
||||
session.executeCommand(changeRequest);
|
||||
host.checkTimeoutQueueLengthAndRun(2); // This enqueues the updategraph and refresh inferred projects
|
||||
const version2 = proj.getCachedUnresolvedImportsPerFile_TestOnly().getVersion();
|
||||
assert.equal(version1, version2, "set of unresolved imports should not change");
|
||||
assert.notEqual(version1, version2, "set of unresolved imports should change");
|
||||
});
|
||||
});
|
||||
|
||||
@ -1076,7 +1107,7 @@ namespace ts.projectSystem {
|
||||
projectService.openClientFile(f1.path);
|
||||
|
||||
installer.checkPendingCommands(/*expectedCount*/ 0);
|
||||
assert(messages.indexOf("Package name '; say ‘Hello from TypeScript!’ #' contains non URI safe characters") > 0, "should find package with invalid name");
|
||||
assert.isTrue(messages.indexOf("Package name '; say ‘Hello from TypeScript!’ #' contains non URI safe characters") > 0, "should find package with invalid name");
|
||||
});
|
||||
});
|
||||
|
||||
@ -1225,7 +1256,7 @@ namespace ts.projectSystem {
|
||||
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
|
||||
assert(seenTelemetryEvent);
|
||||
assert.isTrue(seenTelemetryEvent);
|
||||
host.checkTimeoutQueueLengthAndRun(2);
|
||||
checkNumberOfProjects(projectService, { inferredProjects: 1 });
|
||||
checkProjectActualFiles(projectService.inferredProjects[0], [f1.path, commander.path]);
|
||||
@ -1276,10 +1307,10 @@ namespace ts.projectSystem {
|
||||
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
|
||||
assert(!!beginEvent);
|
||||
assert(!!endEvent);
|
||||
assert(beginEvent.eventId === endEvent.eventId);
|
||||
assert(endEvent.installSuccess);
|
||||
assert.isTrue(!!beginEvent);
|
||||
assert.isTrue(!!endEvent);
|
||||
assert.isTrue(beginEvent.eventId === endEvent.eventId);
|
||||
assert.isTrue(endEvent.installSuccess);
|
||||
host.checkTimeoutQueueLengthAndRun(2);
|
||||
checkNumberOfProjects(projectService, { inferredProjects: 1 });
|
||||
checkProjectActualFiles(projectService.inferredProjects[0], [f1.path, commander.path]);
|
||||
@ -1322,9 +1353,9 @@ namespace ts.projectSystem {
|
||||
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
|
||||
assert(!!beginEvent);
|
||||
assert(!!endEvent);
|
||||
assert(beginEvent.eventId === endEvent.eventId);
|
||||
assert.isTrue(!!beginEvent);
|
||||
assert.isTrue(!!endEvent);
|
||||
assert.isTrue(beginEvent.eventId === endEvent.eventId);
|
||||
assert.isFalse(endEvent.installSuccess);
|
||||
checkNumberOfProjects(projectService, { inferredProjects: 1 });
|
||||
checkProjectActualFiles(projectService.inferredProjects[0], [f1.path]);
|
||||
|
||||
@ -34,7 +34,7 @@ var p:Point=new Point();
|
||||
var q:Point=<Point>p;`;
|
||||
|
||||
const { lines } = server.LineIndex.linesFromText(testContent);
|
||||
assert(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
|
||||
const lineIndex = new server.LineIndex();
|
||||
lineIndex.load(lines);
|
||||
@ -94,7 +94,7 @@ that was purple at the tips
|
||||
and grew 1cm per day`;
|
||||
|
||||
({ lines, lineMap } = server.LineIndex.linesFromText(testContent));
|
||||
assert(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
|
||||
const lineIndex = new server.LineIndex();
|
||||
lineIndex.load(lines);
|
||||
@ -203,10 +203,10 @@ and grew 1cm per day`;
|
||||
const testFileName = "src/compiler/scanner.ts";
|
||||
testContent = Harness.IO.readFile(testFileName);
|
||||
const totalChars = testContent.length;
|
||||
assert(totalChars > 0, "Failed to read test file.");
|
||||
assert.isTrue(totalChars > 0, "Failed to read test file.");
|
||||
|
||||
({ lines, lineMap } = server.LineIndex.linesFromText(testContent));
|
||||
assert(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
assert.isTrue(lines.length > 0, "Failed to initialize test text. Expected text to have at least one line");
|
||||
|
||||
lineIndex = new server.LineIndex();
|
||||
lineIndex.load(lines);
|
||||
|
||||
@ -162,7 +162,7 @@ namespace Utils {
|
||||
/**
|
||||
* Reads the directory at the given path and retrieves a list of file names and a list
|
||||
* of directory names within it. Suitable for use with ts.matchFiles()
|
||||
* @param path The path to the directory to be read
|
||||
* @param path The path to the directory to be read
|
||||
*/
|
||||
getAccessibleFileSystemEntries(path: string) {
|
||||
const entry = this.traversePath(path);
|
||||
|
||||
@ -139,7 +139,7 @@ interface Array<T> {}`
|
||||
function checkMapKeys(caption: string, map: Map<any>, expectedKeys: ReadonlyArray<string>) {
|
||||
verifyMapSize(caption, map, expectedKeys);
|
||||
for (const name of expectedKeys) {
|
||||
assert(map.has(name), `${caption} is expected to contain ${name}, actual keys: ${arrayFrom(map.keys())}`);
|
||||
assert.isTrue(map.has(name), `${caption} is expected to contain ${name}, actual keys: ${arrayFrom(map.keys())}`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ interface Array<T> {}`
|
||||
mapSeen.set(f, true);
|
||||
}
|
||||
}
|
||||
assert.equal(mapExpected.size, 0, `Output has missing ${JSON.stringify(flatMapIter(mapExpected.keys(), key => key))} in ${JSON.stringify(host.getOutput())}`);
|
||||
assert.equal(mapExpected.size, 0, `Output has missing ${JSON.stringify(arrayFrom(mapExpected.keys()))} in ${JSON.stringify(host.getOutput())}`);
|
||||
}
|
||||
|
||||
export function checkOutputDoesNotContain(host: TestServerHost, expectedToBeAbsent: string[] | ReadonlyArray<string>) {
|
||||
@ -241,7 +241,7 @@ interface Array<T> {}`
|
||||
ignoreWatchInvokedWithTriggerAsFileCreate: boolean;
|
||||
}
|
||||
|
||||
export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost {
|
||||
export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, ModuleResolutionHost {
|
||||
args: string[] = [];
|
||||
|
||||
private readonly output: string[] = [];
|
||||
@ -547,7 +547,7 @@ interface Array<T> {}`
|
||||
}
|
||||
|
||||
readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[] {
|
||||
return ts.matchFiles(this.toNormalizedAbsolutePath(path), extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, (dir) => {
|
||||
return ts.matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, (dir) => {
|
||||
const directories: string[] = [];
|
||||
const files: string[] = [];
|
||||
const dirEntry = this.fs.get(this.toPath(dir));
|
||||
|
||||
135
src/lib/dom.generated.d.ts
vendored
135
src/lib/dom.generated.d.ts
vendored
@ -761,7 +761,7 @@ interface ProgressEventInit extends EventInit {
|
||||
}
|
||||
|
||||
interface PushSubscriptionOptionsInit {
|
||||
applicationServerKey?: any;
|
||||
applicationServerKey?: BufferSource | null;
|
||||
userVisibleOnly?: boolean;
|
||||
}
|
||||
|
||||
@ -770,7 +770,8 @@ interface RegistrationOptions {
|
||||
}
|
||||
|
||||
interface RequestInit {
|
||||
body?: any;
|
||||
signal?: AbortSignal;
|
||||
body?: Blob | BufferSource | FormData | string | null;
|
||||
cache?: RequestCache;
|
||||
credentials?: RequestCredentials;
|
||||
headers?: HeadersInit;
|
||||
@ -1088,7 +1089,7 @@ interface RTCTransportStats extends RTCStats {
|
||||
}
|
||||
|
||||
interface ScopedCredentialDescriptor {
|
||||
id: any;
|
||||
id: BufferSource;
|
||||
transports?: Transport[];
|
||||
type: ScopedCredentialType;
|
||||
}
|
||||
@ -3596,11 +3597,11 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
slot: string;
|
||||
readonly shadowRoot: ShadowRoot | null;
|
||||
getAttribute(name: string): string | null;
|
||||
getAttributeNode(name: string): Attr;
|
||||
getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
|
||||
getAttributeNode(name: string): Attr | null;
|
||||
getAttributeNodeNS(namespaceURI: string, localName: string): Attr | null;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getBoundingClientRect(): ClientRect;
|
||||
getClientRects(): ClientRectList;
|
||||
getBoundingClientRect(): ClientRect | DOMRect;
|
||||
getClientRects(): ClientRectList | DOMRectList;
|
||||
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(name: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
||||
getElementsByTagName<K extends keyof SVGElementTagNameMap>(name: K): NodeListOf<SVGElementTagNameMap[K]>;
|
||||
getElementsByTagName(name: string): NodeListOf<Element>;
|
||||
@ -3757,9 +3758,10 @@ declare var External: {
|
||||
};
|
||||
|
||||
interface File extends Blob {
|
||||
readonly lastModifiedDate: any;
|
||||
readonly lastModifiedDate: Date;
|
||||
readonly name: string;
|
||||
readonly webkitRelativePath: string;
|
||||
readonly lastModified: number;
|
||||
}
|
||||
|
||||
declare var File: {
|
||||
@ -4897,6 +4899,7 @@ interface HTMLFormElement extends HTMLElement {
|
||||
*/
|
||||
submit(): void;
|
||||
reportValidity(): boolean;
|
||||
reportValidity(): boolean;
|
||||
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
||||
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
||||
@ -5200,6 +5203,10 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
|
||||
* Sets or retrieves the width of the object.
|
||||
*/
|
||||
width: string;
|
||||
/**
|
||||
* Sets or retrives the content of the page that is to contain.
|
||||
*/
|
||||
srcdoc: string;
|
||||
addEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
||||
removeEventListener<K extends keyof HTMLIFrameElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
||||
@ -5495,8 +5502,9 @@ interface HTMLInputElement extends HTMLElement {
|
||||
* Sets the start and end positions of a selection in a text field.
|
||||
* @param start The offset into the text field for the start of the selection.
|
||||
* @param end The offset into the text field for the end of the selection.
|
||||
* @param direction The direction in which the selection is performed.
|
||||
*/
|
||||
setSelectionRange(start?: number, end?: number, direction?: string): void;
|
||||
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
|
||||
/**
|
||||
* Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
|
||||
* @param n Value to decrement the value by.
|
||||
@ -6057,6 +6065,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
readonly willValidate: boolean;
|
||||
typemustmatch: boolean;
|
||||
/**
|
||||
* Returns whether a form will validate when it is submitted, without having to submit it.
|
||||
*/
|
||||
@ -6958,8 +6967,9 @@ interface HTMLTextAreaElement extends HTMLElement {
|
||||
* Sets the start and end positions of a selection in a text field.
|
||||
* @param start The offset into the text field for the start of the selection.
|
||||
* @param end The offset into the text field for the end of the selection.
|
||||
* @param direction The direction in which the selection is performed.
|
||||
*/
|
||||
setSelectionRange(start: number, end: number): void;
|
||||
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
|
||||
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
||||
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
||||
@ -7362,10 +7372,10 @@ declare var IntersectionObserver: {
|
||||
};
|
||||
|
||||
interface IntersectionObserverEntry {
|
||||
readonly boundingClientRect: ClientRect;
|
||||
readonly boundingClientRect: ClientRect | DOMRect;
|
||||
readonly intersectionRatio: number;
|
||||
readonly intersectionRect: ClientRect;
|
||||
readonly rootBounds: ClientRect;
|
||||
readonly intersectionRect: ClientRect | DOMRect;
|
||||
readonly rootBounds: ClientRect | DOMRect;
|
||||
readonly target: Element;
|
||||
readonly time: number;
|
||||
readonly isIntersecting: boolean;
|
||||
@ -7534,7 +7544,7 @@ declare var MediaKeyMessageEvent: {
|
||||
|
||||
interface MediaKeys {
|
||||
createSession(sessionType?: MediaKeySessionType): MediaKeySession;
|
||||
setServerCertificate(serverCertificate: any): Promise<void>;
|
||||
setServerCertificate(serverCertificate: BufferSource): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeys: {
|
||||
@ -7548,10 +7558,10 @@ interface MediaKeySession extends EventTarget {
|
||||
readonly keyStatuses: MediaKeyStatusMap;
|
||||
readonly sessionId: string;
|
||||
close(): Promise<void>;
|
||||
generateRequest(initDataType: string, initData: any): Promise<void>;
|
||||
generateRequest(initDataType: string, initData: BufferSource): Promise<void>;
|
||||
load(sessionId: string): Promise<boolean>;
|
||||
remove(): Promise<void>;
|
||||
update(response: any): Promise<void>;
|
||||
update(response: BufferSource): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeySession: {
|
||||
@ -7562,8 +7572,8 @@ declare var MediaKeySession: {
|
||||
interface MediaKeyStatusMap {
|
||||
readonly size: number;
|
||||
forEach(callback: ForEachCallback): void;
|
||||
get(keyId: any): MediaKeyStatus;
|
||||
has(keyId: any): boolean;
|
||||
get(keyId: BufferSource): MediaKeyStatus;
|
||||
has(keyId: BufferSource): boolean;
|
||||
}
|
||||
|
||||
declare var MediaKeyStatusMap: {
|
||||
@ -9163,8 +9173,8 @@ interface Range {
|
||||
detach(): void;
|
||||
expand(Unit: ExpandGranularity): boolean;
|
||||
extractContents(): DocumentFragment;
|
||||
getBoundingClientRect(): ClientRect;
|
||||
getClientRects(): ClientRectList;
|
||||
getBoundingClientRect(): ClientRect | DOMRect;
|
||||
getClientRects(): ClientRectList | DOMRectList;
|
||||
insertNode(newNode: Node): void;
|
||||
selectNode(refNode: Node): void;
|
||||
selectNodeContents(refNode: Node): void;
|
||||
@ -9227,6 +9237,7 @@ interface Request extends Object, Body {
|
||||
readonly referrerPolicy: ReferrerPolicy;
|
||||
readonly type: RequestType;
|
||||
readonly url: string;
|
||||
readonly signal: AbortSignal;
|
||||
clone(): Request;
|
||||
}
|
||||
|
||||
@ -12213,7 +12224,7 @@ interface URL {
|
||||
|
||||
declare var URL: {
|
||||
prototype: URL;
|
||||
new(url: string, base?: string): URL;
|
||||
new(url: string, base?: string | URL): URL;
|
||||
createObjectURL(object: any, options?: ObjectURLOptions): string;
|
||||
revokeObjectURL(url: string): void;
|
||||
};
|
||||
@ -12301,8 +12312,8 @@ declare var WaveShaperNode: {
|
||||
};
|
||||
|
||||
interface WebAuthentication {
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
getAssertion(assertionChallenge: BufferSource, options?: AssertionOptions): Promise<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: BufferSource, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
}
|
||||
|
||||
declare var WebAuthentication: {
|
||||
@ -14657,6 +14668,23 @@ declare var HTMLSummaryElement: {
|
||||
new(): HTMLSummaryElement;
|
||||
};
|
||||
|
||||
interface DOMRectReadOnly {
|
||||
readonly bottom: number;
|
||||
readonly height: number;
|
||||
readonly left: number;
|
||||
readonly right: number;
|
||||
readonly top: number;
|
||||
readonly width: number;
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
}
|
||||
|
||||
declare var DOMRectReadOnly: {
|
||||
prototype: DOMRectReadOnly;
|
||||
new (x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
|
||||
fromRect(rectangle?: DOMRectInit): DOMRectReadOnly;
|
||||
};
|
||||
|
||||
interface EXT_blend_minmax {
|
||||
readonly MIN_EXT: number;
|
||||
readonly MAX_EXT: number;
|
||||
@ -14675,6 +14703,25 @@ interface EXT_sRGB {
|
||||
readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: number;
|
||||
}
|
||||
|
||||
interface DOMRect extends DOMRectReadOnly {
|
||||
height: number;
|
||||
width: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
declare var DOMRect: {
|
||||
prototype: DOMRect;
|
||||
new (x?: number, y?: number, width?: number, height?: number): DOMRect;
|
||||
fromRect(rectangle?: DOMRectInit): DOMRect;
|
||||
};
|
||||
|
||||
interface DOMRectList {
|
||||
readonly length: number;
|
||||
item(index: number): DOMRect | null;
|
||||
[index: number]: DOMRect;
|
||||
}
|
||||
|
||||
interface OES_vertex_array_object {
|
||||
readonly VERTEX_ARRAY_BINDING_OES: number;
|
||||
createVertexArrayOES(): WebGLVertexArrayObjectOES;
|
||||
@ -14779,6 +14826,43 @@ interface WEBGL_lose_context {
|
||||
restoreContext(): void;
|
||||
}
|
||||
|
||||
interface AbortController {
|
||||
readonly signal: AbortSignal;
|
||||
abort(): void;
|
||||
}
|
||||
|
||||
declare var AbortController: {
|
||||
prototype: AbortController;
|
||||
new(): AbortController;
|
||||
};
|
||||
|
||||
interface AbortSignal extends EventTarget {
|
||||
readonly aborted: boolean;
|
||||
onabort: (ev: Event) => any;
|
||||
}
|
||||
|
||||
interface EventSource extends EventTarget {
|
||||
readonly url: string;
|
||||
readonly withCredentials: boolean;
|
||||
readonly CONNECTING: number;
|
||||
readonly OPEN: number;
|
||||
readonly CLOSED: number;
|
||||
readonly readyState: number;
|
||||
onopen: (evt: MessageEvent) => any;
|
||||
onmessage: (evt: MessageEvent) => any;
|
||||
onerror: (evt: MessageEvent) => any;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
declare var EventSource: {
|
||||
prototype: EventSource;
|
||||
new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
|
||||
};
|
||||
|
||||
interface EventSourceInit {
|
||||
readonly withCredentials: boolean;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface DecodeErrorCallback {
|
||||
@ -14791,7 +14875,7 @@ interface ErrorEventHandler {
|
||||
(message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
|
||||
}
|
||||
interface ForEachCallback {
|
||||
(keyId: any, status: MediaKeyStatus): void;
|
||||
(keyId: BufferSource, status: MediaKeyStatus): void;
|
||||
}
|
||||
interface FrameRequestCallback {
|
||||
(time: number): void;
|
||||
@ -15029,6 +15113,7 @@ interface SVGElementTagNameMap {
|
||||
"view": SVGViewElement;
|
||||
}
|
||||
|
||||
/** @deprecated Directly use HTMLElementTagNameMap or SVGElementTagNameMap as appropriate, instead. */
|
||||
interface ElementTagNameMap extends HTMLElementTagNameMap, SVGElementTagNameMap { }
|
||||
|
||||
declare var Audio: { new(src?: string): HTMLAudioElement; };
|
||||
@ -15246,7 +15331,7 @@ declare function removeEventListener<K extends keyof WindowEventMap>(type: K, li
|
||||
declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
||||
type AAGUID = string;
|
||||
type AlgorithmIdentifier = string | Algorithm;
|
||||
type BodyInit = any;
|
||||
type BodyInit = Blob | BufferSource | FormData | string;
|
||||
type ByteString = string;
|
||||
type ConstrainBoolean = boolean | ConstrainBooleanParameters;
|
||||
type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
|
||||
|
||||
10
src/lib/es2015.collection.d.ts
vendored
10
src/lib/es2015.collection.d.ts
vendored
@ -10,7 +10,7 @@ interface Map<K, V> {
|
||||
|
||||
interface MapConstructor {
|
||||
new (): Map<any, any>;
|
||||
new <K, V>(entries?: [K, V][]): Map<K, V>;
|
||||
new <K, V>(entries?: ReadonlyArray<[K, V]>): Map<K, V>;
|
||||
readonly prototype: Map<any, any>;
|
||||
}
|
||||
declare var Map: MapConstructor;
|
||||
@ -31,7 +31,7 @@ interface WeakMap<K extends object, V> {
|
||||
|
||||
interface WeakMapConstructor {
|
||||
new (): WeakMap<object, any>;
|
||||
new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
|
||||
new <K extends object, V>(entries?: ReadonlyArray<[K, V]>): WeakMap<K, V>;
|
||||
readonly prototype: WeakMap<object, any>;
|
||||
}
|
||||
declare var WeakMap: WeakMapConstructor;
|
||||
@ -47,7 +47,7 @@ interface Set<T> {
|
||||
|
||||
interface SetConstructor {
|
||||
new (): Set<any>;
|
||||
new <T>(values?: T[]): Set<T>;
|
||||
new <T>(values?: ReadonlyArray<T>): Set<T>;
|
||||
readonly prototype: Set<any>;
|
||||
}
|
||||
declare var Set: SetConstructor;
|
||||
@ -58,7 +58,7 @@ interface ReadonlySet<T> {
|
||||
readonly size: number;
|
||||
}
|
||||
|
||||
interface WeakSet<T> {
|
||||
interface WeakSet<T extends object> {
|
||||
add(value: T): this;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
@ -66,7 +66,7 @@ interface WeakSet<T> {
|
||||
|
||||
interface WeakSetConstructor {
|
||||
new (): WeakSet<object>;
|
||||
new <T extends object>(values?: T[]): WeakSet<T>;
|
||||
new <T extends object>(values?: ReadonlyArray<T>): WeakSet<T>;
|
||||
readonly prototype: WeakSet<object>;
|
||||
}
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
5
src/lib/es2015.core.d.ts
vendored
5
src/lib/es2015.core.d.ts
vendored
@ -118,8 +118,9 @@ interface Math {
|
||||
log1p(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* the natural logarithms).
|
||||
* Returns the result of (e^x - 1), which is an implementation-dependent approximation to
|
||||
* subtracting 1 from the exponential function of x (e raised to the power of x, where e
|
||||
* is the base of the natural logarithms).
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
expm1(x: number): number;
|
||||
|
||||
6
src/lib/es2015.iterable.d.ts
vendored
6
src/lib/es2015.iterable.d.ts
vendored
@ -52,7 +52,7 @@ interface ArrayConstructor {
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
*/
|
||||
from<T>(iterable: Iterable<T>): T[];
|
||||
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
||||
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
@ -60,7 +60,7 @@ interface ArrayConstructor {
|
||||
* @param mapfn A mapping function to call on every element of the array.
|
||||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
||||
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
||||
}
|
||||
|
||||
interface ReadonlyArray<T> {
|
||||
@ -180,7 +180,7 @@ interface SetConstructor {
|
||||
new <T>(iterable: Iterable<T>): Set<T>;
|
||||
}
|
||||
|
||||
interface WeakSet<T> { }
|
||||
interface WeakSet<T extends object> { }
|
||||
|
||||
interface WeakSetConstructor {
|
||||
new <T extends object>(iterable: Iterable<T>): WeakSet<T>;
|
||||
|
||||
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
@ -118,7 +118,7 @@ interface Set<T> {
|
||||
readonly [Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface WeakSet<T> {
|
||||
interface WeakSet<T extends object> {
|
||||
readonly [Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
|
||||
4
src/lib/es2017.object.d.ts
vendored
4
src/lib/es2017.object.d.ts
vendored
@ -9,7 +9,7 @@ interface ObjectConstructor {
|
||||
* Returns an array of values of the enumerable properties of an object
|
||||
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
||||
*/
|
||||
values(o: any): any[];
|
||||
values(o: {}): any[];
|
||||
|
||||
/**
|
||||
* Returns an array of key/values of the enumerable properties of an object
|
||||
@ -21,7 +21,7 @@ interface ObjectConstructor {
|
||||
* Returns an array of key/values of the enumerable properties of an object
|
||||
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
||||
*/
|
||||
entries(o: any): [string, any][];
|
||||
entries(o: {}): [string, any][];
|
||||
|
||||
/**
|
||||
* Returns an object containing all own property descriptors of an object
|
||||
|
||||
2
src/lib/es2018.d.ts
vendored
2
src/lib/es2018.d.ts
vendored
@ -1 +1 @@
|
||||
/// <reference path="lib.es2017.d.ts" />
|
||||
/// <reference path="lib.es2017.d.ts" />
|
||||
|
||||
12
src/lib/es5.d.ts
vendored
12
src/lib/es5.d.ts
vendored
@ -550,7 +550,7 @@ interface Math {
|
||||
*/
|
||||
atan2(y: number, x: number): number;
|
||||
/**
|
||||
* Returns the smallest number greater than or equal to its numeric argument.
|
||||
* Returns the smallest integer greater than or equal to its numeric argument.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
ceil(x: number): number;
|
||||
@ -565,7 +565,7 @@ interface Math {
|
||||
*/
|
||||
exp(x: number): number;
|
||||
/**
|
||||
* Returns the greatest number less than or equal to its numeric argument.
|
||||
* Returns the greatest integer less than or equal to its numeric argument.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
floor(x: number): number;
|
||||
@ -992,12 +992,12 @@ interface ReadonlyArray<T> {
|
||||
* Combines two or more arrays.
|
||||
* @param items Additional items to add to the end of array1.
|
||||
*/
|
||||
concat(...items: ReadonlyArray<T>[]): T[];
|
||||
concat(...items: (T[] | ReadonlyArray<T>)[]): T[];
|
||||
/**
|
||||
* Combines two or more arrays.
|
||||
* @param items Additional items to add to the end of array1.
|
||||
*/
|
||||
concat(...items: (T | ReadonlyArray<T>)[]): T[];
|
||||
concat(...items: (T | T[] | ReadonlyArray<T>)[]): T[];
|
||||
/**
|
||||
* Adds all the elements of an array separated by the specified separator string.
|
||||
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
|
||||
@ -1113,12 +1113,12 @@ interface Array<T> {
|
||||
* Combines two or more arrays.
|
||||
* @param items Additional items to add to the end of array1.
|
||||
*/
|
||||
concat(...items: ReadonlyArray<T>[]): T[];
|
||||
concat(...items: (T[] | ReadonlyArray<T>)[]): T[];
|
||||
/**
|
||||
* Combines two or more arrays.
|
||||
* @param items Additional items to add to the end of array1.
|
||||
*/
|
||||
concat(...items: (T | ReadonlyArray<T>)[]): T[];
|
||||
concat(...items: (T | T[] | ReadonlyArray<T>)[]): T[];
|
||||
/**
|
||||
* Adds all the elements of an array separated by the specified separator string.
|
||||
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
|
||||
|
||||
203
src/lib/esnext.array.d.ts
vendored
Normal file
203
src/lib/esnext.array.d.ts
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
interface ReadonlyArray<T> {
|
||||
|
||||
/**
|
||||
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
||||
* a new array.
|
||||
* This is identical to a map followed by a flatten of depth 1.
|
||||
*
|
||||
* @param callback A function that accepts up to three arguments. The flatMap method calls the
|
||||
* callback function one time for each element in the array.
|
||||
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
||||
* thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
flatMap<U, This = undefined> (
|
||||
callback: (this: This, value: T, index: number, array: T[]) => U|U[],
|
||||
thisArg?: This
|
||||
): U[]
|
||||
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this:
|
||||
ReadonlyArray<U[][][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U[][][]>> |
|
||||
ReadonlyArray<ReadonlyArray<U[][]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<U[]>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<U>[][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[][]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[][]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>[]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>[]>> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>>,
|
||||
depth: 4): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this:
|
||||
ReadonlyArray<U[][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<U[]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<U[][]>> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>,
|
||||
depth: 3): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this:
|
||||
ReadonlyArray<U[][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U[]>> |
|
||||
ReadonlyArray<ReadonlyArray<U>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>,
|
||||
depth: 2): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this:
|
||||
ReadonlyArray<U[]> |
|
||||
ReadonlyArray<ReadonlyArray<U>>,
|
||||
depth?: 1
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this:
|
||||
ReadonlyArray<U>,
|
||||
depth: 0
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth. If no depth is provided, flatten method defaults to the depth of 1.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(depth?: number): any[];
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
|
||||
/**
|
||||
* Calls a defined callback function on each element of an array. Then, flattens the result into
|
||||
* a new array.
|
||||
* This is identical to a map followed by a flatten of depth 1.
|
||||
*
|
||||
* @param callback A function that accepts up to three arguments. The flatMap method calls the
|
||||
* callback function one time for each element in the array.
|
||||
* @param thisArg An object to which the this keyword can refer in the callback function. If
|
||||
* thisArg is omitted, undefined is used as the this value.
|
||||
*/
|
||||
flatMap<U, This = undefined> (
|
||||
callback: (this: This, value: T, index: number, array: T[]) => U|U[],
|
||||
thisArg?: This
|
||||
): U[]
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][][][][][][], depth: 7): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][][][][][], depth: 6): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][][][][], depth: 5): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][][][], depth: 4): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][][], depth: 3): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][][], depth: 2): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[][], depth?: 1): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(this: U[], depth: 0): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth. If no depth is provided, flatten method defaults to the depth of 1.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flatten<U>(depth?: number): any[];
|
||||
}
|
||||
4
src/lib/esnext.d.ts
vendored
4
src/lib/esnext.d.ts
vendored
@ -1,2 +1,4 @@
|
||||
/// <reference path="lib.es2017.d.ts" />
|
||||
/// <reference path="lib.es2018.d.ts" />
|
||||
/// <reference path="lib.esnext.asynciterable.d.ts" />
|
||||
/// <reference path="lib.esnext.array.d.ts" />
|
||||
/// <reference path="lib.esnext.promise.d.ts" />
|
||||
|
||||
12
src/lib/esnext.promise.d.ts
vendored
Normal file
12
src/lib/esnext.promise.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
||||
* resolved value cannot be modified from the callback.
|
||||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
finally(onfinally?: (() => void) | undefined | null): Promise<T>
|
||||
}
|
||||
54
src/lib/webworker.generated.d.ts
vendored
54
src/lib/webworker.generated.d.ts
vendored
@ -66,12 +66,13 @@ interface ObjectURLOptions {
|
||||
}
|
||||
|
||||
interface PushSubscriptionOptionsInit {
|
||||
applicationServerKey?: any;
|
||||
applicationServerKey?: BufferSource | null;
|
||||
userVisibleOnly?: boolean;
|
||||
}
|
||||
|
||||
interface RequestInit {
|
||||
body?: any;
|
||||
signal?: AbortSignal;
|
||||
body?: Blob | BufferSource | FormData | string | null;
|
||||
cache?: RequestCache;
|
||||
credentials?: RequestCredentials;
|
||||
headers?: HeadersInit;
|
||||
@ -119,7 +120,7 @@ interface NotificationEventInit extends ExtendableEventInit {
|
||||
}
|
||||
|
||||
interface PushEventInit extends ExtendableEventInit {
|
||||
data?: any;
|
||||
data?: BufferSource | USVString;
|
||||
}
|
||||
|
||||
interface SyncEventInit extends ExtendableEventInit {
|
||||
@ -414,9 +415,10 @@ declare var EventTarget: {
|
||||
};
|
||||
|
||||
interface File extends Blob {
|
||||
readonly lastModifiedDate: any;
|
||||
readonly lastModifiedDate: Date;
|
||||
readonly name: string;
|
||||
readonly webkitRelativePath: string;
|
||||
readonly lastModified: number;
|
||||
}
|
||||
|
||||
declare var File: {
|
||||
@ -959,6 +961,7 @@ interface Request extends Object, Body {
|
||||
readonly referrerPolicy: ReferrerPolicy;
|
||||
readonly type: RequestType;
|
||||
readonly url: string;
|
||||
readonly signal: AbortSignal;
|
||||
clone(): Request;
|
||||
}
|
||||
|
||||
@ -1061,7 +1064,7 @@ interface URL {
|
||||
|
||||
declare var URL: {
|
||||
prototype: URL;
|
||||
new(url: string, base?: string): URL;
|
||||
new(url: string, base?: string | URL): URL;
|
||||
createObjectURL(object: any, options?: ObjectURLOptions): string;
|
||||
revokeObjectURL(url: string): void;
|
||||
};
|
||||
@ -1821,6 +1824,43 @@ interface AddEventListenerOptions extends EventListenerOptions {
|
||||
once?: boolean;
|
||||
}
|
||||
|
||||
interface AbortController {
|
||||
readonly signal: AbortSignal;
|
||||
abort(): void;
|
||||
}
|
||||
|
||||
declare var AbortController: {
|
||||
prototype: AbortController;
|
||||
new(): AbortController;
|
||||
};
|
||||
|
||||
interface AbortSignal extends EventTarget {
|
||||
readonly aborted: boolean;
|
||||
onabort: (ev: Event) => any;
|
||||
}
|
||||
|
||||
interface EventSource extends EventTarget {
|
||||
readonly url: string;
|
||||
readonly withCredentials: boolean;
|
||||
readonly CONNECTING: number;
|
||||
readonly OPEN: number;
|
||||
readonly CLOSED: number;
|
||||
readonly readyState: number;
|
||||
onopen: (evt: MessageEvent) => any;
|
||||
onmessage: (evt: MessageEvent) => any;
|
||||
onerror: (evt: MessageEvent) => any;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
declare var EventSource: {
|
||||
prototype: EventSource;
|
||||
new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
|
||||
};
|
||||
|
||||
interface EventSourceInit {
|
||||
readonly withCredentials: boolean;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface DecodeErrorCallback {
|
||||
@ -1833,7 +1873,7 @@ interface ErrorEventHandler {
|
||||
(message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
|
||||
}
|
||||
interface ForEachCallback {
|
||||
(keyId: any, status: MediaKeyStatus): void;
|
||||
(keyId: BufferSource, status: MediaKeyStatus): void;
|
||||
}
|
||||
interface FunctionStringCallback {
|
||||
(data: string): void;
|
||||
@ -1883,7 +1923,7 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi
|
||||
declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
||||
declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
||||
type AlgorithmIdentifier = string | Algorithm;
|
||||
type BodyInit = any;
|
||||
type BodyInit = Blob | BufferSource | FormData | string;
|
||||
type IDBKeyPath = string;
|
||||
type RequestInfo = Request | string;
|
||||
type USVString = string;
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[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.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类属性声明中的计算属性名称必须引用类型为文本类型或“唯一符号”类型的表达式。]]></Val>
|
||||
<Val><![CDATA[类属性声明中的计算属性名称必须引用类型为文本类型或 "unique symbol" 类型的表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -154,7 +154,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[方法重载中的计算属性名称必须引用类型为文本类型或“唯一符号”类型的表达式。]]></Val>
|
||||
<Val><![CDATA[方法重载中的计算属性名称必须引用文本类型或 "unique symbol" 类型的表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -163,7 +163,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类型文本中的计算属性名称必须引用类型为文本类型或“唯一符号”类型的表达式。]]></Val>
|
||||
<Val><![CDATA[类型文本中的计算属性名称必须引用类型为文本类型或 "unique symbol" 类型的表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -172,7 +172,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[环境上下文中的计算属性名称必须引用类型为文本类型或“唯一符号”类型的表达式。]]></Val>
|
||||
<Val><![CDATA[环境上下文中的计算属性名称必须引用类型为文本类型或 "unique symbol" 类型的表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -181,7 +181,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[接口中的计算属性名称必须引用必须引用类型为文本类型或“唯一符号”的表达式。]]></Val>
|
||||
<Val><![CDATA[接口中的计算属性名称必须引用必须引用类型为文本类型或 "unique symbol" 的表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -532,7 +532,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类型为“唯一符号”的类的属性必须同时为“静态”和“只读”。]]></Val>
|
||||
<Val><![CDATA[类型为 "unique symbol" 的类的属性必须同时为 "static" 和 "readonly"。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -541,7 +541,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类型为“唯一符号”的接口或类型文本的属性必须是“只读”]]></Val>
|
||||
<Val><![CDATA[类型为 "unique symbol" 的接口或类型文本的属性必须为 "readonly"。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -796,7 +796,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A variable whose type is a 'unique symbol' type must be 'const'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类型为“唯一符号”的变量必须是“常量”。]]></Val>
|
||||
<Val><![CDATA[类型为 "unique symbol" 的变量必须为 "const"。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -866,52 +866,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[将 {0} 从 {1} 添加到现有导入声明。]]></Val>
|
||||
<Val><![CDATA[将“{0}”从“{1}”添加到现有导入声明]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[为属性“{0}”添加索引签名。]]></Val>
|
||||
<Val><![CDATA[为属性“{0}”添加索引签名]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[添加缺失的 "super()" 调用。]]></Val>
|
||||
<Val><![CDATA[添加缺失的 "super()" 调用]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[向未解析的变量添加 "this."。]]></Val>
|
||||
<Val><![CDATA[向未解析的变量添加 "this."]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[添加 tsconfig.json 文件有助于组织包含 TypeScript 和 JavaScript 文件的项目。有关详细信息,请访问 https://aka.ms/tsconfig。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1378,7 +1384,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Annotate with type from JSDoc]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[使用 JSDoc 中的类型批注]]></Val>
|
||||
<Val><![CDATA[通过 JSDoc 类型批注]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -1541,10 +1547,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[调用修饰器表达式。]]></Val>
|
||||
<Val><![CDATA[调用修饰器表达式]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1955,34 +1964,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[将“{0}”更改为“{1}”。]]></Val>
|
||||
<Val><![CDATA[将“{0}”更改为“{1}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[将 "extends" 更改为 "implements"。]]></Val>
|
||||
<Val><![CDATA[将 "extends" 改为 "implements"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[将拼写更改为“{0}”。]]></Val>
|
||||
<Val><![CDATA[将拼写更改为“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2058,6 +2070,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[类“{0}”错误实现类“{1}”。你是想扩展“{1}”并将其成员作为子类继承吗?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2354,37 +2375,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[声明方法“{0}”。]]></Val>
|
||||
<Val><![CDATA[声明方法“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[声明属性“{0}”。]]></Val>
|
||||
<Val><![CDATA[声明属性“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[声明静态方法“{0}”。]]></Val>
|
||||
<Val><![CDATA[声明静态方法“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[声明静态属性 "{0}"。]]></Val>
|
||||
<Val><![CDATA[声明静态属性“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2462,10 +2495,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[禁用检查此文件。]]></Val>
|
||||
<Val><![CDATA[禁用检查此文件]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3429,15 +3465,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[文件规范不能包含多个递归目录通配符("**"):“{0}”。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3731,31 +3758,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[忽略此错误信息。]]></Val>
|
||||
<Val><![CDATA[忽略此错误信息]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[实现继承的抽象类。]]></Val>
|
||||
<Val><![CDATA[实现已继承的抽象类]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[实现接口“{0}”。]]></Val>
|
||||
<Val><![CDATA[实现接口“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3770,10 +3803,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[从模块“{1}”导入“{0}”。]]></Val>
|
||||
<Val><![CDATA[从模块“{1}”导入“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3920,37 +3956,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[从用法中推断出参数类型。]]></Val>
|
||||
<Val><![CDATA[根据使用情况推断参数类型]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[从用法中推断出“{0}”的类型。]]></Val>
|
||||
<Val><![CDATA[根据使用情况推断“{0}”的类型]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[初始化构造函数中的属性“{0}”。]]></Val>
|
||||
<Val><![CDATA[初始化构造函数中的属性“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[初始化静态属性“{0}”。]]></Val>
|
||||
<Val><![CDATA[初始化静态属性“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4481,10 +4529,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[在构造函数中,使 "super()" 调用第一个语句。]]></Val>
|
||||
<Val><![CDATA[在构造函数中,使 "super()" 调用第一个语句]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4701,6 +4752,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[不允许使用多个连续的数字分隔符。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4791,6 +4851,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此处不允许使用数字分隔符。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5396,10 +5465,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[带下划线的前缀“{0}”。]]></Val>
|
||||
<Val><![CDATA[带下划线的前缀“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5849,10 +5921,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[删除“{0}”的声明。]]></Val>
|
||||
<Val><![CDATA[删除“{0}”的声明]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6275,10 +6350,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[重写为索引访问类型“{0}”。]]></Val>
|
||||
<Val><![CDATA[重写为索引访问类型“{0}”]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6390,15 +6468,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[指定 ECMAScript 目标版本: "ES3"(默认)、"ES5"、"ES2015"、"ES2016"、"ES2017" 或 "ESNEXT"。]]></Val>
|
||||
<Val><![CDATA[指定 ECMAScript 目标版本: "ES3" (默认)、"ES5"、"ES2015"、"ES2016"、"ES2017"、"ES2018" 或 "ESNEXT"。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6504,6 +6579,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[在监视模式下开始编译...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6582,6 +6666,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[后续属性声明必须属于同一类型。属性“{0}”的类型必须为“{1}”,但此处却为类型“{2}”。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -7350,7 +7437,7 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
@ -8665,7 +8752,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['readonly' modifier can only appear on a property declaration or index signature.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["readonly" 仅可出现在属性声明或索引签名中。]]></Val>
|
||||
<Val><![CDATA["readonly" 修饰符仅可出现在属性声明或索引签名中。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8866,7 +8953,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此处不允许“唯一符号”类型。]]></Val>
|
||||
<Val><![CDATA[此处不允许使用 "unique symbol" 类型。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8875,7 +8962,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are only allowed on variables in a variable statement.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[“唯一符号”类型仅可在变量语句中的变量上使用。]]></Val>
|
||||
<Val><![CDATA["unique symbol" 类型仅可用于变量语句中的变量。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8884,7 +8971,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types may not be used on a variable declaration with a binding name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[不可在具有绑定名称的变量声明中使用“唯一符号”类型。]]></Val>
|
||||
<Val><![CDATA[不可在具有绑定名称的变量声明中使用 "unique symbol" 类型。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[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.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[類別屬性宣告中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。]]></Val>
|
||||
<Val><![CDATA[類別屬性宣告中的計算屬性名稱,必須參考類型為常值型別或 'unique symbol' 類型的運算式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -163,7 +163,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[型別常值中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。]]></Val>
|
||||
<Val><![CDATA[常值型別中的計算屬性名稱,必須參考類型為常值型別或 'unique symbol' 類型的運算式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -532,7 +532,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[型別為 'unique symbol' 型別的類別屬性必須同時為 'static' 與 'readonly'。]]></Val>
|
||||
<Val><![CDATA[類型為 'unique symbol' 類型的類別屬性,必須為 'static' 和 'readonly'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -541,7 +541,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[型別為 'unique symbol' 型別的介面或型別常值屬性必須是 'readonly'。]]></Val>
|
||||
<Val><![CDATA[類型為 'unique symbol' 類型之介面或常值型別的屬性,必須是 'readonly'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -866,52 +866,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[從 "{1}" 將 '{0}' 新增至現有的匯入宣告。]]></Val>
|
||||
<Val><![CDATA[從 "{1}" 將 '{0}' 新增至現有的匯入宣告]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[為屬性 '{0}' 新增索引簽章。]]></Val>
|
||||
<Val><![CDATA[為屬性 '{0}' 新增索引簽章]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[新增遺漏的 'super()' 呼叫。]]></Val>
|
||||
<Val><![CDATA[新增遺漏的 'super()' 呼叫]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將 'this.' 新增到未經解析的變數。]]></Val>
|
||||
<Val><![CDATA[將 'this' 新增至未解析的變數]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[新增 tsconfig.json 檔案有助於組織同時包含 TypeScript 及 JavaScript 檔案的專案。如需深入了解,請參閱 https://aka.ms/tsconfig。]]></Val>
|
||||
<Val><![CDATA[新增 tsconfig.json 檔案有助於組織同時包含 TypeScript 及 JavaScript 檔案的專案。若要深入了解,請前往 https://aka.ms/tsconfig。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1541,10 +1547,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[呼叫裝飾項目運算式。]]></Val>
|
||||
<Val><![CDATA[呼叫裝飾項目運算式]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1955,34 +1964,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將 '{0}' 變更為 '{1}'。]]></Val>
|
||||
<Val><![CDATA[將 '{0}' 變更為 '{1}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將 'extends' 變更為 'implements'。]]></Val>
|
||||
<Val><![CDATA[將 [延伸]5D; 變更至 [實作]5D;]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將拼字變更為 '{0}'。]]></Val>
|
||||
<Val><![CDATA[將拼字變更為 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2058,6 +2070,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[類別 '{0}' 不當實作類別 '{1}'。您是否要擴充 '{1}',並繼承其成員以成為子類別?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2354,37 +2375,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[宣告方法 '{0}'。]]></Val>
|
||||
<Val><![CDATA[宣告方法 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[宣告屬性 '{0}'。]]></Val>
|
||||
<Val><![CDATA[宣告屬性 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[宣告靜態方法 '{0}'。]]></Val>
|
||||
<Val><![CDATA[宣告靜態方法 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[宣告靜態屬性 '{0}'。]]></Val>
|
||||
<Val><![CDATA[宣告靜態屬性 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2462,10 +2495,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[停用此檔案的檢查。]]></Val>
|
||||
<Val><![CDATA[停用此檔案的檢查]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3220,7 +3256,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[運算式解析成編譯器用來擷取 'new.target' 中繼屬性參考的變數宣告 '_newTarget'。]]></Val>
|
||||
<Val><![CDATA[運算式將解析成變數宣告 '_newTarget',而供編譯器用來擷取 'new.target' 中繼屬性參考。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3429,15 +3465,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[檔案規格不能包含多個遞迴目錄萬用字元 ('**'): '{0}'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3731,31 +3758,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[忽略此錯誤訊息。]]></Val>
|
||||
<Val><![CDATA[略過此錯誤訊息]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[實作已繼承的抽象類別。]]></Val>
|
||||
<Val><![CDATA[實作已繼承的抽象類別]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[實作介面 '{0}'。]]></Val>
|
||||
<Val><![CDATA[實作介面 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3770,10 +3803,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[從模組 "{1}" 匯入 '{0}'。]]></Val>
|
||||
<Val><![CDATA[從模組 "{1}" 匯入 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3920,37 +3956,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[從用法推斷參數類型。]]></Val>
|
||||
<Val><![CDATA[從使用方式推斷參數類型]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[從用法推斷 '{0}' 的類型。]]></Val>
|
||||
<Val><![CDATA[從使用方式推斷 '{0}' 的類型]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[初始化建構函式中的屬性 '{0}'。]]></Val>
|
||||
<Val><![CDATA[將建構函式中的屬性 '{0}' 初始化]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[初始化靜態屬性 '{0}'。]]></Val>
|
||||
<Val><![CDATA[將靜態屬性 '{0}' 初始化]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4481,10 +4529,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[使 'super()' 呼叫成為建構函式中的第一個陳述式。]]></Val>
|
||||
<Val><![CDATA[使 'super()' 呼叫成為建構函式中的第一個陳述式]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4701,6 +4752,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[不允許多個連續的數字分隔符號。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4791,6 +4851,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[這裡不允許數字分隔符號。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5396,10 +5465,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[有底線的前置詞 '{0}'。]]></Val>
|
||||
<Val><![CDATA[具有底線的前置詞 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5443,7 +5515,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Property '{0}' does not exist on 'const' enum '{1}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['const' 列舉 '{1}' 沒有屬性 '{0}'。]]></Val>
|
||||
<Val><![CDATA['const' 列舉 '{1}' 上並沒有屬性 '{0}'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -5849,10 +5921,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[移除 {0} 的宣告。]]></Val>
|
||||
<Val><![CDATA[移除 '{0}' 的宣告]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6275,10 +6350,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[重寫為索引存取類型 '{0}'。]]></Val>
|
||||
<Val><![CDATA[重寫為索引存取類型 '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6390,15 +6468,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[指定 ECMAScript 目標版本: 'ES3' (預設)、'ES5'、'ES2015'、'ES2016'、'ES2017' 或 'ESNEXT'。]]></Val>
|
||||
<Val><![CDATA[指定 ECMAScript 目標版本: 'ES3' (預設)、'ES5'、'ES2015'、'ES2016'、'ES2017'、'ES2018' 或 'ESNEXT'。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6504,6 +6579,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[在監看模式中開始編譯...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6571,7 +6655,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Stylize errors and messages using color and context (experimental).]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[使用色彩及內容設計錯誤與訊息的風格 (實驗)。]]></Val>
|
||||
<Val><![CDATA[使用色彩及內容來設計錯誤與訊息的風格 (實驗)。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Stylize errors and messages using color and context. (experimental)]]></Val>
|
||||
@ -6582,6 +6666,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[後續的屬性宣告必須具有相同的類型。屬性 '{0}' 的類型必須是 '{1}',但此處卻是類型 '{2}'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -7350,7 +7437,7 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
@ -8374,7 +8461,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只可在區塊內宣告 'const' 宣告。]]></Val>
|
||||
<Val><![CDATA[只能在區塊內宣告 'const' 宣告。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8383,7 +8470,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['const' declarations must be initialized.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['const' 宣告必須初始化 。]]></Val>
|
||||
<Val><![CDATA['const' 宣告必須初始化。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA['const' declarations must be initialized]]></Val>
|
||||
@ -8413,7 +8500,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['const' 列舉只可用於屬性或索引存取運算式中,或者用於匯入宣告或匯出指派的右側 。]]></Val>
|
||||
<Val><![CDATA['const' 列舉只可用於屬性或索引存取運算式中,或者用於匯入宣告或匯出指派的右側。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[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.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Název vypočítané vlastnosti v deklaraci vlastnosti třídy musí odkazovat na výraz, jehož typ je literál nebo jedinečný symbol.]]></Val>
|
||||
<Val><![CDATA[Název počítané vlastnosti v deklaraci vlastnosti třídy musí přímo odkazovat na výraz, jehož typ je literál nebo unique symbol.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -163,7 +163,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Název vypočítané vlastnosti v přetížené metodě musí odkazovat na výraz, jehož typ je literál nebo jedinečný symbol.]]></Val>
|
||||
<Val><![CDATA[Název počítané vlastnosti v přetížené metodě musí odkazovat na výraz, jehož typ je literál nebo unique symbol.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -172,7 +172,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Název vypočítané vlastnosti v literálu typu musí odkazovat na výraz, jehož typ je literál nebo jedinečný symbol.]]></Val>
|
||||
<Val><![CDATA[Název počítané vlastnosti v literálu typu musí odkazovat na výraz, jehož typ je literál nebo unique symbol.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -181,7 +181,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Název vypočítané vlastnosti v ambientním kontextu musí odkazovat na výraz, jehož typ je literál nebo jedinečný symbol.]]></Val>
|
||||
<Val><![CDATA[Název počítané vlastnosti v ambientním kontextu musí odkazovat na výraz, jehož typ je literál nebo unique symbol.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -190,7 +190,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Název vypočítané vlastnosti v rozhraní musí odkazovat na výraz, jehož typ je literál nebo jedinečný symbol.]]></Val>
|
||||
<Val><![CDATA[Název počítané vlastnosti v rozhraní musí odkazovat na výraz, jehož typ je literál nebo unique symbol.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -541,7 +541,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Vlastnost třídy, jejíž typ je jedinečný symbol, musí být static a readonly.]]></Val>
|
||||
<Val><![CDATA[Vlastnost třídy, jejíž typ je unique symbol, musí být static a readonly.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -550,7 +550,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Vlastnost rozhraní nebo literálu typu, jehož typ je jedinečný symbol, musí být readonly.]]></Val>
|
||||
<Val><![CDATA[Vlastnost rozhraní nebo literálu typu, jehož typ je unique symbol, musí být readonly.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -805,7 +805,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A variable whose type is a 'unique symbol' type must be 'const'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Proměnná, jejíž typ je jedinečný symbol, musí být const.]]></Val>
|
||||
<Val><![CDATA[Proměnná, jejíž typ je unique symbol, musí být const.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -875,52 +875,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přidá {0} k existující deklaraci importu z {1}.]]></Val>
|
||||
<Val><![CDATA[Přidat {0} k existující deklaraci importu z {1}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přidat signaturu indexu pro vlastnost {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přidejte chybějící volání metody super().]]></Val>
|
||||
<Val><![CDATA[Přidat chybějící volání metody super()]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přidejte k nerozpoznané proměnné this.]]></Val>
|
||||
<Val><![CDATA[Přidat k nerozpoznané proměnné this.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Přidání souboru tsconfig.json vám pomůže uspořádat projekty, které obsahují jak soubory TypeScript, tak soubory JavaScript. Další informace najdete na adrese https://aka.ms/tsconfig.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1550,10 +1556,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Výraz pro volání dekoratéru]]></Val>
|
||||
<Val><![CDATA[Zavolat výraz dekorátoru]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1964,34 +1973,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Změnit {0} na {1}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Změňte extends na implements.]]></Val>
|
||||
<Val><![CDATA[Změnit extends na implements]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Změnit pravopis na {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2067,6 +2079,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Třída {0} nesprávně implementuje třídu {1}. Nechtěli jste rozšířit třídu {1} a dědit její členy jako podtřídu?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2089,7 +2110,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class declarations cannot have more than one `@augments` or `@extends` tag.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarace tříd nemůžou obsahovat více než jednu značku @augments nebo @extends.]]></Val>
|
||||
<Val><![CDATA[Deklarace tříd nemůžou mít více než jednu značku @augments nebo @extends.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2363,37 +2384,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarujte metodu {0}.]]></Val>
|
||||
<Val><![CDATA[Deklarovat metodu {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarujte vlastnost {0}.]]></Val>
|
||||
<Val><![CDATA[Deklarovat vlastnost {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarujte statickou metodu {0}.]]></Val>
|
||||
<Val><![CDATA[Deklarovat statickou metodu {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarujte statickou vlastnost {0}.]]></Val>
|
||||
<Val><![CDATA[Deklarovat statickou vlastnost {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2471,10 +2504,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Zakázat kontrolu tohoto souboru]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2836,7 +2872,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enable strict checking of function types.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Povolte striktní kontrolu typů funkcí.]]></Val>
|
||||
<Val><![CDATA[Povolí striktní kontrolu typů funkcí.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3438,15 +3474,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Specifikace souboru nemůže obsahovat víc než jeden rekurzivní zástupný znak adresáře (**): {0}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3740,31 +3767,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignorovat tuto chybovou zprávu]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementujte zděděnou abstraktní třídu.]]></Val>
|
||||
<Val><![CDATA[Implementovat zděděnou abstraktní třídu]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementujte rozhraní {0}.]]></Val>
|
||||
<Val><![CDATA[Implementovat rozhraní {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3779,10 +3812,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Import {0} z modulu {1}]]></Val>
|
||||
<Val><![CDATA[Importovat {0} z modulu {1}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3929,37 +3965,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Odvodit typy parametrů z používání]]></Val>
|
||||
<Val><![CDATA[Odvodit typy parametrů z využití]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Odvodit typ {0} z používání]]></Val>
|
||||
<Val><![CDATA[Odvodit typ {0} z využití]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inicializovat vlastnost {0} v konstruktoru]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inicializovat statickou vlastnost {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4177,7 +4225,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSDoc '@param' tag has name '{0}', but there is no parameter with that name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Značka JSDoc @param má název {0}, ale žádný parametr s tímto názvem neexistuje.]]></Val>
|
||||
<Val><![CDATA[Značka JSDoc @param má název {0}, ale neexistuje žádný parametr s tímto názvem.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -4186,7 +4234,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Značka JSDoc @typedef by měla mít anotaci typu nebo by za ní měla následovat značka @property nebo @member.]]></Val>
|
||||
<Val><![CDATA[Značka JSDoc @typedef by měla mít poznámku k typu nebo by za ní měly následovat značky @property nebo @member.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -4490,10 +4538,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nastavit volání metody super() jako první příkaz v konstruktoru]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4710,6 +4761,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Více po sobě jdoucích číselných oddělovačů se nepovoluje.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4800,6 +4860,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Číselné oddělovače tady nejsou povolené.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5405,10 +5474,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Předpona {0} s podtržítkem]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5858,10 +5930,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Odeberte deklaraci pro {0}.]]></Val>
|
||||
<Val><![CDATA[Odebrat deklaraci pro {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6284,10 +6359,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Proveďte přepis jako indexovaný přístupový typ {0}.]]></Val>
|
||||
<Val><![CDATA[Přepsat jako indexovaný typ přístupu {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6358,7 +6436,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Signature '{0}' must be a type predicate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Podpis {0} musí být predikát typu.]]></Val>
|
||||
<Val><![CDATA[Signatura {0} musí být predikát typu.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -6399,15 +6477,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Zadejte cílovou verzi ECMAScriptu: ES3 (výchozí), ES5, ES2015, ES2016, ES2017, nebo ESNEXT.]]></Val>
|
||||
<Val><![CDATA[Zadejte cílovou verzi ECMAScriptu: ES3 (výchozí), ES5, ES2015, ES2016, ES2017, ES2018 nebo ESNEXT.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6513,6 +6588,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Spouští se kompilace v režimu sledování...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6591,6 +6675,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklarace následných vlastností musí obsahovat stejný typ. Vlastnost {0} musí být typu {1}, ale tady je typu {2}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -7359,7 +7446,7 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
@ -8638,7 +8725,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['package.json' does not have a '{0}' field.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[package.json nemá pole {0}.]]></Val>
|
||||
<Val><![CDATA[Soubor package.json neobsahuje pole {0}.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8875,7 +8962,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Typy „jedinečný symbol“ tady nejsou povolené.]]></Val>
|
||||
<Val><![CDATA[Typy unique symbol tady nejsou povolené.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8884,7 +8971,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are only allowed on variables in a variable statement.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Typy „jedinečný symbol“ jsou povolené jen u proměnných v příkazu proměnné.]]></Val>
|
||||
<Val><![CDATA[Typy unique symbol jsou povolené jen u proměnných v příkazu proměnné.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8893,7 +8980,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types may not be used on a variable declaration with a binding name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Typy „jedinečný symbol“ nejde použít v deklaraci proměnné s názvem vazby.]]></Val>
|
||||
<Val><![CDATA[Typy unique symbol nejde použít v deklaraci proměnné s názvem vazby.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
|
||||
@ -864,8 +864,8 @@
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Fügen Sie "{0}" zur vorhandenen Importdeklaration aus "{1}" hinzu.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["{0}" der vorhandenen Importdeklaration aus "{1}" hinzufügen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
@ -876,8 +876,8 @@
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Indexsignatur für die Eigenschaft "{0}" hinzufügen.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Indexsignatur für die Eigenschaft "{0}" hinzufügen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
@ -888,8 +888,8 @@
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Fügen Sie den fehlenden super()-Aufruf hinzu.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Fehlenden super()-Aufruf hinzufügen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
@ -900,8 +900,8 @@
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Der nicht aufgelösten Variablen "this." hinzufügen.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Der nicht aufgelösten Variablen "this." hinzufügen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
@ -912,6 +912,9 @@
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Das Hinzufügen einer "tsconfig.json"-Datei erleichtert die Organisation von Projekten, die sowohl TypeScript- als auch JavaScript-Dateien enthalten. Weitere Informationen finden Sie unter https://aka.ms/tsconfig.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1542,8 +1545,8 @@
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Rufen Sie den Decoratorausdruck auf.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Decorator-Ausdruck aufrufen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
@ -1959,8 +1962,8 @@
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Ändern Sie "{0}" in "{1}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["{0}" in "{1}" ändern]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
@ -1983,8 +1986,8 @@
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Ändern Sie die Schreibweise in "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Schreibweise in "{0}" ändern]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
@ -2064,6 +2067,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Klasse "{0}" implementiert fälschlicherweise die Klasse "{1}". Wollten Sie "{1}" erweitern und ihre Member als Unterklasse vererben?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2188,7 +2200,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Computed values are not permitted in an enum with string valued members.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Berechnete Werte sind in einer Aufzählung mit Membern mit Zeichenfolgenwerten nicht zulässig.]]></Val>
|
||||
<Val><![CDATA[Berechnete Werte sind in einer Enumeration mit Membern mit Zeichenfolgenwerten nicht zulässig.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2361,8 +2373,8 @@
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Methode "{0}" deklarieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Methode "{0}" deklarieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
@ -2373,8 +2385,8 @@
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Eigenschaft "{0}" deklarieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Eigenschaft "{0}" deklarieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
@ -2385,8 +2397,8 @@
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Statische Methode "{0}" deklarieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Statische Methode "{0}" deklarieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
@ -2397,8 +2409,8 @@
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Deklarieren Sie die statische Eigenschaft "{0}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Statische Eigenschaft "{0}" deklarieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
@ -2481,8 +2493,8 @@
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Überprüfung für diese Datei deaktivieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Überprüfung für diese Datei deaktivieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
@ -3450,15 +3462,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Dateispezifikation darf nicht mehrere rekursive Verzeichnisplatzhalter enthalten ("**"): "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3753,8 +3756,8 @@
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Diese Fehlermeldung ignorieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Diese Fehlermeldung ignorieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
@ -3777,7 +3780,7 @@
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Schnittstelle "{0}" implementieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
@ -3798,8 +3801,8 @@
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Import von "{0}" aus Modul "{1}".]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["{0}" aus dem Modul "{1}" importieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
@ -3951,8 +3954,8 @@
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Leiten Sie Parametertypen aus der Nutzung ab.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Parametertypen aus der Nutzung ableiten]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
@ -3963,8 +3966,8 @@
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Leiten Sie den Typ von "{0}" aus der Nutzung ab.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Typ von "{0}" aus der Nutzung ableiten]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
@ -3975,8 +3978,8 @@
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Eigenschaft '{0}' im Konstruktor initialisieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Eigenschaft "{0}" im Konstruktor initialisieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
@ -3987,8 +3990,8 @@
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Statische Eigenschaft '{0}' initialisieren.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Statische Eigenschaft "{0}" initialisieren]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
@ -4524,8 +4527,8 @@
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Legen Sie den super()-Aufruf als erste Anweisung im Konstruktor fest.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[super()-Aufruf als erste Anweisung im Konstruktor festlegen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
@ -4746,6 +4749,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Mehrere aufeinander folgende numerische Trennzeichen sind nicht zulässig.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4836,6 +4848,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Numerische Trennzeichen sind hier nicht zulässig.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5439,8 +5460,8 @@
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Präfix "{0}" mit einem Unterstrich.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["{0}" einen Unterstrich voranstellen]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
@ -5895,7 +5916,7 @@
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deklaration entfernen für: {0}]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
@ -6321,8 +6342,8 @@
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Update" Orig="New">
|
||||
<Val><![CDATA[Als indizierten Zugriffstyp "{0}" neu schreiben.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Als indizierten Zugriffstyp "{0}" neu schreiben]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
@ -6441,6 +6462,9 @@
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[ECMAScript-Zielversion angeben: ES3 (Standard), ES5, ES2015, ES2016, ES2017, ES2018 oder ESNEXT.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6546,6 +6570,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Kompilierung im Überwachungsmodus wird gestartet...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6624,6 +6657,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nachfolgende Eigenschaftendeklarationen müssen den gleichen Typ aufweisen. Die Eigenschaft "{0}" muss den Typ "{1}" aufweisen, ist hier aber vom Typ "{2}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -7395,6 +7431,9 @@
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Der Typ "{0}" kann dem Typ "{1}" nicht zugewiesen werden. Es sind zwei verschiedene Typen mit diesem Namen vorhanden, diese sind jedoch nicht verwandt.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
|
||||
@ -427,7 +427,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un inicializador de miembro de una declaración enum no puede hacer referencia a los miembros que se declaran después de este, incluidos aquellos definidos en otras enumeraciones.]]></Val>
|
||||
<Val><![CDATA[Un inicializador de miembro de una declaración de enumeración no puede hacer referencia a los miembros que se declaran después de este, incluidos aquellos definidos en otras enumeraciones.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -436,7 +436,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A mixin class must have a constructor with a single rest parameter of type 'any[]5D;'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Una clase mixin debe tener un constructor con un parámetro de REST sencillo del tipo "any[]5D;".]]></Val>
|
||||
<Val><![CDATA[Una clase mixin debe tener un constructor con un solo parámetro rest de tipo "any[]5D;"]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -523,7 +523,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A path in an 'extends' option must be relative or rooted, but '{0}' is not.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Una ruta de acceso en una opción "extiende" debe ser relativa o raíz, pero no '{0}'.]]></Val>
|
||||
<Val><![CDATA[Una ruta de acceso en una opción "extiende" debe ser relativa o raíz, pero no "{0}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -875,52 +875,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregue "{0}" a una declaración de importación existente desde "{1}".]]></Val>
|
||||
<Val><![CDATA[Agregar "{0}" a una declaración de importación existente desde "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregue una firma de índice para la propiedad "{0}".]]></Val>
|
||||
<Val><![CDATA[Agregar una signatura de índice para la propiedad "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregue la llamada a "super()" que falta.]]></Val>
|
||||
<Val><![CDATA[Agregar la llamada a "super()" que falta]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agrega "this." a una variable no resuelta.]]></Val>
|
||||
<Val><![CDATA[Agregar "this." a una variable no resuelta]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregar un archivo tsconfig.json ayuda a organizar los proyectos que contienen archivos TypeScript y JavaScript. Más información en https://aka.ms/tsconfig.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1063,7 +1069,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[An arithmetic operand must be of type 'any', 'number' or an enum type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un operando aritmético debe ser de tipo "any", "number" o de tipo enum.]]></Val>
|
||||
<Val><![CDATA[Un operando aritmético debe ser de tipo "any", "number" o un tipo de enumeración.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -1414,7 +1420,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Argument for '{0}' option must be: {1}.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El argumento para la opción '{0}' debe ser: {1}.]]></Val>
|
||||
<Val><![CDATA[El argumento para la opción "{0}" debe ser {1}.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Argument for '{0}' option must be: {1}]]></Val>
|
||||
@ -1426,7 +1432,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Argument of type '{0}' is not assignable to parameter of type '{1}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[No se puede asignar un argumento de tipo '{0}' al parámetro de tipo '{1}'.]]></Val>
|
||||
<Val><![CDATA[No se puede asignar un argumento de tipo "{0}" al parámetro de tipo "{1}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -1550,10 +1556,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Llame a la expresión decorador.]]></Val>
|
||||
<Val><![CDATA[Llamar a la expresión decorador]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1964,34 +1973,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cambie "{0}" a "{1}".]]></Val>
|
||||
<Val><![CDATA[Cambiar "{0}" a "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cambiar "extends" por "implements".]]></Val>
|
||||
<Val><![CDATA[Cambiar "extends" a "implements"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cambiar la ortografía a "{0}".]]></Val>
|
||||
<Val><![CDATA[Cambiar la ortografía a "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2067,6 +2079,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La clase "{0}" no implementa correctamente la clase "{1}". ¿Pretendía extender "{1}" y heredar sus miembros como una subclase?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2363,37 +2384,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Declare el método "{0}".]]></Val>
|
||||
<Val><![CDATA[Declarar el método "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Declare la propiedad "{0}".]]></Val>
|
||||
<Val><![CDATA[Declarar la propiedad "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Declare el método estático "{0}".]]></Val>
|
||||
<Val><![CDATA[Declarar el método estático "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Declare la propiedad "{0}" estática.]]></Val>
|
||||
<Val><![CDATA[Declarar la propiedad estática "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2471,10 +2504,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deshabilite la comprobación para este archivo.]]></Val>
|
||||
<Val><![CDATA[Deshabilitar la comprobación para este archivo]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2908,7 +2944,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enum declarations must all be const or non-const.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Todas las declaraciones enum deben ser de tipo const o no const.]]></Val>
|
||||
<Val><![CDATA[Todas las declaraciones de enumeración deben ser de tipo const o no const.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2947,7 +2983,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enum type '{0}' has members with initializers that are not literals.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tipo enum '{0}' tiene miembros con inicializadores que no son literales.]]></Val>
|
||||
<Val><![CDATA[El tipo de enumeración "{0}" tiene miembros con inicializadores que no son literales.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3438,15 +3474,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La especificación de archivo no puede contener varios comodines de directorio recursivo ('**'): '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3740,31 +3767,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignore este mensaje de error.]]></Val>
|
||||
<Val><![CDATA[Ignorar este mensaje de error]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementar clase abstracta heredada.]]></Val>
|
||||
<Val><![CDATA[Implementar clase abstracta heredada]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementar interfaz "{0}".]]></Val>
|
||||
<Val><![CDATA[Implementar la interfaz "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3779,10 +3812,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importar "{0}" desde el módulo "{1}".]]></Val>
|
||||
<Val><![CDATA[Importar "{0}" desde el módulo "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3868,7 +3904,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[In ambient enum declarations member initializer must be constant expression.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[En las declaraciones enum de ambiente, el inicializador de miembro debe ser una expresión constante.]]></Val>
|
||||
<Val><![CDATA[En las declaraciones de enumeración de ambiente, el inicializador de miembro debe ser una expresión constante.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3929,37 +3965,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Infiera los tipos de parámetro del uso.]]></Val>
|
||||
<Val><![CDATA[Deducir los tipos de parámetro del uso]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Infiera el tipo de "{0}" del uso.]]></Val>
|
||||
<Val><![CDATA[Deducir el tipo de "{0}" del uso]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inicialice la propiedad "{0}" en el constructor.]]></Val>
|
||||
<Val><![CDATA[Inicializar la propiedad "{0}" en el constructor]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inicialice la propiedad estática "{0}".]]></Val>
|
||||
<Val><![CDATA[Inicializar la propiedad estática "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4490,10 +4538,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Haga que la llamada a "super()" sea la primera instrucción del constructor.]]></Val>
|
||||
<Val><![CDATA[Hacer que la llamada a "super()" sea la primera instrucción del constructor]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4710,6 +4761,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[No se permiten varios separadores numéricos consecutivos.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4800,6 +4860,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aquí no se permiten separadores numéricos.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5405,10 +5474,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Prefijo '{0}' con guion bajo.]]></Val>
|
||||
<Val><![CDATA[Prefijo "{0}" con guion bajo]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5858,10 +5930,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Quitar declaración de: "{0}".]]></Val>
|
||||
<Val><![CDATA[Quitar declaración de: "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6284,10 +6359,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Reescribir como el tipo de acceso indexado "{0}".]]></Val>
|
||||
<Val><![CDATA[Reescribir como tipo de acceso indexado "{0}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6399,15 +6477,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Especifique la versión de ECMAScript de destino: "ES3" (valor predeterminado), "ES5", "ES2015", "ES2016", "ES2017" o "ESNEXT".]]></Val>
|
||||
<Val><![CDATA[Especifique la versión de ECMAScript de destino: "ES3" (valor predeterminado), "ES5", "ES2015", "ES2016", "ES2017", "ES2018" o "ESNEXT".]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6513,6 +6588,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Iniciando la compilación en modo de inspección...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6591,6 +6675,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las declaraciones de propiedad subsiguientes deben tener el mismo tipo. La propiedad "{0}" debe ser de tipo "{1}", pero aquí tiene el tipo "{2}".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6883,7 +6970,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La parte izquierda de una operación aritmética debe ser de tipo "any", "number" o un tipo enum.]]></Val>
|
||||
<Val><![CDATA[La parte izquierda de una operación aritmética debe ser de tipo "any", "number" o un tipo de enumeración.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -7021,7 +7108,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La parte derecha de una operación aritmética debe ser de tipo "any", "number" o un tipo enum.]]></Val>
|
||||
<Val><![CDATA[La parte derecha de una operación aritmética debe ser de tipo "any", "number" o un tipo de enumeración.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -7359,7 +7446,7 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[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.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une déclaration de propriété de classe doit faire référence à une expression dont le type est un type littéral ou un type 'symbole unique'.]]></Val>
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une déclaration de propriété de classe doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -163,7 +163,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une surcharge de méthode doit faire référence à une expression dont le type est un type littéral ou un type 'symbole unique'.]]></Val>
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une surcharge de méthode doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -172,7 +172,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un nom de propriété calculée dans un littéral de type doit faire référence à une expression dont le type est un type littéral ou un type 'symbole unique'.]]></Val>
|
||||
<Val><![CDATA[Un nom de propriété calculée dans un littéral de type doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -181,7 +181,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un nom de propriété calculée dans un contexte ambiant doit faire référence à une expression dont le type est un type littéral ou un type 'symbole unique'.]]></Val>
|
||||
<Val><![CDATA[Un nom de propriété calculée dans un contexte ambiant doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -190,7 +190,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une interface doit faire référence à une expression dont le type est un type littéral ou un type 'symbole unique'.]]></Val>
|
||||
<Val><![CDATA[Un nom de propriété calculée dans une interface doit faire référence à une expression dont le type est un type littéral ou un type 'unique symbol'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -541,7 +541,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une propriété d'une classe dont le type est un type 'symbole unique' doit être à la fois 'static' et 'readonly'.]]></Val>
|
||||
<Val><![CDATA[Une propriété d'une classe dont le type est un type 'unique symbol' doit être à la fois 'static' et 'readonly'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -550,7 +550,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une propriété d'une interface ou d'un littéral de type dont le type est un type 'symbole unique' doit être 'readonly'.]]></Val>
|
||||
<Val><![CDATA[Une propriété d'une interface ou d'un littéral de type dont le type est un type 'unique symbol' doit être 'readonly'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -805,7 +805,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A variable whose type is a 'unique symbol' type must be 'const'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une variable dont le type est un type 'symbole unique' doit être 'const'.]]></Val>
|
||||
<Val><![CDATA[Une variable dont le type est un type 'unique symbol' doit être 'const'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -875,52 +875,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajoutez '{0}' à une déclaration d'importation existante à partir de "{1}".]]></Val>
|
||||
<Val><![CDATA[Ajouter '{0}' à la déclaration d'importation existante de "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajoutez une signature d'index pour la propriété '{0}'.]]></Val>
|
||||
<Val><![CDATA[Ajouter une signature d'index pour la propriété '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajoutez l'appel manquant à 'super()'.]]></Val>
|
||||
<Val><![CDATA[Ajouter l'appel manquant à 'super()']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajoutez 'this.' à la variable non résolue.]]></Val>
|
||||
<Val><![CDATA[Ajouter 'this.' à la variable non résolue]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'ajout d'un fichier tsconfig.json permet d'organiser les projets qui contiennent des fichiers TypeScript et JavaScript. En savoir plus sur https://aka.ms/tsconfig.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1550,10 +1556,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Appelez l'expression de l'élément décoratif.]]></Val>
|
||||
<Val><![CDATA[Appeler l'expression de l'élément décoratif]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1964,34 +1973,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Changez '{0}' en '{1}'.]]></Val>
|
||||
<Val><![CDATA[Changer '{0}' en '{1}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Changez 'extends' en 'implements'.]]></Val>
|
||||
<Val><![CDATA[Changer 'extends' en 'implements']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Changez l'orthographe en '{0}'.]]></Val>
|
||||
<Val><![CDATA[Changer l'orthographe en '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2067,6 +2079,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La classe '{0}' implémente de manière incorrecte la classe '{1}'. Voulez-vous vraiment étendre '{1}' et hériter de ses membres en tant que sous-classe ?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2363,37 +2384,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déclarez la méthode '{0}'.]]></Val>
|
||||
<Val><![CDATA[Déclarer la méthode '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déclarez la propriété '{0}'.]]></Val>
|
||||
<Val><![CDATA[Déclarer la propriété '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déclarez la méthode statique '{0}'.]]></Val>
|
||||
<Val><![CDATA[Déclarer la méthode statique '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déclarez la propriété statique '{0}'.]]></Val>
|
||||
<Val><![CDATA[Déclarer la propriété statique '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2471,10 +2504,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Désactivez la vérification de ce fichier.]]></Val>
|
||||
<Val><![CDATA[Désactiver la vérification de ce fichier]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3438,15 +3474,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une spécification de fichier ne peut pas contenir plusieurs caractères génériques de répertoires récursifs ('**') : '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3740,31 +3767,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignorez ce message d'erreur.]]></Val>
|
||||
<Val><![CDATA[Ignorer ce message d'erreur]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implémentez la classe abstraite héritée.]]></Val>
|
||||
<Val><![CDATA[Implémenter la classe abstraite héritée]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implémentez l'interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implémenter l'interface '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3779,10 +3812,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importez '{0}' à partir du module "{1}".]]></Val>
|
||||
<Val><![CDATA[Importer '{0}' à partir du module "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3929,37 +3965,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déduisez les types des paramètres à partir de l'utilisation.]]></Val>
|
||||
<Val><![CDATA[Déduire les types des paramètres à partir de l'utilisation]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Déduisez le type de '{0}' à partir de l'utilisation.]]></Val>
|
||||
<Val><![CDATA[Déduire le type de '{0}' à partir de l'utilisation]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Initialisez la propriété '{0}' dans le constructeur.]]></Val>
|
||||
<Val><![CDATA[Initialiser la propriété '{0}' dans le constructeur]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Initialisez la propriété statique '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialiser la propriété statique '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4490,10 +4538,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Faites de l'appel à 'super()' la première instruction du constructeur.]]></Val>
|
||||
<Val><![CDATA[Faire de l'appel à 'super()' la première instruction du constructeur]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4710,6 +4761,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les séparateurs numériques consécutifs multiples ne sont pas autorisés.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4800,6 +4860,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les séparateurs numériques ne sont pas autorisés ici.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -4876,7 +4945,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Octal literals are not allowed in enums members initializer. Use the syntax '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les littéraux octaux ne sont pas autorisés dans l'initialiseur des membres d'énumérations. Utilisez la syntaxe '{0}'.]]></Val>
|
||||
<Val><![CDATA[Les littéraux octaux ne sont pas autorisés dans l'initialiseur des membres d'enums. Utilisez la syntaxe '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -5405,10 +5474,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Préfixez '{0}' avec un trait de soulignement.]]></Val>
|
||||
<Val><![CDATA[Faire précéder '{0}' d'un trait de soulignement]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5858,10 +5930,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Supprimez la déclaration pour : '{0}'.]]></Val>
|
||||
<Val><![CDATA[Supprimer la déclaration pour : '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6284,10 +6359,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Réécrire en tant que type d'accès indexé '{0}'.]]></Val>
|
||||
<Val><![CDATA[Réécrire en tant que type d'accès indexé '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6399,15 +6477,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Spécifiez la version cible d'ECMAScript : 'ES3' (par défaut), 'ES5', 'ES2015', 'ES2016', 'ES2017' ou 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Spécifiez la version cible d'ECMAScript : 'ES3' (par défaut), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' ou 'ESNEXT'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6513,6 +6588,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Démarrage de la compilation en mode espion...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -6591,6 +6675,9 @@
|
||||
<Item ItemId=";Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les prochaines déclarations de propriétés doivent avoir le même type. La propriété '{0}' doit avoir le type '{1}', mais elle a ici le type '{2}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -7359,11 +7446,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le type '{0}' ne peut pas être assigné au type '{1}'. Il existe deux types distincts portant ce nom, mais ils ne sont pas liés.]]></Val>
|
||||
<Val><![CDATA[Impossible d'assigner le type '{0}' au type '{1}'. Il existe deux types distincts portant ce nom, mais ils ne sont pas liés.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8875,7 +8962,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les types 'symbole unique' ne sont pas autorisés ici.]]></Val>
|
||||
<Val><![CDATA[Les types 'unique symbol' ne sont pas autorisés ici.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8884,7 +8971,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types are only allowed on variables in a variable statement.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les types 'symbole unique' sont uniquement autorisés sur les variables d'une déclaration de variable.]]></Val>
|
||||
<Val><![CDATA[Les types 'unique symbol' sont uniquement autorisés sur les variables d'une déclaration de variable.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8893,7 +8980,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['unique symbol' types may not be used on a variable declaration with a binding name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les types 'symbole unique' ne peuvent pas être utilisés dans une déclaration de variable avec un nom de liaison.]]></Val>
|
||||
<Val><![CDATA[Les types 'unique symbol' ne peuvent pas être utilisés dans une déclaration de variable avec un nom de liaison.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
|
||||
@ -866,52 +866,58 @@
|
||||
</Item>
|
||||
<Item ItemId=";Add_0_to_existing_import_declaration_from_1_90015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aggiungere '{0}' alla dichiarazione di importazione esistente da "{1}".]]></Val>
|
||||
<Val><![CDATA[Aggiungere '{0}' alla dichiarazione di importazione esistente da "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add {0} to existing import declaration from {1}.]]></Val>
|
||||
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_index_signature_for_property_0_90017" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Add index signature for property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aggiungere la firma dell'indice per la proprietà '{0}'.]]></Val>
|
||||
<Val><![CDATA[Aggiungere la firma dell'indice per la proprietà '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add index signature for property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_missing_super_call_90001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
<Val><![CDATA[Add missing 'super()' call]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aggiunge la chiamata mancante a 'super()'.]]></Val>
|
||||
<Val><![CDATA[Aggiungere la chiamata mancante a 'super()']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add missing 'super()' call.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_this_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aggiungi 'this.' alla variabile non risolta.]]></Val>
|
||||
<Val><![CDATA[Aggiungere 'this.' alla variabile non risolta]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Add 'this.' to unresolved variable.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aggiungere un file tsconfig.json per organizzare più facilmente progetti che contengono sia file TypeScript che JavaScript. Per altre informazioni, vedere https://aka.ms/tsconfig.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1054,7 +1060,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[An arithmetic operand must be of type 'any', 'number' or an enum type.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Un operando aritmetico deve essere di tipo 'any', 'number' o un tipo di enum.]]></Val>
|
||||
<Val><![CDATA[Un operando aritmetico deve essere di tipo 'any', 'number' o un tipo di enumerazione.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -1099,7 +1105,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[An enum member cannot have a numeric name.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Il nome di un membro enum non può essere numerico.]]></Val>
|
||||
<Val><![CDATA[Il nome di un membro di enumerazione non può essere numerico.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -1541,10 +1547,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Call_decorator_expression_90028" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
<Val><![CDATA[Call decorator expression]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Chiama l'espressione Decorator.]]></Val>
|
||||
<Val><![CDATA[Chiamare l'espressione Decorator]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Call decorator expression.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -1955,34 +1964,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Change_0_to_1_90014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cambia '{0}' in '{1}'.]]></Val>
|
||||
<Val><![CDATA[Modificare '{0}' in '{1}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change {0} to {1}.]]></Val>
|
||||
<Val><![CDATA[Change '{0}' to '{1}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_extends_to_implements_90003" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Cambia 'extends' in 'implements'.]]></Val>
|
||||
<Val><![CDATA[Cambiare 'extends' in 'implements']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change 'extends' to 'implements']]></Val>
|
||||
<Val><![CDATA[Change 'extends' to 'implements'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Change_spelling_to_0_90022" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
<Val><![CDATA[Change spelling to '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Modificare l'ortografia in '{0}'.]]></Val>
|
||||
<Val><![CDATA[Modificare l'ortografia in '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Change spelling to '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2058,6 +2070,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La classe '{0}' implementa in modo errato la classe '{1}'. Si intendeva estendere '{1}' ed ereditarne i membri come sottoclasse?]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Class_0_incorrectly_implements_interface_1_2420" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Class '{0}' incorrectly implements interface '{1}'.]]></Val>
|
||||
@ -2146,7 +2167,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Compila il progetto di cui è stato specificato il percorso del file di configurazione o di una cartella contenente un file 'tsconfig.json'.]]></Val>
|
||||
<Val><![CDATA[Compila il progetto in base al percorso del file di configurazione o della cartella contenente un file 'tsconfig.json'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2354,37 +2375,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Declare_method_0_90023" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dichiarare il metodo '{0}'.]]></Val>
|
||||
<Val><![CDATA[Dichiarare il metodo '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_property_0_90016" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dichiarare la proprietà '{0}'.]]></Val>
|
||||
<Val><![CDATA[Dichiarare la proprietà '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_method_0_90024" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static method '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dichiarare il metodo statico '{0}'.]]></Val>
|
||||
<Val><![CDATA[Dichiarare il metodo statico '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static method '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Declare_static_property_0_90027" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Declare static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dichiarare la proprietà statica '{0}'.]]></Val>
|
||||
<Val><![CDATA[Dichiarare la proprietà statica '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Declare static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2462,10 +2495,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Disable_checking_for_this_file_90018" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
<Val><![CDATA[Disable checking for this file]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Disabilita la verifica per questo file.]]></Val>
|
||||
<Val><![CDATA[Disabilitare la verifica per questo file]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Disable checking for this file.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -2554,7 +2590,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Do not erase const enum declarations in generated code.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Non cancella le dichiarazioni enum const nel codice generato.]]></Val>
|
||||
<Val><![CDATA[Non cancella le dichiarazioni di enumerazione const nel codice generato.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2800,7 +2836,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Emit a single file with source maps instead of having a separate file.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Crea un unico file con i mapping d origine invece di file separati.]]></Val>
|
||||
<Val><![CDATA[Crea un unico file con i mapping di origine invece di file separati.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2827,7 +2863,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enable strict checking of function types.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Abilitare il controllo tassativo dei tipi funzione.]]></Val>
|
||||
<Val><![CDATA[Abilita il controllo tassativo dei tipi funzione.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2899,7 +2935,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enum declarations must all be const or non-const.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le dichiarazioni enum devono essere tutte const o tutte non const.]]></Val>
|
||||
<Val><![CDATA[Le dichiarazioni di enumerazione devono essere tutte const o tutte non const.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2908,7 +2944,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enum member expected.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[È previsto il membro enum.]]></Val>
|
||||
<Val><![CDATA[È previsto il membro di enumerazione.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -2917,7 +2953,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enum member must have initializer.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Il membro enum deve contenere l'inizializzatore.]]></Val>
|
||||
<Val><![CDATA[Il membro di enumerazione deve contenere l'inizializzatore.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3001,7 +3037,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Expected {0} type arguments; provide these with an '@extends' tag.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Sono previsti argomento tipo {0}. Per specificarli, usare un tag '@extends'.]]></Val>
|
||||
<Val><![CDATA[Sono previsti {0} argomenti tipo. Per specificarli, usare un tag '@extends'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3019,7 +3055,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Expected at least {0} arguments, but got {1} or more.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Sono previsti almeno {0} argomenti, ma ne sono stati ottenuti più di {1}.]]></Val>
|
||||
<Val><![CDATA[Sono previsti almeno {0} argomenti, ma ne sono stati ottenuti {1} o più.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3429,15 +3465,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La specifica del file non può contenere più caratteri jolly ('**') di directory ricorsiva: '{0}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[File specification cannot end in a recursive directory wildcard ('**'): '{0}'.]]></Val>
|
||||
@ -3731,31 +3758,37 @@
|
||||
</Item>
|
||||
<Item ItemId=";Ignore_this_error_message_90019" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
<Val><![CDATA[Ignore this error message]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignora questo messaggio di errore.]]></Val>
|
||||
<Val><![CDATA[Ignorare questo messaggio di errore]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Ignore this error message.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_inherited_abstract_class_90007" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementa la classe astratta ereditata.]]></Val>
|
||||
<Val><![CDATA[Implementare la classe astratta ereditata]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement inherited abstract class]]></Val>
|
||||
<Val><![CDATA[Implement inherited abstract class.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Implement_interface_0_90006" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implement interface '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Implementa l'interfaccia '{0}'.]]></Val>
|
||||
<Val><![CDATA[Implementare l'interfaccia '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Implement interface '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3770,10 +3803,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importa '{0}' dal modulo "{1}".]]></Val>
|
||||
<Val><![CDATA[Importare '{0}' dal modulo "{1}"]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -3859,7 +3895,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[In ambient enum declarations member initializer must be constant expression.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nelle dichiarazioni enum dell'ambiente l'inizializzatore di membro deve essere un'espressione costante.]]></Val>
|
||||
<Val><![CDATA[Nelle dichiarazioni di enumerazione dell'ambiente l'inizializzatore di membro deve essere un'espressione costante.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3868,7 +3904,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[In un'enumerazione con più dichiarazioni solo una di queste può omettere un inizializzatore per il primo elemento enum.]]></Val>
|
||||
<Val><![CDATA[In un'enumerazione con più dichiarazioni solo una di queste può omettere un inizializzatore per il primo elemento dell'enumerazione.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3877,7 +3913,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[In 'const' enum declarations member initializer must be constant expression.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Nelle dichiarazioni enum 'const' l'inizializzatore di membro deve essere un'espressione costante.]]></Val>
|
||||
<Val><![CDATA[Nelle dichiarazioni di enumerazione 'const' l'inizializzatore di membro deve essere un'espressione costante.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -3920,37 +3956,49 @@
|
||||
</Item>
|
||||
<Item ItemId=";Infer_parameter_types_from_usage_95012" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
<Val><![CDATA[Infer parameter types from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deriva i tipi di parametro dall'utilizzo.]]></Val>
|
||||
<Val><![CDATA[Derivare i tipi di parametro dall'utilizzo]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer parameter types from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Infer_type_of_0_from_usage_95011" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
<Val><![CDATA[Infer type of '{0}' from usage]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Deriva il tipo di '{0}' dall'utilizzo.]]></Val>
|
||||
<Val><![CDATA[Derivare il tipo di '{0}' dall'utilizzo]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Infer type of '{0}' from usage.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_property_0_in_the_constructor_90020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inizializza la proprietà '{0}' nel costruttore.]]></Val>
|
||||
<Val><![CDATA[Inizializzare la proprietà '{0}' nel costruttore]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize property '{0}' in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Initialize_static_property_0_90021" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
<Val><![CDATA[Initialize static property '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Inizializza la proprietà statica '{0}'.]]></Val>
|
||||
<Val><![CDATA[Inizializzare la proprietà statica '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Initialize static property '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4481,10 +4529,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Make_super_call_the_first_statement_in_the_constructor_90002" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Imposta la chiamata a 'super()' come prima istruzione nel costruttore.]]></Val>
|
||||
<Val><![CDATA[Impostare la chiamata a 'super()' come prima istruzione nel costruttore]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Make 'super()' call the first statement in the constructor.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -4701,6 +4752,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_consecutive_numeric_separators_are_not_permitted_6189" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple consecutive numeric separators are not permitted.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Non sono consentiti più separatori numerici consecutivi.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Multiple_constructor_implementations_are_not_allowed_2392" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Multiple constructor implementations are not allowed.]]></Val>
|
||||
@ -4791,6 +4851,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Numeric_separators_are_not_allowed_here_6188" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Numeric separators are not allowed here.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[I separatori numerici non sono consentiti in questa posizione.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Object_is_possibly_null_2531" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Object is possibly 'null'.]]></Val>
|
||||
@ -5396,10 +5465,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Prefix_0_with_an_underscore_90025" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Anteporre un carattere di sottolineatura a '{0}'.]]></Val>
|
||||
<Val><![CDATA[Anteporre un carattere di sottolineatura a '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Prefix '{0}' with an underscore.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -5849,10 +5921,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Rimuovi la dichiarazione per {0}.]]></Val>
|
||||
<Val><![CDATA[Rimuovere la dichiarazione per '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6223,7 +6298,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Return type of public static getter '{0}' from exported class has or is using private name '{1}'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Il tipo restituito del getter di proprietà pubblico '{0}' della classe esportata contiene o usa il nome privato '{1}'.]]></Val>
|
||||
<Val><![CDATA[Il tipo restituito del getter statico pubblico '{0}' della classe esportata contiene o usa il nome privato '{1}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -6275,10 +6350,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Rewrite_as_the_indexed_access_type_0_90026" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Riscrivere come tipo di accesso indicizzato '{0}'.]]></Val>
|
||||
<Val><![CDATA[Riscrivere come tipo di accesso indicizzato '{0}']]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Rewrite as the indexed access type '{0}'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6390,15 +6468,12 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_or_ESNEXT_6015" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Specifica la versione di destinazione di ECMAScript: 'ES3' (predefinita), 'ES5', 'ES2015', 'ES2016', 'ES2017' o 'ESNEXT'.]]></Val>
|
||||
<Val><![CDATA[Specificare la versione di destinazione di ECMAScript: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018' o 'ESNEXT'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT']]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@ -6504,6 +6579,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Starting_compilation_in_watch_mode_6031" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Starting compilation in watch mode...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Avvio della compilazione in modalità espressione di controllo...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Statement_expected_1129" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Statement expected.]]></Val>
|
||||
@ -7066,7 +7150,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The target of an object rest assignment must be a variable or a property access.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La destinazione di un'assegnazione rimanente dell'oggetto deve essere una variabile o un accesso a proprietà.]]></Val>
|
||||
<Val><![CDATA[La destinazione di un'assegnazione REST di oggetto deve essere una variabile o un accesso a proprietà.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -7353,7 +7437,7 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
@ -8398,7 +8482,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['const' enum member initializer was evaluated to a non-finite value.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'inizializzatore di membro enum 'const' è stato valutato come valore non finito.]]></Val>
|
||||
<Val><![CDATA[L'inizializzatore del membro di enumerazione 'const' è stato valutato come valore non finito.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@ -8407,7 +8491,7 @@
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA['const' enum member initializer was evaluated to disallowed value 'NaN'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'inizializzatore di membro enum 'const' è stato valutato come valore non consentito 'NaN'.]]></Val>
|
||||
<Val><![CDATA[L'inizializzatore del membro di enumerazione 'const' è stato valutato come valore non consentito 'NaN'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user