Merge remote-tracking branch 'origin/main' into release-4.6

This commit is contained in:
Daniel Rosenwasser
2022-02-11 00:53:32 +00:00
committed by GitHub
402 changed files with 15440 additions and 2821 deletions
+7 -1
View File
@@ -7,7 +7,13 @@
}
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"icon": "terminal-bash",
},
},
},
"extensions": [
"dbaeumer.vscode-eslint"
+3 -3
View File
@@ -130,7 +130,7 @@
"Add_await_to_initializer_for_0_95084": "将 \"await\" 添加到 \"{0}\" 的初始值设定项",
"Add_await_to_initializers_95089": "将 \"await\" 添加到初始值设定项",
"Add_braces_to_arrow_function_95059": "向箭头函数添加大括号",
"Add_class_tag_95102": "添加“@”标记",
"Add_class_tag_95102": "添加“@class”标记",
"Add_const_to_all_unresolved_variables_95082": "将 \"const\" 添加到所有未解析变量",
"Add_const_to_unresolved_variable_95081": "将 \"const\" 添加到未解析的变量",
"Add_default_import_0_to_existing_import_declaration_from_1_90033": "将默认导入 \"{0}\" 从 \"{1}\" 添加到现有导入声明。",
@@ -154,7 +154,7 @@
"Add_parameter_name_90034": "添加参数名称",
"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "将限定符添加到匹配成员名称的所有未解析变量",
"Add_this_parameter_95104": "添加“此”参数。",
"Add_this_tag_95103": "添加“@”标记",
"Add_this_tag_95103": "添加“@this”标记",
"Add_to_all_uncalled_decorators_95044": "将 \"()\" 添加到所有未调用的修饰器",
"Add_ts_ignore_to_all_error_messages_95042": "将 \"@ts-ignore\" 添加到所有错误消息",
"Add_undefined_to_a_type_when_accessed_using_an_index_6674": "使用索引访问时,将 “undefined” 添加到类型。",
@@ -1784,4 +1784,4 @@
"with_statements_are_not_allowed_in_strict_mode_1101": "严格模式下不允许使用 \"with\" 语句。",
"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057": "\"yield\" 表达式隐式导致 \"any\" 类型,因为它的包含生成器缺少返回类型批注。",
"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "不能在参数初始化表达式中使用 \"yield\" 表达式。"
}
}
+82 -72
View File
@@ -356,16 +356,16 @@
}
},
"@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"dev": true,
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
}
},
@@ -676,9 +676,9 @@
"dev": true
},
"@types/node": {
"version": "17.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz",
"integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==",
"version": "17.0.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz",
"integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==",
"dev": true
},
"@types/node-fetch": {
@@ -1646,12 +1646,12 @@
},
"dependencies": {
"resolve": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz",
"integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
"version": "1.22.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
"dev": true,
"requires": {
"is-core-module": "^2.8.0",
"is-core-module": "^2.8.1",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
}
@@ -1851,15 +1851,16 @@
"dev": true
},
"chai": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz",
"integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==",
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz",
"integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==",
"dev": true,
"requires": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
"deep-eql": "^3.0.1",
"get-func-name": "^2.0.0",
"loupe": "^2.3.1",
"pathval": "^1.1.1",
"type-detect": "^4.0.5"
}
@@ -2174,24 +2175,13 @@
"dev": true
},
"copy-props": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz",
"integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz",
"integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==",
"dev": true,
"requires": {
"each-props": "^1.3.0",
"is-plain-object": "^2.0.1"
},
"dependencies": {
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"dev": true,
"requires": {
"isobject": "^3.0.1"
}
}
"each-props": "^1.3.2",
"is-plain-object": "^5.0.0"
}
},
"core-util-is": {
@@ -5122,6 +5112,15 @@
"is-unicode-supported": "^0.1.0"
}
},
"loupe": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.3.tgz",
"integrity": "sha512-krIV4Cf1BIGIx2t1e6tucThhrBemUnIUjMtD2vN4mrMxnxpBvrcosBSpooqunBqP/hOEEV1w/Cr1YskGtqw5Jg==",
"dev": true,
"requires": {
"get-func-name": "^2.0.0"
}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -5373,32 +5372,32 @@
"dev": true
},
"mocha": {
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.4.tgz",
"integrity": "sha512-+q2aV5VlJZuLgCWoBvGI5zEwPF9eEI0kr/sAA9Jm4xMND7RfIEyF8JE7C0JIg8WXRG+P1sdIAb5ccoHPlXLzcw==",
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
"integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
"dev": true,
"requires": {
"@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
"chokidar": "3.5.2",
"debug": "4.3.2",
"chokidar": "3.5.3",
"debug": "4.3.3",
"diff": "5.0.0",
"escape-string-regexp": "4.0.0",
"find-up": "5.0.0",
"glob": "7.1.7",
"glob": "7.2.0",
"growl": "1.10.5",
"he": "1.2.0",
"js-yaml": "4.1.0",
"log-symbols": "4.1.0",
"minimatch": "3.0.4",
"ms": "2.1.3",
"nanoid": "3.1.25",
"nanoid": "3.2.0",
"serialize-javascript": "6.0.0",
"strip-json-comments": "3.1.1",
"supports-color": "8.1.1",
"which": "2.0.2",
"workerpool": "6.1.5",
"workerpool": "6.2.0",
"yargs": "16.2.0",
"yargs-parser": "20.2.4",
"yargs-unparser": "2.0.0"
@@ -5448,9 +5447,9 @@
}
},
"chokidar": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"requires": {
"anymatch": "~3.1.2",
@@ -5475,9 +5474,9 @@
}
},
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"requires": {
"ms": "2.1.2"
@@ -5541,20 +5540,6 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
},
"glob": {
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
"integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -5773,12 +5758,12 @@
}
},
"resolve": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz",
"integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
"version": "1.22.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
"dev": true,
"requires": {
"is-core-module": "^2.8.0",
"is-core-module": "^2.8.1",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
}
@@ -5815,9 +5800,9 @@
"optional": true
},
"nanoid": {
"version": "3.1.25",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz",
"integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
"dev": true
},
"nanomatch": {
@@ -5852,10 +5837,13 @@
"dev": true
},
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"dev": true
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
}
},
"normalize-package-data": {
"version": "2.5.0",
@@ -7611,6 +7599,12 @@
}
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
"dev": true
},
"tsconfig-paths": {
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
@@ -8044,6 +8038,22 @@
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
"dev": true
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=",
"dev": true
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dev": true,
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
@@ -8198,9 +8208,9 @@
"dev": true
},
"workerpool": {
"version": "6.1.5",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz",
"integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz",
"integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==",
"dev": true
},
"wrap-ansi": {
+2 -2
View File
@@ -41,7 +41,7 @@ function main(): void {
const outputFilesDir = path.dirname(inputFilePath);
const thisFilePathRel = path.relative(process.cwd(), outputFilesDir);
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, "./diagnosticInformationMap.generated.ts", thisFilePathRel);
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, `./${path.basename(inputFilePath)}`, thisFilePathRel);
checkForUniqueCodes(diagnosticMessages);
writeFile("diagnosticInformationMap.generated.ts", infoFileOutput);
@@ -62,7 +62,7 @@ function checkForUniqueCodes(diagnosticTable: InputDiagnosticMessageTable) {
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFilePathRel: string, thisFilePathRel: string): string {
let result =
"// <auto-generated />\r\n" +
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
"// generated from '" + inputFilePathRel + "' in '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
"/* @internal */\r\n" +
"namespace ts {\r\n" +
" function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {\r\n" +
+2 -2
View File
@@ -174,14 +174,12 @@ namespace ts {
const binder = createBinder();
export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
performance.mark("beforeBind");
perfLogger.logStartBindFile("" + file.fileName);
binder(file, options);
perfLogger.logStopBindFile();
performance.mark("afterBind");
performance.measure("Bind", "beforeBind", "afterBind");
tracing?.pop();
}
function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
@@ -253,7 +251,9 @@ namespace ts {
Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow);
if (!file.locals) {
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
bind(file);
tracing?.pop();
file.symbolCount = symbolCount;
file.classifiableNames = classifiableNames;
delayedBindJSDocTypedefTag();
+292 -168
View File
@@ -134,6 +134,9 @@ namespace ts {
EmptyObjectStrictFacts = All & ~(EQUndefined | EQNull | EQUndefinedOrNull),
AllTypeofNE = TypeofNEString | TypeofNENumber | TypeofNEBigInt | TypeofNEBoolean | TypeofNESymbol | TypeofNEObject | TypeofNEFunction | NEUndefined,
EmptyObjectFacts = All,
// Masks
OrFactsMask = TypeofEQFunction | TypeofNEObject,
AndFactsMask = All & ~OrFactsMask,
}
const typeofEQFacts: ReadonlyESMap<string, TypeFacts> = new Map(getEntries({
@@ -172,12 +175,15 @@ namespace ts {
}
const enum CheckMode {
Normal = 0, // Normal type checking
Contextual = 1 << 0, // Explicitly assigned contextual type, therefore not cacheable
Inferential = 1 << 1, // Inferential typing
SkipContextSensitive = 1 << 2, // Skip context sensitive function expressions
SkipGenericFunctions = 1 << 3, // Skip single signature generic functions
IsForSignatureHelp = 1 << 4, // Call resolution for purposes of signature help
Normal = 0, // Normal type checking
Contextual = 1 << 0, // Explicitly assigned contextual type, therefore not cacheable
Inferential = 1 << 1, // Inferential typing
SkipContextSensitive = 1 << 2, // Skip context sensitive function expressions
SkipGenericFunctions = 1 << 3, // Skip single signature generic functions
IsForSignatureHelp = 1 << 4, // Call resolution for purposes of signature help
RestBindingElement = 1 << 5, // Checking a type that is going to be used to determine the type of a rest binding element
// e.g. in `const { a, ...rest } = foo`, when checking the type of `foo` to determine the type of `rest`,
// we need to preserve generic types instead of substituting them for constraints
}
const enum SignatureCheckMode {
@@ -1195,6 +1201,10 @@ namespace ts {
return diagnostic;
}
function isDeprecatedSymbol(symbol: Symbol) {
return !!(getDeclarationNodeFlagsFromSymbol(symbol) & NodeFlags.Deprecated);
}
function addDeprecatedSuggestion(location: Node, declarations: Node[], deprecatedEntity: string) {
const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity);
return addDeprecatedSuggestionWorker(declarations, diagnostic);
@@ -1310,13 +1320,14 @@ namespace ts {
else { // error
const isEitherEnum = !!(target.flags & SymbolFlags.Enum || source.flags & SymbolFlags.Enum);
const isEitherBlockScoped = !!(target.flags & SymbolFlags.BlockScopedVariable || source.flags & SymbolFlags.BlockScopedVariable);
const message = isEitherEnum
? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations
: isEitherBlockScoped
? Diagnostics.Cannot_redeclare_block_scoped_variable_0
: Diagnostics.Duplicate_identifier_0;
const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations
: isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0
: Diagnostics.Duplicate_identifier_0;
const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]);
const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]);
const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
const symbolName = symbolToString(source);
// Collect top-level duplicate identifier errors into one mapping, so we can then merge their diagnostics if there are a bunch
@@ -1327,12 +1338,12 @@ namespace ts {
({ firstFile, secondFile, conflictingSymbols: new Map() } as DuplicateInfoForFiles));
const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName, () =>
({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] } as DuplicateInfoForSymbol));
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
if (!isSourcePlainJs) addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
if (!isTargetPlainJs) addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
}
else {
addDuplicateDeclarationErrorsForSymbols(source, message, symbolName, target);
addDuplicateDeclarationErrorsForSymbols(target, message, symbolName, source);
if (!isSourcePlainJs) addDuplicateDeclarationErrorsForSymbols(source, message, symbolName, target);
if (!isTargetPlainJs) addDuplicateDeclarationErrorsForSymbols(target, message, symbolName, source);
}
}
return target;
@@ -1826,6 +1837,8 @@ namespace ts {
// type parameters are visible in parameter list, return type and type parameter list
? lastLocation === (location as FunctionLikeDeclaration).type ||
lastLocation.kind === SyntaxKind.Parameter ||
lastLocation.kind === SyntaxKind.JSDocParameterTag ||
lastLocation.kind === SyntaxKind.JSDocReturnTag ||
lastLocation.kind === SyntaxKind.TypeParameter
// local types not visible outside the function body
: false;
@@ -2094,8 +2107,8 @@ namespace ts {
lastSelfReferenceLocation = location;
}
lastLocation = location;
location = isJSDocTemplateTag(location) ?
getEffectiveContainerForJSDocTemplateTag(location) || location.parent :
location = isJSDocTemplateTag(location) ? getEffectiveContainerForJSDocTemplateTag(location) || location.parent :
isJSDocParameterTag(location) || isJSDocReturnTag(location) ? getHostSignatureFromJSDoc(location) || location.parent :
location.parent;
}
@@ -2228,29 +2241,23 @@ namespace ts {
error(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation as Identifier));
}
}
if (result && errorLocation && meaning & SymbolFlags.Value && result.flags & SymbolFlags.Alias) {
checkSymbolUsageInExpressionContext(result, name, errorLocation);
if (result && errorLocation && meaning & SymbolFlags.Value && result.flags & SymbolFlags.Alias && !(result.flags & SymbolFlags.Value) && !isValidTypeOnlyAliasUseSite(errorLocation)) {
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result);
if (typeOnlyDeclaration) {
const message = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier
? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
const unescapedName = unescapeLeadingUnderscores(name);
addTypeOnlyDeclarationRelatedInfo(
error(errorLocation, message, unescapedName),
typeOnlyDeclaration,
unescapedName);
}
}
}
return result;
}
function checkSymbolUsageInExpressionContext(symbol: Symbol, name: __String, useSite: Node) {
if (!isValidTypeOnlyAliasUseSite(useSite)) {
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
if (typeOnlyDeclaration) {
const message = typeOnlyDeclaration.kind === SyntaxKind.ExportSpecifier
? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
: Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
const unescapedName = unescapeLeadingUnderscores(name);
addTypeOnlyDeclarationRelatedInfo(
error(useSite, message, unescapedName),
typeOnlyDeclaration,
unescapedName);
}
}
}
function addTypeOnlyDeclarationRelatedInfo(diagnostic: Diagnostic, typeOnlyDeclaration: TypeOnlyCompatibleAliasDeclaration | undefined, unescapedName: string) {
if (!typeOnlyDeclaration) return diagnostic;
return addRelatedInfo(
@@ -3373,16 +3380,20 @@ namespace ts {
return;
}
const host = getJSDocHost(node);
if (host &&
isExpressionStatement(host) &&
isBinaryExpression(host.expression) &&
getAssignmentDeclarationKind(host.expression) === AssignmentDeclarationKind.PrototypeProperty) {
// X.prototype.m = /** @param {K} p */ function () { } <-- look for K on X's declaration
if (host && isExpressionStatement(host) && isPrototypePropertyAssignment(host.expression)) {
// /** @param {K} p */ X.prototype.m = function () { } <-- look for K on X's declaration
const symbol = getSymbolOfNode(host.expression.left);
if (symbol) {
return getDeclarationOfJSPrototypeContainer(symbol);
}
}
if (host && isFunctionExpression(host) && isPrototypePropertyAssignment(host.parent) && isExpressionStatement(host.parent.parent)) {
// X.prototype.m = /** @param {K} p */ function () { } <-- look for K on X's declaration
const symbol = getSymbolOfNode(host.parent.left);
if (symbol) {
return getDeclarationOfJSPrototypeContainer(symbol);
}
}
if (host && (isObjectLiteralMethod(host) || isPropertyAssignment(host)) &&
isBinaryExpression(host.parent.parent) &&
getAssignmentDeclarationKind(host.parent.parent) === AssignmentDeclarationKind.Prototype) {
@@ -6390,7 +6401,8 @@ namespace ts {
includePrivateSymbol?.(sym);
}
if (isIdentifier(node)) {
const name = sym.flags & SymbolFlags.TypeParameter ? typeParameterToName(getDeclaredTypeOfSymbol(sym), context) : factory.cloneNode(node);
const type = getDeclaredTypeOfSymbol(sym);
const name = sym.flags & SymbolFlags.TypeParameter && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : factory.cloneNode(node);
name.symbol = sym; // for quickinfo, which uses identifier symbol information
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), EmitFlags.NoAsciiEscaping) };
}
@@ -8453,9 +8465,12 @@ namespace ts {
// Return the type of a binding element parent. We check SymbolLinks first to see if a type has been
// assigned by contextual typing.
function getTypeForBindingElementParent(node: BindingElementGrandparent) {
function getTypeForBindingElementParent(node: BindingElementGrandparent, checkMode: CheckMode) {
if (checkMode !== CheckMode.Normal) {
return getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false, checkMode);
}
const symbol = getSymbolOfNode(node);
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false);
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false, checkMode);
}
function getRestType(source: Type, properties: PropertyName[], symbol: Symbol | undefined): Type {
@@ -8586,7 +8601,8 @@ namespace ts {
/** Return the inferred type for a binding element */
function getTypeForBindingElement(declaration: BindingElement): Type | undefined {
const parentType = getTypeForBindingElementParent(declaration.parent.parent);
const checkMode = declaration.dotDotDotToken ? CheckMode.RestBindingElement : CheckMode.Normal;
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
}
@@ -8659,9 +8675,9 @@ namespace ts {
if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) {
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
// undefined from the final type.
return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & TypeFlags.Undefined) ? getNonUndefinedType(type) : type;
return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration, CheckMode.Normal)) & TypeFlags.Undefined) ? getNonUndefinedType(type) : type;
}
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration)], UnionReduction.Subtype));
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, CheckMode.Normal)], UnionReduction.Subtype));
}
function getTypeForDeclarationFromJSDocComment(declaration: Node) {
@@ -8687,11 +8703,15 @@ namespace ts {
}
// Return the inferred type for a variable, parameter, or property declaration
function getTypeForVariableLikeDeclaration(declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | VariableDeclaration | BindingElement | JSDocPropertyLikeTag, includeOptionality: boolean): Type | undefined {
function getTypeForVariableLikeDeclaration(
declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | VariableDeclaration | BindingElement | JSDocPropertyLikeTag,
includeOptionality: boolean,
checkMode: CheckMode,
): Type | undefined {
// A variable declared in a for..in statement is of type string, or of type keyof T when the
// right hand expression is of a type parameter type.
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === SyntaxKind.ForInStatement) {
const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression)));
const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, /*checkMode*/ checkMode)));
return indexType.flags & (TypeFlags.TypeParameter | TypeFlags.Index) ? getExtractStringType(indexType) : stringType;
}
@@ -8753,12 +8773,8 @@ namespace ts {
}
}
if (isInJSFile(declaration)) {
const typeTag = getJSDocType(func);
if (typeTag && isFunctionTypeNode(typeTag)) {
const signature = getSignatureFromDeclaration(typeTag);
const pos = func.parameters.indexOf(declaration);
return declaration.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos);
}
const type = getParameterTypeOfTypeTag(func, declaration);
if (type) return type;
}
// Use contextual parameter type if one is available
const type = declaration.symbol.escapedName === InternalSymbolName.This ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration);
@@ -8776,7 +8792,7 @@ namespace ts {
return containerObjectType;
}
}
const type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration));
const type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration, checkMode));
return addOptionality(type, isProperty, isOptional);
}
@@ -9169,7 +9185,7 @@ namespace ts {
// contextual type or, if the element itself is a binding pattern, with the type implied by that binding
// pattern.
const contextualType = isBindingPattern(element.name) ? getTypeFromBindingPattern(element.name, /*includePatternInType*/ true, /*reportErrors*/ false) : unknownType;
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, contextualType)));
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, CheckMode.Normal, contextualType)));
}
if (isBindingPattern(element.name)) {
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
@@ -9261,7 +9277,7 @@ namespace ts {
// binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the
// tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string.
function getWidenedTypeForVariableLikeDeclaration(declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | VariableDeclaration | BindingElement | JSDocPropertyLikeTag, reportErrors?: boolean): Type {
return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true), declaration, reportErrors);
return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true, CheckMode.Normal), declaration, reportErrors);
}
function isGlobalSymbolConstructor(node: Node) {
@@ -9509,11 +9525,12 @@ namespace ts {
const getter = getDeclarationOfKind<AccessorDeclaration>(symbol, SyntaxKind.GetAccessor);
const setter = getDeclarationOfKind<AccessorDeclaration>(symbol, SyntaxKind.SetAccessor);
const setterType = getAnnotatedAccessorType(setter);
// For write operations, prioritize type annotations on the setter
if (writing && setterType) {
return instantiateTypeIfNeeded(setterType, symbol);
if (writing) {
const setterType = getAnnotatedAccessorType(setter);
if (setterType) {
return instantiateTypeIfNeeded(setterType, symbol);
}
}
// Else defer to the getter type
@@ -9531,6 +9548,7 @@ namespace ts {
}
// If the user didn't specify a return type, try to use the set-accessor's parameter type.
const setterType = getAnnotatedAccessorType(setter);
if (setterType) {
return setterType;
}
@@ -9694,6 +9712,41 @@ namespace ts {
return links.type;
}
function getWriteTypeOfSymbolWithDeferredType(symbol: Symbol): Type | undefined {
const links = getSymbolLinks(symbol);
if (!links.writeType && links.deferralWriteConstituents) {
Debug.assertIsDefined(links.deferralParent);
Debug.assertIsDefined(links.deferralConstituents);
links.writeType = links.deferralParent.flags & TypeFlags.Union ? getUnionType(links.deferralWriteConstituents) : getIntersectionType(links.deferralWriteConstituents);
}
return links.writeType;
}
/**
* Distinct write types come only from set accessors, but union and intersection
* properties deriving from set accessors will either pre-compute or defer the
* union or intersection of the writeTypes of their constituents. To account for
* this, we will assume that any deferred type or transient symbol may have a
* `writeType` (or a deferred write type ready to be computed) that should be
* used before looking for set accessor declarations.
*/
function getWriteTypeOfSymbol(symbol: Symbol): Type {
const checkFlags = getCheckFlags(symbol);
if (checkFlags & CheckFlags.DeferredType) {
const writeType = getWriteTypeOfSymbolWithDeferredType(symbol);
if (writeType) {
return writeType;
}
}
if (symbol.flags & SymbolFlags.Transient) {
const { writeType } = symbol as TransientSymbol;
if (writeType) {
return writeType;
}
}
return getSetAccessorTypeOfSymbol(symbol);
}
function getSetAccessorTypeOfSymbol(symbol: Symbol): Type {
if (symbol.flags & SymbolFlags.Accessor) {
const type = getTypeOfSetAccessor(symbol);
@@ -12196,6 +12249,7 @@ namespace ts {
let firstType: Type | undefined;
let nameType: Type | undefined;
const propTypes: Type[] = [];
let writeTypes: Type[] | undefined;
let firstValueDeclaration: Declaration | undefined;
let hasNonUniformValueDeclaration = false;
for (const prop of props) {
@@ -12211,6 +12265,10 @@ namespace ts {
firstType = type;
nameType = getSymbolLinks(prop).nameType;
}
const writeType = getWriteTypeOfSymbol(prop);
if (writeTypes || writeType !== type) {
writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType);
}
else if (type !== firstType) {
checkFlags |= CheckFlags.HasNonUniformType;
}
@@ -12241,9 +12299,13 @@ namespace ts {
result.checkFlags |= CheckFlags.DeferredType;
result.deferralParent = containingType;
result.deferralConstituents = propTypes;
result.deferralWriteConstituents = writeTypes;
}
else {
result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
if (writeTypes) {
result.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
}
}
return result;
}
@@ -12710,6 +12772,13 @@ namespace ts {
return typeTag?.typeExpression && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
}
function getParameterTypeOfTypeTag(func: FunctionLikeDeclaration, parameter: ParameterDeclaration) {
const signature = getSignatureOfTypeTag(func);
if (!signature) return undefined;
const pos = func.parameters.indexOf(parameter);
return parameter.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos);
}
function getReturnTypeOfTypeTag(node: SignatureDeclaration | JSDocSignature) {
const signature = getSignatureOfTypeTag(node);
return signature && getReturnTypeOfSignature(signature);
@@ -13504,7 +13573,7 @@ namespace ts {
function getImpliedConstraint(type: Type, checkNode: TypeNode, extendsNode: TypeNode): Type | undefined {
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, (checkNode as TupleTypeNode).elements[0], (extendsNode as TupleTypeNode).elements[0]) :
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
undefined;
}
@@ -15181,7 +15250,7 @@ namespace ts {
}
const prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessFlags & AccessFlags.ReportDeprecated && accessNode && prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & NodeFlags.Deprecated && isUncalledFunctionReference(accessNode, prop)) {
if (accessFlags & AccessFlags.ReportDeprecated && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) {
const deprecatedNode = accessExpression?.argumentExpression ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);
addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName as string);
}
@@ -22959,7 +23028,10 @@ namespace ts {
(type === falseType || type === regularFalseType) ? TypeFacts.FalseStrictFacts : TypeFacts.TrueStrictFacts :
(type === falseType || type === regularFalseType) ? TypeFacts.FalseFacts : TypeFacts.TrueFacts;
}
if (flags & TypeFlags.Object && !ignoreObjects) {
if (flags & TypeFlags.Object) {
if (ignoreObjects) {
return TypeFacts.AndFactsMask; // This is the identity element for computing type facts of intersection.
}
return getObjectFlags(type) & ObjectFlags.Anonymous && isEmptyObjectType(type as ObjectType) ?
strictNullChecks ? TypeFacts.EmptyObjectStrictFacts : TypeFacts.EmptyObjectFacts :
isFunctionObjectType(type as ObjectType) ?
@@ -22992,11 +23064,24 @@ namespace ts {
// When an intersection contains a primitive type we ignore object type constituents as they are
// presumably type tags. For example, in string & { __kind__: "name" } we ignore the object type.
ignoreObjects ||= maybeTypeOfKind(type, TypeFlags.Primitive);
return reduceLeft((type as UnionType).types, (facts, t) => facts & getTypeFacts(t, ignoreObjects), TypeFacts.All);
return getIntersectionTypeFacts(type as IntersectionType, ignoreObjects);
}
return TypeFacts.All;
}
function getIntersectionTypeFacts(type: IntersectionType, ignoreObjects: boolean): TypeFacts {
// When computing the type facts of an intersection type, certain type facts are computed as `and`
// and others are computed as `or`.
let oredFacts = TypeFacts.None;
let andedFacts = TypeFacts.All;
for (const t of type.types) {
const f = getTypeFacts(t, ignoreObjects);
oredFacts |= f;
andedFacts &= f;
}
return oredFacts & TypeFacts.OrFactsMask | andedFacts & TypeFacts.AndFactsMask;
}
function getTypeWithFacts(type: Type, include: TypeFacts) {
return filterType(type, t => (getTypeFacts(t) & include) !== 0);
}
@@ -24949,12 +25034,16 @@ namespace ts {
return !!(type.flags & TypeFlags.Instantiable && !maybeTypeOfKind(getBaseConstraintOrType(type), TypeFlags.Nullable));
}
function hasNonBindingPatternContextualTypeWithNoGenericTypes(node: Node) {
function hasContextualTypeWithNoGenericTypes(node: Node, checkMode: CheckMode | undefined) {
// Computing the contextual type for a child of a JSX element involves resolving the type of the
// element's tag name, so we exclude that here to avoid circularities.
// If check mode has `CheckMode.RestBindingElement`, we skip binding pattern contextual types,
// as we want the type of a rest element to be generic when possible.
const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) &&
!((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) &&
getContextualType(node, ContextFlags.SkipBindingPatterns);
(checkMode && checkMode & CheckMode.RestBindingElement ?
getContextualType(node, ContextFlags.SkipBindingPatterns)
: getContextualType(node));
return contextualType && !isGenericType(contextualType);
}
@@ -24968,7 +25057,7 @@ namespace ts {
// 'string | undefined' to give control flow analysis the opportunity to narrow to type 'string'.
const substituteConstraints = !(checkMode && checkMode & CheckMode.Inferential) &&
someType(type, isGenericTypeWithUnionConstraint) &&
(isConstraintPosition(type, reference) || hasNonBindingPatternContextualTypeWithNoGenericTypes(reference));
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t) : type;
}
@@ -25040,7 +25129,7 @@ namespace ts {
const links = getNodeLinks(location);
if (!(links.flags & NodeCheckFlags.InCheckIdentifier)) {
links.flags |= NodeCheckFlags.InCheckIdentifier;
const parentType = getTypeForBindingElementParent(parent);
const parentType = getTypeForBindingElementParent(parent, CheckMode.Normal);
links.flags &= ~NodeCheckFlags.InCheckIdentifier;
if (parentType && parentType.flags & TypeFlags.Union && !(parent.kind === SyntaxKind.Parameter && isSymbolAssigned(symbol))) {
const pattern = declaration.parent;
@@ -25089,6 +25178,10 @@ namespace ts {
}
function checkIdentifier(node: Identifier, checkMode: CheckMode | undefined): Type {
if (isThisInTypeQuery(node)) {
return checkThisExpression(node);
}
const symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
return errorType;
@@ -25127,9 +25220,9 @@ namespace ts {
}
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
const sourceSymbol = localOrExportSymbol.flags & SymbolFlags.Alias ? resolveAlias(localOrExportSymbol) : localOrExportSymbol;
if (sourceSymbol.declarations && getDeclarationNodeFlagsFromSymbol(sourceSymbol) & NodeFlags.Deprecated && isUncalledFunctionReference(node, sourceSymbol)) {
addDeprecatedSuggestion(node, sourceSymbol.declarations, node.escapedText as string);
const targetSymbol = checkDeprecatedAliasedSymbol(localOrExportSymbol, node);
if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText as string);
}
let declaration = localOrExportSymbol.valueDeclaration;
@@ -25973,7 +26066,7 @@ namespace ts {
const parent = declaration.parent.parent;
const name = declaration.propertyName || declaration.name;
const parentType = getContextualTypeForVariableLikeDeclaration(parent) ||
parent.kind !== SyntaxKind.BindingElement && parent.initializer && checkDeclarationInitializer(parent);
parent.kind !== SyntaxKind.BindingElement && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? CheckMode.RestBindingElement : CheckMode.Normal);
if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return undefined;
if (parent.name.kind === SyntaxKind.ArrayBindingPattern) {
const index = indexOfNode(declaration.parent.elements, declaration);
@@ -27071,7 +27164,8 @@ namespace ts {
const links = getNodeLinks(node.expression);
if (!links.resolvedType) {
if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent))
&& isBinaryExpression(node.expression) && node.expression.operatorToken.kind === SyntaxKind.InKeyword) {
&& isBinaryExpression(node.expression) && node.expression.operatorToken.kind === SyntaxKind.InKeyword
&& node.parent.kind !== SyntaxKind.GetAccessor && node.parent.kind !== SyntaxKind.SetAccessor) {
return links.resolvedType = errorType;
}
links.resolvedType = checkExpression(node.expression);
@@ -28402,29 +28496,6 @@ namespace ts {
grammarErrorOnNode(right, Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, idText(right));
}
if (lexicallyScopedSymbol?.valueDeclaration && (getEmitScriptTarget(compilerOptions) === ScriptTarget.ESNext && !useDefineForClassFields)) {
const lexicalClass = getContainingClass(lexicallyScopedSymbol.valueDeclaration);
const parentStaticFieldInitializer = findAncestor(node, (n) => {
if (n === lexicalClass) return "quit";
if (isPropertyDeclaration(n.parent) && hasStaticModifier(n.parent) && n.parent.initializer === n && n.parent.parent === lexicalClass) {
return true;
}
return false;
});
if (parentStaticFieldInitializer) {
const parentStaticFieldInitializerSymbol = getSymbolOfNode(parentStaticFieldInitializer.parent);
Debug.assert(parentStaticFieldInitializerSymbol, "Initializer without declaration symbol");
const diagnostic = error(node,
Diagnostics.Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnext_and_useDefineForClassFields_is_false,
symbolName(lexicallyScopedSymbol));
addRelatedInfo(diagnostic,
createDiagnosticForNode(parentStaticFieldInitializer.parent,
Diagnostics.Initializer_for_property_0,
symbolName(parentStaticFieldInitializerSymbol))
);
}
}
if (isAnyLike) {
if (lexicallyScopedSymbol) {
return isErrorType(apparentType) ? errorType : apparentType;
@@ -28496,7 +28567,7 @@ namespace ts {
}
}
else {
if (prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & NodeFlags.Deprecated && isUncalledFunctionReference(node, prop)) {
if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
addDeprecatedSuggestion(right, prop.declarations, right.escapedText as string);
}
checkPropertyNotUsedBeforeDeclaration(prop, node, right);
@@ -28509,7 +28580,7 @@ namespace ts {
return errorType;
}
propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getSetAccessorTypeOfSymbol(prop) : getTypeOfSymbol(prop);
propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
}
return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
@@ -30100,7 +30171,7 @@ namespace ts {
const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures");
const chain = chainDiagnosticMessages(
map(diags, d => typeof d.messageText === "string" ? (d as DiagnosticMessageChain) : d.messageText),
map(diags, createDiagnosticMessageChainFromDiagnostic),
Diagnostics.No_overload_matches_this_call);
// The below is a spread to guarantee we get a new (mutable) array - our `flatMap` helper tries to do "smart" optimizations where it reuses input
// arrays and the emptyArray singleton where possible, which is decidedly not what we want while we're still constructing this diagnostic
@@ -31493,6 +31564,9 @@ namespace ts {
}
function getParameterIdentifierNameAtPosition(signature: Signature, pos: number): [parameterName: __String, isRestParameter: boolean] | undefined {
if (signature.declaration?.kind === SyntaxKind.JSDocFunctionType) {
return undefined;
}
const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
if (pos < paramCount) {
const param = signature.parameters[pos];
@@ -31752,7 +31826,7 @@ namespace ts {
const links = getSymbolLinks(parameter);
if (!links.type) {
const declaration = parameter.valueDeclaration as ParameterDeclaration;
links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true);
links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true);
if (declaration.name.kind !== SyntaxKind.Identifier) {
// if inference didn't come up with anything but unknown, fall back to the binding pattern if present.
if (links.type === unknownType) {
@@ -33669,11 +33743,11 @@ namespace ts {
}
function checkExpressionCached(node: Expression | QualifiedName, checkMode?: CheckMode): Type {
if (checkMode && checkMode !== CheckMode.Normal) {
return checkExpression(node, checkMode);
}
const links = getNodeLinks(node);
if (!links.resolvedType) {
if (checkMode && checkMode !== CheckMode.Normal) {
return checkExpression(node, checkMode);
}
// When computing a type that we're going to cache, we need to ignore any ongoing control flow
// analysis because variables may have transient types in indeterminable states. Moving flowLoopStart
// to the top of the stack ensures all transient types are computed from a known point.
@@ -33695,10 +33769,16 @@ namespace ts {
isJSDocTypeAssertion(node);
}
function checkDeclarationInitializer(declaration: HasExpressionInitializer, contextualType?: Type | undefined) {
function checkDeclarationInitializer(
declaration: HasExpressionInitializer,
checkMode: CheckMode,
contextualType?: Type | undefined
) {
const initializer = getEffectiveInitializer(declaration)!;
const type = getQuickTypeOfExpression(initializer) ||
(contextualType ? checkExpressionWithContextualType(initializer, contextualType, /*inferenceContext*/ undefined, CheckMode.Normal) : checkExpressionCached(initializer));
(contextualType ?
checkExpressionWithContextualType(initializer, contextualType, /*inferenceContext*/ undefined, checkMode || CheckMode.Normal)
: checkExpressionCached(initializer, checkMode));
return isParameter(declaration) && declaration.name.kind === SyntaxKind.ArrayBindingPattern &&
isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ?
padTupleType(type, declaration.name) : type;
@@ -34392,6 +34472,7 @@ namespace ts {
}
checkTypeParameters(getEffectiveTypeParameterDeclarations(node));
checkUnmatchedJSDocParameters(node);
forEach(node.parameters, checkParameter);
@@ -34630,9 +34711,7 @@ namespace ts {
checkVariableLikeDeclaration(node);
setNodeLinksForPrivateIdentifierScope(node);
if (isPrivateIdentifier(node.name) && hasStaticModifier(node) && node.initializer && languageVersion === ScriptTarget.ESNext && !compilerOptions.useDefineForClassFields) {
error(node.initializer, Diagnostics.Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_not_specified_with_a_target_of_esnext_Consider_adding_the_useDefineForClassFields_flag);
}
// property signatures already report "initializer not allowed in ambient context" elsewhere
if (hasSyntacticModifier(node, ModifierFlags.Abstract) && node.kind === SyntaxKind.PropertyDeclaration && node.initializer) {
error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name));
@@ -36157,40 +36236,7 @@ namespace ts {
function checkJSDocParameterTag(node: JSDocParameterTag) {
checkSourceElement(node.typeExpression);
if (!getParameterSymbolFromJSDoc(node)) {
const decl = getHostSignatureFromJSDoc(node);
// don't issue an error for invalid hosts -- just functions --
// and give a better error message when the host function mentions `arguments`
// but the tag doesn't have an array type
if (decl) {
const i = getJSDocTags(decl).filter(isJSDocParameterTag).indexOf(node);
if (i > -1 && i < decl.parameters.length && isBindingPattern(decl.parameters[i].name)) {
return;
}
if (!containsArgumentsReference(decl)) {
if (isQualifiedName(node.name)) {
error(node.name,
Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,
entityNameToString(node.name),
entityNameToString(node.name.left));
}
else {
error(node.name,
Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,
idText(node.name));
}
}
else if (findLast(getJSDocTags(decl), isJSDocParameterTag) === node &&
node.typeExpression && node.typeExpression.type &&
!isArrayType(getTypeFromTypeNode(node.typeExpression.type))) {
error(node.name,
Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,
idText(node.name.kind === SyntaxKind.QualifiedName ? node.name.right : node.name));
}
}
}
}
function checkJSDocPropertyTag(node: JSDocPropertyTag) {
checkSourceElement(node.typeExpression);
}
@@ -36958,7 +37004,8 @@ namespace ts {
// check private/protected variable access
const parent = node.parent.parent;
const parentType = getTypeForBindingElementParent(parent);
const parentCheckMode = node.dotDotDotToken ? CheckMode.RestBindingElement : CheckMode.Normal;
const parentType = getTypeForBindingElementParent(parent, parentCheckMode);
const name = node.propertyName || node.name;
if (parentType && !isBindingPattern(name)) {
const exprType = getLiteralTypeFromPropertyName(name);
@@ -38356,7 +38403,7 @@ namespace ts {
const declaration = catchClause.variableDeclaration;
const typeNode = getEffectiveTypeAnnotationNode(getRootDeclaration(declaration));
if (typeNode) {
const type = getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ false);
const type = getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ false, CheckMode.Normal);
if (type && !(type.flags & TypeFlags.AnyOrUnknown)) {
grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
}
@@ -38485,6 +38532,45 @@ namespace ts {
}
}
function checkUnmatchedJSDocParameters(node: SignatureDeclaration) {
const jsdocParameters = filter(getJSDocTags(node), isJSDocParameterTag);
if (!length(jsdocParameters)) return;
const isJs = isInJSFile(node);
const parameters = new Set<__String>();
const excludedParameters = new Set<number>();
forEach(node.parameters, ({ name }, index) => {
if (isIdentifier(name)) {
parameters.add(name.escapedText);
}
if (isBindingPattern(name)) {
excludedParameters.add(index);
}
});
const containsArguments = containsArgumentsReference(node);
if (containsArguments) {
const lastJSDocParam = lastOrUndefined(jsdocParameters);
if (lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
errorOrSuggestion(isJs, lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name));
}
}
else {
forEach(jsdocParameters, ({ name }, index) => {
if (excludedParameters.has(index) || isIdentifier(name) && parameters.has(name.escapedText)) {
return;
}
if (isQualifiedName(name)) {
errorOrSuggestion(isJs, name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left));
}
else {
errorOrSuggestion(isJs, name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, idText(name));
}
});
}
}
/**
* Check each type parameter and check that type parameters have no duplicate type parameter declarations
*/
@@ -39455,16 +39541,15 @@ namespace ts {
return nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
case SyntaxKind.ElementAccessExpression:
case SyntaxKind.PropertyAccessExpression:
const ex = expr as AccessExpression;
if (isConstantMemberAccess(ex)) {
const type = getTypeOfExpression(ex.expression);
if (isConstantMemberAccess(expr)) {
const type = getTypeOfExpression(expr.expression);
if (type.symbol && type.symbol.flags & SymbolFlags.Enum) {
let name: __String;
if (ex.kind === SyntaxKind.PropertyAccessExpression) {
name = ex.name.escapedText;
if (expr.kind === SyntaxKind.PropertyAccessExpression) {
name = expr.name.escapedText;
}
else {
name = escapeLeadingUnderscores(cast(ex.argumentExpression, isLiteralExpression).text);
name = escapeLeadingUnderscores(cast(expr.argumentExpression, isLiteralExpression).text);
}
return evaluateEnumMember(expr, type.symbol, name);
}
@@ -39493,7 +39578,12 @@ namespace ts {
}
}
function isConstantMemberAccess(node: Expression): boolean {
function isConstantMemberAccess(node: Expression): node is AccessExpression {
const type = getTypeOfExpression(node);
if(type === errorType) {
return false;
}
return node.kind === SyntaxKind.Identifier ||
node.kind === SyntaxKind.PropertyAccessExpression && isConstantMemberAccess((node as PropertyAccessExpression).expression) ||
node.kind === SyntaxKind.ElementAccessExpression && isConstantMemberAccess((node as ElementAccessExpression).expression) &&
@@ -39604,7 +39694,7 @@ namespace ts {
const isAmbientExternalModule: boolean = isAmbientModule(node);
const contextErrorMessage = isAmbientExternalModule
? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file
: Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module;
: Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;
if (checkGrammarModuleElementContext(node, contextErrorMessage)) {
// If we hit a module declaration in an illegal context, just bail out to avoid cascading errors.
return;
@@ -39850,6 +39940,9 @@ namespace ts {
name
);
}
if (isType && node.kind === SyntaxKind.ImportEqualsDeclaration && hasEffectiveModifier(node, ModifierFlags.Export)) {
error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided);
}
break;
}
case SyntaxKind.ExportSpecifier: {
@@ -39873,12 +39966,47 @@ namespace ts {
}
}
if (isImportSpecifier(node) && target.declarations?.every(d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated))) {
addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName as string);
if (isImportSpecifier(node)) {
const targetSymbol = checkDeprecatedAliasedSymbol(symbol, node);
if (isDeprecatedAliasedSymbol(targetSymbol) && targetSymbol.declarations) {
addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName as string);
}
}
}
}
function isDeprecatedAliasedSymbol(symbol: Symbol) {
return !!symbol.declarations && every(symbol.declarations, d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated));
}
function checkDeprecatedAliasedSymbol(symbol: Symbol, location: Node) {
if (!(symbol.flags & SymbolFlags.Alias)) return symbol;
const targetSymbol = resolveAlias(symbol);
if (targetSymbol === unknownSymbol) return targetSymbol;
while (symbol.flags & SymbolFlags.Alias) {
const target = getImmediateAliasedSymbol(symbol);
if (target) {
if (target === targetSymbol) break;
if (target.declarations && length(target.declarations)) {
if (isDeprecatedAliasedSymbol(target)) {
addDeprecatedSuggestion(location, target.declarations, target.escapedName as string);
break;
}
else {
if (symbol === targetSymbol) break;
symbol = target;
}
}
}
else {
break;
}
}
return targetSymbol;
}
function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) {
checkCollisionsForDeclarationName(node, node.name);
checkAliasSymbol(node);
@@ -39907,7 +40035,7 @@ namespace ts {
}
function checkImportDeclaration(node: ImportDeclaration) {
if (checkGrammarModuleElementContext(node, Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) {
if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
// If we hit an import declaration in an illegal context, just bail out to avoid cascading errors.
return;
}
@@ -39941,7 +40069,7 @@ namespace ts {
}
function checkImportEqualsDeclaration(node: ImportEqualsDeclaration) {
if (checkGrammarModuleElementContext(node, Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) {
if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
// If we hit an import declaration in an illegal context, just bail out to avoid cascading errors.
return;
}
@@ -39980,7 +40108,7 @@ namespace ts {
}
function checkExportDeclaration(node: ExportDeclaration) {
if (checkGrammarModuleElementContext(node, Diagnostics.An_export_declaration_can_only_be_used_in_a_module)) {
if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
// If we hit an export in an illegal context, just bail out to avoid cascading errors.
return;
}
@@ -41184,7 +41312,10 @@ namespace ts {
case SyntaxKind.PrivateIdentifier:
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.QualifiedName:
return getSymbolOfNameOrPropertyAccessExpression(node as EntityName | PrivateIdentifier | PropertyAccessExpression);
if (!isThisInTypeQuery(node)) {
return getSymbolOfNameOrPropertyAccessExpression(node as EntityName | PrivateIdentifier | PropertyAccessExpression);
}
// falls through
case SyntaxKind.ThisKeyword:
const container = getThisContainer(node, /*includeArrowFunctions*/ false);
@@ -41345,7 +41476,7 @@ namespace ts {
}
if (isBindingPattern(node)) {
return getTypeForVariableLikeDeclaration(node.parent, /*includeOptionality*/ true) || errorType;
return getTypeForVariableLikeDeclaration(node.parent, /*includeOptionality*/ true, CheckMode.Normal) || errorType;
}
if (isInRightSideOfImportOrExportAssignment(node as Identifier)) {
@@ -42529,7 +42660,7 @@ namespace ts {
return quickResult;
}
let lastStatic: Node | undefined, lastDeclare: Node | undefined, lastAsync: Node | undefined, lastReadonly: Node | undefined, lastOverride: Node | undefined;
let lastStatic: Node | undefined, lastDeclare: Node | undefined, lastAsync: Node | undefined, lastOverride: Node | undefined;
let flags = ModifierFlags.None;
for (const modifier of node.modifiers!) {
if (modifier.kind !== SyntaxKind.ReadonlyKeyword) {
@@ -42636,7 +42767,6 @@ namespace ts {
return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
}
flags |= ModifierFlags.Readonly;
lastReadonly = modifier;
break;
case SyntaxKind.ExportKeyword:
@@ -42755,18 +42885,12 @@ namespace ts {
if (flags & ModifierFlags.Static) {
return grammarErrorOnNode(lastStatic!, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
}
if (flags & ModifierFlags.Abstract) {
return grammarErrorOnNode(lastStatic!, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "abstract"); // TODO: GH#18217
}
if (flags & ModifierFlags.Override) {
return grammarErrorOnNode(lastOverride!, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); // TODO: GH#18217
}
else if (flags & ModifierFlags.Async) {
if (flags & ModifierFlags.Async) {
return grammarErrorOnNode(lastAsync!, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async");
}
else if (flags & ModifierFlags.Readonly) {
return grammarErrorOnNode(lastReadonly!, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "readonly");
}
return false;
}
else if ((node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration) && flags & ModifierFlags.Ambient) {
+4 -4
View File
@@ -1252,11 +1252,11 @@ namespace ts {
return result;
}
export function getOwnValues<T>(sparseArray: T[]): T[] {
export function getOwnValues<T>(collection: MapLike<T> | T[]): T[] {
const values: T[] = [];
for (const key in sparseArray) {
if (hasOwnProperty.call(sparseArray, key)) {
values.push(sparseArray[key]);
for (const key in collection) {
if (hasOwnProperty.call(collection, key)) {
values.push((collection as MapLike<T>)[key]);
}
}
+10 -4
View File
@@ -114,16 +114,21 @@ namespace ts {
/* @internal */
namespace NativeCollections {
declare const Map: MapConstructor | undefined;
declare const Set: SetConstructor | undefined;
declare const self: any;
const globals = typeof globalThis !== "undefined" ? globalThis :
typeof global !== "undefined" ? global :
typeof self !== "undefined" ? self :
undefined;
/**
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
*/
export function tryGetNativeMap(): MapConstructor | undefined {
// Internet Explorer's Map doesn't support iteration, so don't use it.
const gMap = globals?.Map;
// eslint-disable-next-line no-in-operator
return typeof Map !== "undefined" && "entries" in Map.prototype && new Map([[0, 0]]).size === 1 ? Map : undefined;
return typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
}
/**
@@ -131,8 +136,9 @@ namespace ts {
*/
export function tryGetNativeSet(): SetConstructor | undefined {
// Internet Explorer's Set doesn't support iteration, so don't use it.
const gSet = globals?.Set;
// eslint-disable-next-line no-in-operator
return typeof Set !== "undefined" && "entries" in Set.prototype && new Set([0]).size === 1 ? Set : undefined;
return typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
}
}
+48 -24
View File
@@ -727,11 +727,11 @@
"category": "Error",
"code": 1231
},
"An import declaration can only be used in a namespace or module.": {
"An import declaration can only be used at the top level of a namespace or module.": {
"category": "Error",
"code": 1232
},
"An export declaration can only be used in a module.": {
"An export declaration can only be used at the top level of a namespace or module.": {
"category": "Error",
"code": 1233
},
@@ -739,7 +739,7 @@
"category": "Error",
"code": 1234
},
"A namespace declaration is only allowed in a namespace or module.": {
"A namespace declaration is only allowed at the top level of a namespace or module.": {
"category": "Error",
"code": 1235
},
@@ -867,6 +867,10 @@
"category": "Error",
"code": 1268
},
"Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided.": {
"category": "Error",
"code": 1269
},
"'with' statements are not allowed in an async function block.": {
"category": "Error",
@@ -1413,6 +1417,14 @@
"category": "Error",
"code": 1472
},
"An import declaration can only be used at the top level of a module.": {
"category": "Error",
"code": 1473
},
"An export declaration can only be used at the top level of a module.": {
"category": "Error",
"code": 1474
},
"The types of '{0}' are incompatible between these types.": {
"category": "Error",
@@ -3281,10 +3293,6 @@
"category": "Error",
"code": 2804
},
"Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.": {
"category": "Error",
"code": 2805
},
"Private accessor was defined without a getter.": {
"category": "Error",
"code": 2806
@@ -3301,10 +3309,6 @@
"category": "Error",
"code": 2809
},
"Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.": {
"category": "Error",
"code": 2810
},
"Initializer for property '{0}'": {
"category": "Error",
"code": 2811
@@ -6354,7 +6358,7 @@
"category": "Message",
"code": 90012
},
"Import '{0}' from module \"{1}\"": {
"Import '{0}' from \"{1}\"": {
"category": "Message",
"code": 90013
},
@@ -6362,10 +6366,6 @@
"category": "Message",
"code": 90014
},
"Add '{0}' to existing import declaration from \"{1}\"": {
"category": "Message",
"code": 90015
},
"Declare property '{0}'": {
"category": "Message",
"code": 90016
@@ -6430,14 +6430,6 @@
"category": "Message",
"code": 90031
},
"Import default '{0}' from module \"{1}\"": {
"category": "Message",
"code": 90032
},
"Add default import '{0}' to existing import declaration from \"{1}\"": {
"category": "Message",
"code": 90033
},
"Add parameter name": {
"category": "Message",
"code": 90034
@@ -6474,6 +6466,22 @@
"category": "Message",
"code": 90054
},
"Remove 'type' from import declaration from \"{0}\"": {
"category": "Message",
"code": 90055
},
"Remove 'type' from import of '{0}' from \"{1}\"": {
"category": "Message",
"code": 90056
},
"Add import from \"{0}\"": {
"category": "Message",
"code": 90057
},
"Update import from \"{0}\"": {
"category": "Message",
"code": 90058
},
"Convert function to an ES2015 class": {
"category": "Message",
@@ -7127,6 +7135,22 @@
"category": "Message",
"code": 95169
},
"Convert named imports to default import": {
"category": "Message",
"code": 95170
},
"Delete unused '@param' tag '{0}'": {
"category": "Message",
"code": 95171
},
"Delete all unused '@param' tags": {
"category": "Message",
"code": 95172
},
"Rename '@param' tag name '{0}' to '{1}'": {
"category": "Message",
"code": 95173
},
"No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": {
"category": "Error",
-64
View File
@@ -789,70 +789,6 @@ namespace ts.moduleSpecifiers {
}
}
interface NodeModulePathParts {
readonly topLevelNodeModulesIndex: number;
readonly topLevelPackageNameIndex: number;
readonly packageRootIndex: number;
readonly fileNameIndex: number;
}
function getNodeModulePathParts(fullPath: string): NodeModulePathParts | undefined {
// If fullPath can't be valid module file within node_modules, returns undefined.
// Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js
// Returns indices: ^ ^ ^ ^
let topLevelNodeModulesIndex = 0;
let topLevelPackageNameIndex = 0;
let packageRootIndex = 0;
let fileNameIndex = 0;
const enum States {
BeforeNodeModules,
NodeModules,
Scope,
PackageContent
}
let partStart = 0;
let partEnd = 0;
let state = States.BeforeNodeModules;
while (partEnd >= 0) {
partStart = partEnd;
partEnd = fullPath.indexOf("/", partStart + 1);
switch (state) {
case States.BeforeNodeModules:
if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {
topLevelNodeModulesIndex = partStart;
topLevelPackageNameIndex = partEnd;
state = States.NodeModules;
}
break;
case States.NodeModules:
case States.Scope:
if (state === States.NodeModules && fullPath.charAt(partStart + 1) === "@") {
state = States.Scope;
}
else {
packageRootIndex = partEnd;
state = States.PackageContent;
}
break;
case States.PackageContent:
if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {
state = States.NodeModules;
}
else {
state = States.PackageContent;
}
break;
}
}
fileNameIndex = partStart;
return state > States.NodeModules ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : undefined;
}
function getPathRelativeToRootDirs(path: string, rootDirs: readonly string[], getCanonicalFileName: GetCanonicalFileName): string | undefined {
return firstDefined(rootDirs, rootDir => {
const relativePath = getRelativePathIfInDirectory(path, rootDir, getCanonicalFileName);
+2 -1
View File
@@ -7406,7 +7406,8 @@ namespace ts {
}
function parseExportSpecifier() {
return parseImportOrExportSpecifier(SyntaxKind.ExportSpecifier) as ExportSpecifier;
const hasJSDoc = hasPrecedingJSDocComment();
return withJSDoc(parseImportOrExportSpecifier(SyntaxKind.ExportSpecifier) as ExportSpecifier, hasJSDoc);
}
function parseImportSpecifier() {
+5 -5
View File
@@ -861,9 +861,9 @@ namespace ts {
Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
Diagnostics.An_export_declaration_can_only_be_used_in_a_module.code,
Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,
Diagnostics.An_export_declaration_cannot_have_modifiers.code,
Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module.code,
Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,
Diagnostics.An_import_declaration_cannot_have_modifiers.code,
Diagnostics.An_object_member_cannot_be_declared_optional.code,
Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element.code,
@@ -2102,7 +2102,7 @@ namespace ts {
const isJs = sourceFile.scriptKind === ScriptKind.JS || sourceFile.scriptKind === ScriptKind.JSX;
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
const isPlainJs = isJs && !sourceFile.checkJsDirective && options.checkJs === undefined;
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
const isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;
// By default, only type-check .ts, .tsx, Deferred, plain JS, checked JS and External
@@ -2829,14 +2829,14 @@ namespace ts {
redirectTargetsMap.add(fileFromPackageId.path, fileName);
addFileToFilesByName(dupFile, path, redirectedPath);
addFileIncludeReason(dupFile, reason);
sourceFileToPackageName.set(path, packageId.name);
sourceFileToPackageName.set(path, packageIdToPackageName(packageId));
processingOtherFiles!.push(dupFile);
return dupFile;
}
else if (file) {
// This is the first source file to have this packageId.
packageIdToSourceFile.set(packageIdKey, file);
sourceFileToPackageName.set(path, packageId.name);
sourceFileToPackageName.set(path, packageIdToPackageName(packageId));
}
}
addFileToFilesByName(file, path, redirectedPath);
+78 -20
View File
@@ -135,10 +135,13 @@ namespace ts {
const shouldTransformPrivateElementsOrClassStaticBlocks = languageVersion < ScriptTarget.ES2022;
// We need to transform `this` in a static initializer into a reference to the class
// when targeting < ES2022 since the assignment will be moved outside of the class body.
const shouldTransformThisInStaticInitializers = languageVersion < ScriptTarget.ES2022;
// We don't need to transform `super` property access when targeting ES5, ES3 because
// the es2015 transformation handles those.
const shouldTransformSuperInStaticInitializers = (languageVersion <= ScriptTarget.ES2021 || !useDefineForClassFields) && languageVersion >= ScriptTarget.ES2015;
const shouldTransformThisInStaticInitializers = languageVersion <= ScriptTarget.ES2021 || !useDefineForClassFields;
const shouldTransformSuperInStaticInitializers = shouldTransformThisInStaticInitializers && languageVersion >= ScriptTarget.ES2015;
const previousOnSubstituteNode = context.onSubstituteNode;
context.onSubstituteNode = onSubstituteNode;
@@ -422,6 +425,11 @@ namespace ts {
if (isPrivateIdentifier(node.name)) {
if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
if (isStatic(node)) {
// static fields are left as is
return visitEachChild(node, visitor, context);
}
// Initializer is elided as the field is initialized in transformConstructor.
return factory.updatePropertyDeclaration(
node,
@@ -448,6 +456,28 @@ namespace ts {
if (expr && !isSimpleInlineableExpression(expr)) {
getPendingExpressions().push(expr);
}
if (isStatic(node) && !shouldTransformPrivateElementsOrClassStaticBlocks && !useDefineForClassFields) {
const initializerStatement = transformPropertyOrClassStaticBlock(node, factory.createThis());
if (initializerStatement) {
const staticBlock = factory.createClassStaticBlockDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
factory.createBlock([initializerStatement])
);
setOriginalNode(staticBlock, node);
setCommentRange(staticBlock, node);
// Set the comment range for the statement to an empty synthetic range
// and drop synthetic comments from the statement to avoid printing them twice.
setCommentRange(initializerStatement, { pos: -1, end: -1 });
setSyntheticLeadingComments(initializerStatement, undefined);
setSyntheticTrailingComments(initializerStatement, undefined);
return staticBlock;
}
}
return undefined;
}
@@ -1006,8 +1036,6 @@ namespace ts {
enableSubstitutionForClassStaticThisOrSuperReference();
}
const staticProperties = getStaticPropertiesAndClassStaticBlock(node);
// If a class has private static fields, or a static field has a `this` or `super` reference,
// then we need to allocate a temp variable to hold on to that reference.
let pendingClassReferenceAssignment: BinaryExpression | undefined;
@@ -1047,6 +1075,7 @@ namespace ts {
// HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using
// a lexical declaration such as a LexicalDeclaration or a ClassDeclaration.
const staticProperties = getStaticPropertiesAndClassStaticBlock(node);
if (some(staticProperties)) {
addPropertyOrClassStaticBlockStatements(statements, staticProperties, factory.getInternalName(node));
}
@@ -1102,7 +1131,7 @@ namespace ts {
transformClassMembers(node, isDerivedClass)
);
const hasTransformableStatics = some(staticPropertiesOrClassStaticBlocks, p => isClassStaticBlockDeclaration(p) || !!p.initializer || (shouldTransformPrivateElementsOrClassStaticBlocks && isPrivateIdentifier(p.name)));
const hasTransformableStatics = shouldTransformPrivateElementsOrClassStaticBlocks && some(staticPropertiesOrClassStaticBlocks, p => isClassStaticBlockDeclaration(p) || !!p.initializer || isPrivateIdentifier(p.name));
if (hasTransformableStatics || some(pendingExpressions)) {
if (isDecoratedClassDeclaration) {
Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration.");
@@ -1156,6 +1185,7 @@ namespace ts {
}
function transformClassMembers(node: ClassDeclaration | ClassExpression, isDerivedClass: boolean) {
const members: ClassElement[] = [];
if (shouldTransformPrivateElementsOrClassStaticBlocks) {
// Declare private names.
for (const member of node.members) {
@@ -1169,12 +1199,26 @@ namespace ts {
}
}
const members: ClassElement[] = [];
const constructor = transformConstructor(node, isDerivedClass);
const visitedMembers = visitNodes(node.members, classElementVisitor, isClassElement);
if (constructor) {
members.push(constructor);
}
addRange(members, visitNodes(node.members, classElementVisitor, isClassElement));
if (!shouldTransformPrivateElementsOrClassStaticBlocks && some(pendingExpressions)) {
members.push(factory.createClassStaticBlockDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
factory.createBlock([
factory.createExpressionStatement(factory.inlineExpressions(pendingExpressions))
])
));
pendingExpressions = undefined;
}
addRange(members, visitedMembers);
return setTextRange(factory.createNodeArray(members), /*location*/ node.members);
}
@@ -1374,27 +1418,41 @@ namespace ts {
*/
function addPropertyOrClassStaticBlockStatements(statements: Statement[], properties: readonly (PropertyDeclaration | ClassStaticBlockDeclaration)[], receiver: LeftHandSideExpression) {
for (const property of properties) {
const expression = isClassStaticBlockDeclaration(property) ?
transformClassStaticBlockDeclaration(property) :
transformProperty(property, receiver);
if (!expression) {
if (isStatic(property) && !shouldTransformPrivateElementsOrClassStaticBlocks && !useDefineForClassFields) {
continue;
}
const statement = factory.createExpressionStatement(expression);
setSourceMapRange(statement, moveRangePastModifiers(property));
setCommentRange(statement, property);
setOriginalNode(statement, property);
// `setOriginalNode` *copies* the `emitNode` from `property`, so now both
// `statement` and `expression` have a copy of the synthesized comments.
// Drop the comments from expression to avoid printing them twice.
setSyntheticLeadingComments(expression, undefined);
setSyntheticTrailingComments(expression, undefined);
const statement = transformPropertyOrClassStaticBlock(property, receiver);
if (!statement) {
continue;
}
statements.push(statement);
}
}
function transformPropertyOrClassStaticBlock(property: PropertyDeclaration | ClassStaticBlockDeclaration, receiver: LeftHandSideExpression) {
const expression = isClassStaticBlockDeclaration(property) ?
transformClassStaticBlockDeclaration(property) :
transformProperty(property, receiver);
if (!expression) {
return undefined;
}
const statement = factory.createExpressionStatement(expression);
setSourceMapRange(statement, moveRangePastModifiers(property));
setCommentRange(statement, property);
setOriginalNode(statement, property);
// `setOriginalNode` *copies* the `emitNode` from `property`, so now both
// `statement` and `expression` have a copy of the synthesized comments.
// Drop the comments from expression to avoid printing them twice.
setSyntheticLeadingComments(expression, undefined);
setSyntheticTrailingComments(expression, undefined);
return statement;
}
/**
* Generates assignment expressions for property initializers.
*
+15 -7
View File
@@ -2954,9 +2954,11 @@ namespace ts {
// variables declared in the loop initializer that will be changed inside the loop
const loopOutParameters: LoopOutParameter[] = [];
if (loopInitializer && (getCombinedNodeFlags(loopInitializer) & NodeFlags.BlockScoped)) {
const hasCapturedBindingsInForInitializer = shouldConvertInitializerOfForStatement(node);
const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) ||
shouldConvertConditionOfForStatement(node) ||
shouldConvertIncrementorOfForStatement(node);
for (const decl of loopInitializer.declarations) {
processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForInitializer);
processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead);
}
}
@@ -3434,26 +3436,32 @@ namespace ts {
});
}
function processLoopVariableDeclaration(container: IterationStatement, decl: VariableDeclaration | BindingElement, loopParameters: ParameterDeclaration[], loopOutParameters: LoopOutParameter[], hasCapturedBindingsInForInitializer: boolean) {
function processLoopVariableDeclaration(container: IterationStatement, decl: VariableDeclaration | BindingElement, loopParameters: ParameterDeclaration[], loopOutParameters: LoopOutParameter[], hasCapturedBindingsInForHead: boolean) {
const name = decl.name;
if (isBindingPattern(name)) {
for (const element of name.elements) {
if (!isOmittedExpression(element)) {
processLoopVariableDeclaration(container, element, loopParameters, loopOutParameters, hasCapturedBindingsInForInitializer);
processLoopVariableDeclaration(container, element, loopParameters, loopOutParameters, hasCapturedBindingsInForHead);
}
}
}
else {
loopParameters.push(factory.createParameterDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name));
const checkFlags = resolver.getNodeCheckFlags(decl);
if (checkFlags & NodeCheckFlags.NeedsLoopOutParameter || hasCapturedBindingsInForInitializer) {
if (checkFlags & NodeCheckFlags.NeedsLoopOutParameter || hasCapturedBindingsInForHead) {
const outParamName = factory.createUniqueName("out_" + idText(name));
let flags: LoopOutParameterFlags = 0;
if (checkFlags & NodeCheckFlags.NeedsLoopOutParameter) {
flags |= LoopOutParameterFlags.Body;
}
if (isForStatement(container) && container.initializer && resolver.isBindingCapturedByNode(container.initializer, decl)) {
flags |= LoopOutParameterFlags.Initializer;
if (isForStatement(container)) {
if (container.initializer && resolver.isBindingCapturedByNode(container.initializer, decl)) {
flags |= LoopOutParameterFlags.Initializer;
}
if (container.condition && resolver.isBindingCapturedByNode(container.condition, decl) ||
container.incrementor && resolver.isBindingCapturedByNode(container.incrementor, decl)) {
flags |= LoopOutParameterFlags.Body;
}
}
loopOutParameters.push({ flags, originalName: name, outParamName });
}
+134 -19
View File
@@ -59,6 +59,7 @@ namespace ts {
let exportedVariableStatement = false;
let enabledSubstitutions: ESNextSubstitutionFlags;
let enclosingFunctionFlags: FunctionFlags;
let parametersWithPrecedingObjectRestOrSpread: Set<ParameterDeclaration> | undefined;
let enclosingSuperContainerFlags: NodeCheckFlags = 0;
let hierarchyFacts: HierarchyFacts = 0;
@@ -721,6 +722,7 @@ namespace ts {
),
EmitFlags.NoTokenTrailingSourceMaps
);
setOriginalNode(forStatement, node);
return factory.createTryStatement(
factory.createBlock([
@@ -785,7 +787,24 @@ namespace ts {
);
}
function parameterVisitor(node: Node) {
Debug.assertNode(node, isParameter);
return visitParameter(node);
}
function visitParameter(node: ParameterDeclaration): ParameterDeclaration {
if (parametersWithPrecedingObjectRestOrSpread?.has(node)) {
return factory.updateParameterDeclaration(
node,
/*decorators*/ undefined,
/*modifiers*/ undefined,
node.dotDotDotToken,
isBindingPattern(node.name) ? factory.getGeneratedNameForNode(node) : node.name,
/*questionToken*/ undefined,
/*type*/ undefined,
/*initializer*/ undefined
);
}
if (node.transformFlags & TransformFlags.ContainsObjectRestOrSpread) {
// Binding patterns are converted into a generated name and are
// evaluated inside the function body.
@@ -803,54 +822,78 @@ namespace ts {
return visitEachChild(node, visitor, context);
}
function collectParametersWithPrecedingObjectRestOrSpread(node: SignatureDeclaration) {
let parameters: Set<ParameterDeclaration> | undefined;
for (const parameter of node.parameters) {
if (parameters) {
parameters.add(parameter);
}
else if (parameter.transformFlags & TransformFlags.ContainsObjectRestOrSpread) {
parameters = new Set();
}
}
return parameters;
}
function visitConstructorDeclaration(node: ConstructorDeclaration) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
enclosingFunctionFlags = FunctionFlags.Normal;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateConstructorDeclaration(
node,
/*decorators*/ undefined,
node.modifiers,
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitGetAccessorDeclaration(node: GetAccessorDeclaration) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
enclosingFunctionFlags = FunctionFlags.Normal;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateGetAccessorDeclaration(
node,
/*decorators*/ undefined,
node.modifiers,
visitNode(node.name, visitor, isPropertyName),
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
/*type*/ undefined,
transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitSetAccessorDeclaration(node: SetAccessorDeclaration) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
enclosingFunctionFlags = FunctionFlags.Normal;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateSetAccessorDeclaration(
node,
/*decorators*/ undefined,
node.modifiers,
visitNode(node.name, visitor, isPropertyName),
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitMethodDeclaration(node: MethodDeclaration) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateMethodDeclaration(
node,
/*decorators*/ undefined,
@@ -863,19 +906,22 @@ namespace ts {
visitNode(node.name, visitor, isPropertyName),
visitNode<Token<SyntaxKind.QuestionToken>>(/*questionToken*/ undefined, visitor, isToken),
/*typeParameters*/ undefined,
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
/*type*/ undefined,
enclosingFunctionFlags & FunctionFlags.Async && enclosingFunctionFlags & FunctionFlags.Generator
? transformAsyncGeneratorFunctionBody(node)
: transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitFunctionDeclaration(node: FunctionDeclaration) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateFunctionDeclaration(
node,
/*decorators*/ undefined,
@@ -887,35 +933,41 @@ namespace ts {
: node.asteriskToken,
node.name,
/*typeParameters*/ undefined,
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
/*type*/ undefined,
enclosingFunctionFlags & FunctionFlags.Async && enclosingFunctionFlags & FunctionFlags.Generator
? transformAsyncGeneratorFunctionBody(node)
: transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitArrowFunction(node: ArrowFunction) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateArrowFunction(
node,
node.modifiers,
/*typeParameters*/ undefined,
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
/*type*/ undefined,
node.equalsGreaterThanToken,
transformFunctionBody(node),
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
function visitFunctionExpression(node: FunctionExpression) {
const savedEnclosingFunctionFlags = enclosingFunctionFlags;
const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
enclosingFunctionFlags = getFunctionFlags(node);
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
const updated = factory.updateFunctionExpression(
node,
enclosingFunctionFlags & FunctionFlags.Generator
@@ -926,13 +978,14 @@ namespace ts {
: node.asteriskToken,
node.name,
/*typeParameters*/ undefined,
visitParameterList(node.parameters, visitor, context),
visitParameterList(node.parameters, parameterVisitor, context),
/*type*/ undefined,
enclosingFunctionFlags & FunctionFlags.Async && enclosingFunctionFlags & FunctionFlags.Generator
? transformAsyncGeneratorFunctionBody(node)
: transformFunctionBody(node)
);
enclosingFunctionFlags = savedEnclosingFunctionFlags;
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
return updated;
}
@@ -1007,6 +1060,7 @@ namespace ts {
statementOffset = factory.copyPrologue(body.statements, statements, /*ensureUseStrict*/ false, visitor);
}
addRange(statements, appendObjectRestAssignmentsIfNeeded(/*statements*/ undefined, node));
const leadingStatements = endLexicalEnvironment();
if (statementOffset > 0 || some(statements) || some(leadingStatements)) {
const block = factory.converters.convertToFunctionBlock(body, /*multiLine*/ true);
@@ -1018,25 +1072,86 @@ namespace ts {
}
function appendObjectRestAssignmentsIfNeeded(statements: Statement[] | undefined, node: FunctionLikeDeclaration): Statement[] | undefined {
let containsPrecedingObjectRestOrSpread = false;
for (const parameter of node.parameters) {
if (parameter.transformFlags & TransformFlags.ContainsObjectRestOrSpread) {
const temp = factory.getGeneratedNameForNode(parameter);
if (containsPrecedingObjectRestOrSpread) {
if (isBindingPattern(parameter.name)) {
// In cases where a binding pattern is simply '[]' or '{}',
// we usually don't want to emit a var declaration; however, in the presence
// of an initializer, we must emit that expression to preserve side effects.
//
// NOTE: see `insertDefaultValueAssignmentForBindingPattern` in es2015.ts
if (parameter.name.elements.length > 0) {
const declarations = flattenDestructuringBinding(
parameter,
visitor,
context,
FlattenLevel.All,
factory.getGeneratedNameForNode(parameter));
if (some(declarations)) {
const declarationList = factory.createVariableDeclarationList(declarations);
const statement = factory.createVariableStatement(/*modifiers*/ undefined, declarationList);
setEmitFlags(statement, EmitFlags.CustomPrologue);
statements = append(statements, statement);
}
}
else if (parameter.initializer) {
const name = factory.getGeneratedNameForNode(parameter);
const initializer = visitNode(parameter.initializer, visitor, isExpression);
const assignment = factory.createAssignment(name, initializer);
const statement = factory.createExpressionStatement(assignment);
setEmitFlags(statement, EmitFlags.CustomPrologue);
statements = append(statements, statement);
}
}
else if (parameter.initializer) {
// Converts a parameter initializer into a function body statement, i.e.:
//
// function f(x = 1) { }
//
// becomes
//
// function f(x) {
// if (typeof x === "undefined") { x = 1; }
// }
const name = factory.cloneNode(parameter.name);
setTextRange(name, parameter.name);
setEmitFlags(name, EmitFlags.NoSourceMap);
const initializer = visitNode(parameter.initializer, visitor, isExpression);
addEmitFlags(initializer, EmitFlags.NoSourceMap | EmitFlags.NoComments);
const assignment = factory.createAssignment(name, initializer);
setTextRange(assignment, parameter);
setEmitFlags(assignment, EmitFlags.NoComments);
const block = factory.createBlock([factory.createExpressionStatement(assignment)]);
setTextRange(block, parameter);
setEmitFlags(block, EmitFlags.SingleLine | EmitFlags.NoTrailingSourceMap | EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments);
const typeCheck = factory.createTypeCheck(factory.cloneNode(parameter.name), "undefined");
const statement = factory.createIfStatement(typeCheck, block);
startOnNewLine(statement);
setTextRange(statement, parameter);
setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoTrailingSourceMap | EmitFlags.CustomPrologue | EmitFlags.NoComments);
statements = append(statements, statement);
}
}
else if (parameter.transformFlags & TransformFlags.ContainsObjectRestOrSpread) {
containsPrecedingObjectRestOrSpread = true;
const declarations = flattenDestructuringBinding(
parameter,
visitor,
context,
FlattenLevel.ObjectRest,
temp,
factory.getGeneratedNameForNode(parameter),
/*doNotRecordTempVariablesInLine*/ false,
/*skipInitializer*/ true,
);
if (some(declarations)) {
const statement = factory.createVariableStatement(
/*modifiers*/ undefined,
factory.createVariableDeclarationList(
declarations
)
);
const declarationList = factory.createVariableDeclarationList(declarations);
const statement = factory.createVariableStatement(/*modifiers*/ undefined, declarationList);
setEmitFlags(statement, EmitFlags.CustomPrologue);
statements = append(statements, statement);
}
+5 -3
View File
@@ -929,6 +929,7 @@ namespace ts {
| JSDocFunctionType
| ExportDeclaration
| NamedTupleMember
| ExportSpecifier
| EndOfFileToken
;
@@ -3117,7 +3118,7 @@ namespace ts {
readonly isTypeOnly: boolean;
}
export interface ExportSpecifier extends NamedDeclaration {
export interface ExportSpecifier extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.ExportSpecifier;
readonly parent: NamedExports;
readonly isTypeOnly: boolean;
@@ -3141,8 +3142,8 @@ namespace ts {
| ImportClause & { readonly isTypeOnly: true, readonly name: Identifier }
| ImportEqualsDeclaration & { readonly isTypeOnly: true }
| NamespaceImport & { readonly parent: ImportClause & { readonly isTypeOnly: true } }
| ImportSpecifier & { readonly parent: NamedImports & { readonly parent: ImportClause & { readonly isTypeOnly: true } } }
| ExportSpecifier & { readonly parent: NamedExports & { readonly parent: ExportDeclaration & { readonly isTypeOnly: true } } }
| ImportSpecifier & ({ readonly isTypeOnly: true } | { readonly parent: NamedImports & { readonly parent: ImportClause & { readonly isTypeOnly: true } } })
| ExportSpecifier & ({ readonly isTypeOnly: true } | { readonly parent: NamedExports & { readonly parent: ExportDeclaration & { readonly isTypeOnly: true } } })
;
/**
@@ -4951,6 +4952,7 @@ namespace ts {
extendedContainersByFile?: ESMap<NodeId, Symbol[]>; // Containers (other than the parent) which this symbol is aliased in
variances?: VarianceFlags[]; // Alias symbol type argument variance cache
deferralConstituents?: Type[]; // Calculated list of constituents for a deferred type
deferralWriteConstituents?: Type[]; // Constituents of a deferred `writeType`
deferralParent?: Type; // Source union/intersection of a deferred type
cjsExportMerged?: Symbol; // Version of the symbol with all non export= exports merged with the export= target
typeOnlyDeclaration?: TypeOnlyAliasDeclaration | false; // First resolved alias declaration that makes the symbol only usable in type constructs
+90 -5
View File
@@ -20,6 +20,10 @@ namespace ts {
return undefined;
}
export function getDeclarationsOfKind<T extends Declaration>(symbol: Symbol, kind: T["kind"]): T[] {
return filter(symbol.declarations || emptyArray, d => d.kind === kind) as T[];
}
export function createSymbolTable(symbols?: readonly Symbol[]): SymbolTable {
const result = new Map<__String, Symbol>();
if (symbols) {
@@ -192,9 +196,12 @@ namespace ts {
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
}
export function packageIdToString({ name, subModuleName, version }: PackageId): string {
const fullName = subModuleName ? `${name}/${subModuleName}` : name;
return `${fullName}@${version}`;
export function packageIdToPackageName({ name, subModuleName }: PackageId): string {
return subModuleName ? `${name}/${subModuleName}` : name;
}
export function packageIdToString(packageId: PackageId): string {
return `${packageIdToPackageName(packageId)}@${packageId.version}`;
}
export function typeDirectiveIsEqualTo(oldResolution: ResolvedTypeReferenceDirective, newResolution: ResolvedTypeReferenceDirective): boolean {
@@ -264,6 +271,10 @@ namespace ts {
return getSourceFileOfNode(module.valueDeclaration || getNonAugmentationDeclaration(module));
}
export function isPlainJsFile(file: SourceFile | undefined, checkJs: boolean | undefined): boolean {
return !!file && (file.scriptKind === ScriptKind.JS || file.scriptKind === ScriptKind.JSX) && !file.checkJsDirective && checkJs === undefined;
}
export function isStatementWithLocals(node: Node) {
switch (node.kind) {
case SyntaxKind.Block:
@@ -1068,6 +1079,15 @@ namespace ts {
};
}
export function createDiagnosticMessageChainFromDiagnostic(diagnostic: DiagnosticRelatedInformation): DiagnosticMessageChain {
return typeof diagnostic.messageText === "string" ? {
code: diagnostic.code,
category: diagnostic.category,
messageText: diagnostic.messageText,
next: (diagnostic as DiagnosticMessageChain).next,
} : diagnostic.messageText;
}
export function createDiagnosticForRange(sourceFile: SourceFile, range: TextRange, message: DiagnosticMessage): DiagnosticWithLocation {
return {
file: sourceFile,
@@ -1244,7 +1264,8 @@ namespace ts {
node.kind === SyntaxKind.FunctionExpression ||
node.kind === SyntaxKind.ArrowFunction ||
node.kind === SyntaxKind.ParenthesizedExpression ||
node.kind === SyntaxKind.VariableDeclaration) ?
node.kind === SyntaxKind.VariableDeclaration ||
node.kind === SyntaxKind.ExportSpecifier) ?
concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) :
getLeadingCommentRanges(text, node.pos);
// True if the comment starts with '/**' but not if it is '/**/'
@@ -2493,7 +2514,7 @@ namespace ts {
return expr.right;
}
export function isPrototypePropertyAssignment(node: Node): boolean {
export function isPrototypePropertyAssignment(node: Node): node is BinaryExpression {
return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === AssignmentDeclarationKind.PrototypeProperty;
}
@@ -7488,4 +7509,68 @@ namespace ts {
export function isThisTypeParameter(type: Type): boolean {
return !!(type.flags & TypeFlags.TypeParameter && (type as TypeParameter).isThisType);
}
export interface NodeModulePathParts {
readonly topLevelNodeModulesIndex: number;
readonly topLevelPackageNameIndex: number;
readonly packageRootIndex: number;
readonly fileNameIndex: number;
}
export function getNodeModulePathParts(fullPath: string): NodeModulePathParts | undefined {
// If fullPath can't be valid module file within node_modules, returns undefined.
// Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js
// Returns indices: ^ ^ ^ ^
let topLevelNodeModulesIndex = 0;
let topLevelPackageNameIndex = 0;
let packageRootIndex = 0;
let fileNameIndex = 0;
const enum States {
BeforeNodeModules,
NodeModules,
Scope,
PackageContent
}
let partStart = 0;
let partEnd = 0;
let state = States.BeforeNodeModules;
while (partEnd >= 0) {
partStart = partEnd;
partEnd = fullPath.indexOf("/", partStart + 1);
switch (state) {
case States.BeforeNodeModules:
if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {
topLevelNodeModulesIndex = partStart;
topLevelPackageNameIndex = partEnd;
state = States.NodeModules;
}
break;
case States.NodeModules:
case States.Scope:
if (state === States.NodeModules && fullPath.charAt(partStart + 1) === "@") {
state = States.Scope;
}
else {
packageRootIndex = partEnd;
state = States.PackageContent;
}
break;
case States.PackageContent:
if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {
state = States.NodeModules;
}
else {
state = States.PackageContent;
}
break;
}
}
fileNameIndex = partStart;
return state > States.NodeModules ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : undefined;
}
}
+10 -3
View File
@@ -905,9 +905,16 @@ namespace ts {
/** Gets the text of a jsdoc comment, flattening links to their text. */
export function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>) {
return typeof comment === "string" ? comment
: comment?.map(c =>
// TODO: Other kinds here
c.kind === SyntaxKind.JSDocText ? c.text : `{@link ${c.name ? entityNameToString(c.name) + " " : ""}${c.text}}`).join("");
: comment?.map(c => c.kind === SyntaxKind.JSDocText ? c.text : formatJSDocLink(c)).join("");
}
function formatJSDocLink(link: JSDocLink | JSDocLinkCode | JSDocLinkPlain) {
const kind = link.kind === SyntaxKind.JSDocLink ? "link"
: link.kind === SyntaxKind.JSDocLinkCode ? "linkcode"
: "linkplain";
const name = link.name ? entityNameToString(link.name) : "";
const space = link.name && link.text.startsWith("://") ? "" : " ";
return `{@${kind} ${name}${space}${link.text}}`;
}
/**
+22 -8
View File
@@ -1397,11 +1397,11 @@ namespace FourSlash {
}));
}
public verifyQuickInfoAt(markerName: string | Range, expectedText: string, expectedDocumentation?: string) {
public verifyQuickInfoAt(markerName: string | Range, expectedText: string, expectedDocumentation?: string, expectedTags?: {name: string; text: string;}[]) {
if (typeof markerName === "string") this.goToMarker(markerName);
else this.goToRangeStart(markerName);
this.verifyQuickInfoString(expectedText, expectedDocumentation);
this.verifyQuickInfoString(expectedText, expectedDocumentation, expectedTags);
}
public verifyQuickInfos(namesAndTexts: { [name: string]: string | [string, string] }) {
@@ -1420,16 +1420,29 @@ namespace FourSlash {
}
}
public verifyQuickInfoString(expectedText: string, expectedDocumentation?: string) {
public verifyQuickInfoString(expectedText: string, expectedDocumentation?: string, expectedTags?: { name: string; text: string; }[]) {
if (expectedDocumentation === "") {
throw new Error("Use 'undefined' instead");
throw new Error("Use 'undefined' instead of empty string for `expectedDocumentation`");
}
const actualQuickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
const actualQuickInfoText = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.displayParts) : "";
const actualQuickInfoDocumentation = actualQuickInfo ? ts.displayPartsToString(actualQuickInfo.documentation) : "";
const actualQuickInfoText = ts.displayPartsToString(actualQuickInfo?.displayParts);
const actualQuickInfoDocumentation = ts.displayPartsToString(actualQuickInfo?.documentation);
const actualQuickInfoTags = actualQuickInfo?.tags?.map(tag => ({ name: tag.name, text: ts.displayPartsToString(tag.text) }));
assert.equal(actualQuickInfoText, expectedText, this.messageAtLastKnownMarker("quick info text"));
assert.equal(actualQuickInfoDocumentation, expectedDocumentation || "", this.assertionMessageAtLastKnownMarker("quick info doc"));
if (!expectedTags) {
// Skip if `expectedTags` is not given
}
else if (!actualQuickInfoTags) {
assert.equal(actualQuickInfoTags, expectedTags, this.messageAtLastKnownMarker("QuickInfo tags"));
}
else {
ts.zipWith(expectedTags, actualQuickInfoTags, (expectedTag, actualTag) => {
assert.equal(expectedTag.name, actualTag.name);
assert.equal(expectedTag.text, actualTag.text, this.messageAtLastKnownMarker("QuickInfo tag " + actualTag.name));
});
}
}
public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: TextSpan,
@@ -3133,11 +3146,12 @@ namespace FourSlash {
});
}
public verifyImportFixModuleSpecifiers(markerName: string, moduleSpecifiers: string[]) {
public verifyImportFixModuleSpecifiers(markerName: string, moduleSpecifiers: string[], preferences?: ts.UserPreferences) {
const marker = this.getMarkerByName(markerName);
const codeFixes = this.getCodeFixes(marker.fileName, ts.Diagnostics.Cannot_find_name_0.code, {
includeCompletionsForModuleExports: true,
includeCompletionsWithInsertText: true
includeCompletionsWithInsertText: true,
...preferences,
}, marker.position).filter(f => f.fixName === ts.codefix.importFixName);
const actualModuleSpecifiers = ts.mapDefined(codeFixes, fix => {
+6 -6
View File
@@ -259,12 +259,12 @@ namespace FourSlashInterface {
this.state.verifyInlayHints(expected, span, preference);
}
public quickInfoIs(expectedText: string, expectedDocumentation?: string) {
this.state.verifyQuickInfoString(expectedText, expectedDocumentation);
public quickInfoIs(expectedText: string, expectedDocumentation?: string, expectedTags?: { name: string; text: string; }[]) {
this.state.verifyQuickInfoString(expectedText, expectedDocumentation, expectedTags);
}
public quickInfoAt(markerName: string | FourSlash.Range, expectedText: string, expectedDocumentation?: string) {
this.state.verifyQuickInfoAt(markerName, expectedText, expectedDocumentation);
public quickInfoAt(markerName: string | FourSlash.Range, expectedText: string, expectedDocumentation?: string, expectedTags?: { name: string; text: string; }[]) {
this.state.verifyQuickInfoAt(markerName, expectedText, expectedDocumentation, expectedTags);
}
public quickInfos(namesAndTexts: { [name: string]: string }) {
@@ -478,8 +478,8 @@ namespace FourSlashInterface {
this.state.verifyImportFixAtPosition(expectedTextArray, errorCode, preferences);
}
public importFixModuleSpecifiers(marker: string, moduleSpecifiers: string[]) {
this.state.verifyImportFixModuleSpecifiers(marker, moduleSpecifiers);
public importFixModuleSpecifiers(marker: string, moduleSpecifiers: string[], preferences?: ts.UserPreferences) {
this.state.verifyImportFixModuleSpecifiers(marker, moduleSpecifiers, preferences);
}
public navigationBar(json: any, options?: { checkSpans?: boolean }) {
+72
View File
@@ -683,6 +683,24 @@ interface KeyframeEffectOptions extends EffectTiming {
pseudoElement?: string | null;
}
interface LockInfo {
clientId?: string;
mode?: LockMode;
name?: string;
}
interface LockManagerSnapshot {
held?: LockInfo[];
pending?: LockInfo[];
}
interface LockOptions {
ifAvailable?: boolean;
mode?: LockMode;
signal?: AbortSignal;
steal?: boolean;
}
interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
configuration?: MediaDecodingConfiguration;
}
@@ -2946,6 +2964,7 @@ interface CSSStyleDeclaration {
scrollSnapAlign: string;
scrollSnapStop: string;
scrollSnapType: string;
scrollbarGutter: string;
shapeImageThreshold: string;
shapeMargin: string;
shapeOutside: string;
@@ -3243,6 +3262,20 @@ declare var CacheStorage: {
new(): CacheStorage;
};
interface CanvasCaptureMediaStreamTrack extends MediaStreamTrack {
readonly canvas: HTMLCanvasElement;
requestFrame(): void;
addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
declare var CanvasCaptureMediaStreamTrack: {
prototype: CanvasCaptureMediaStreamTrack;
new(): CanvasCaptureMediaStreamTrack;
};
interface CanvasCompositing {
globalAlpha: number;
globalCompositeOperation: GlobalCompositeOperation;
@@ -5090,6 +5123,7 @@ declare var FileSystemDirectoryEntry: {
/** Available only in secure contexts. */
interface FileSystemDirectoryHandle extends FileSystemHandle {
readonly kind: "directory";
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
@@ -5135,6 +5169,7 @@ declare var FileSystemFileEntry: {
/** Available only in secure contexts. */
interface FileSystemFileHandle extends FileSystemHandle {
readonly kind: "file";
getFile(): Promise<File>;
}
@@ -5456,6 +5491,7 @@ interface GlobalEventHandlersEventMap {
"select": Event;
"selectionchange": Event;
"selectstart": Event;
"slotchange": Event;
"stalled": Event;
"submit": SubmitEvent;
"suspend": Event;
@@ -5690,6 +5726,7 @@ interface GlobalEventHandlers {
* @param ev The event.
*/
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
/**
* Occurs when the seek operation ends.
* @param ev The event.
@@ -5707,6 +5744,7 @@ interface GlobalEventHandlers {
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/**
* Occurs when the download has stopped.
* @param ev The event.
@@ -8896,6 +8934,29 @@ declare var Location: {
new(): Location;
};
/** Available only in secure contexts. */
interface Lock {
readonly mode: LockMode;
readonly name: string;
}
declare var Lock: {
prototype: Lock;
new(): Lock;
};
/** Available only in secure contexts. */
interface LockManager {
query(): Promise<LockManagerSnapshot>;
request(name: string, callback: LockGrantedCallback): Promise<any>;
request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
}
declare var LockManager: {
prototype: LockManager;
new(): LockManager;
};
interface MathMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
}
@@ -10222,6 +10283,7 @@ interface PerformanceEventTiming extends PerformanceEntry {
readonly processingEnd: DOMHighResTimeStamp;
readonly processingStart: DOMHighResTimeStamp;
readonly target: Node | null;
toJSON(): any;
}
declare var PerformanceEventTiming: {
@@ -10944,6 +11006,7 @@ interface RTCRtpTransceiver {
readonly mid: string | null;
readonly receiver: RTCRtpReceiver;
readonly sender: RTCRtpSender;
setCodecPreferences(codecs: RTCRtpCodecCapability[]): void;
stop(): void;
}
@@ -11158,6 +11221,7 @@ interface ResizeObserverEntry {
readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly contentRect: DOMRectReadOnly;
readonly devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly target: Element;
}
@@ -13127,6 +13191,7 @@ interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
readonly host: Element;
readonly mode: ShadowRootMode;
onslotchange: ((this: ShadowRoot, ev: Event) => any) | null;
readonly slotAssignment: SlotAssignmentMode;
/** Throws a "NotSupportedError" DOMException if context object is a shadow root. */
addEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -16915,6 +16980,10 @@ interface IntersectionObserverCallback {
(entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface LockGrantedCallback {
(lock: Lock | null): any;
}
interface MediaSessionActionHandler {
(details: MediaSessionActionDetails): void;
}
@@ -17543,6 +17612,7 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null;
* @param ev The event.
*/
declare var onscroll: ((this: Window, ev: Event) => any) | null;
declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null;
/**
* Occurs when the seek operation ends.
* @param ev The event.
@@ -17560,6 +17630,7 @@ declare var onseeking: ((this: Window, ev: Event) => any) | null;
declare var onselect: ((this: Window, ev: Event) => any) | null;
declare var onselectionchange: ((this: Window, ev: Event) => any) | null;
declare var onselectstart: ((this: Window, ev: Event) => any) | null;
declare var onslotchange: ((this: Window, ev: Event) => any) | null;
/**
* Occurs when the download has stopped.
* @param ev The event.
@@ -17771,6 +17842,7 @@ type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
type KeyType = "private" | "public" | "secret";
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
type LineAlignSetting = "center" | "end" | "start";
type LockMode = "exclusive" | "shared";
type MediaDecodingType = "file" | "media-source" | "webrtc";
type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
type MediaEncodingType = "record" | "webrtc";
+4
View File
@@ -168,6 +168,10 @@ interface PluginArray {
[Symbol.iterator](): IterableIterator<Plugin>;
}
interface RTCRtpTransceiver {
setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
}
interface RTCStatsReport extends ReadonlyMap<string, any> {
}
+49 -1
View File
@@ -302,6 +302,24 @@ interface KeyAlgorithm {
name: string;
}
interface LockInfo {
clientId?: string;
mode?: LockMode;
name?: string;
}
interface LockManagerSnapshot {
held?: LockInfo[];
pending?: LockInfo[];
}
interface LockOptions {
ifAvailable?: boolean;
mode?: LockMode;
signal?: AbortSignal;
steal?: boolean;
}
interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
configuration?: MediaDecodingConfiguration;
}
@@ -683,7 +701,7 @@ interface AbortSignal extends EventTarget {
declare var AbortSignal: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
// abort(): AbortSignal; - To be re-added in the future
};
interface AbstractWorkerEventMap {
@@ -1516,6 +1534,7 @@ declare var FileReaderSync: {
/** Available only in secure contexts. */
interface FileSystemDirectoryHandle extends FileSystemHandle {
readonly kind: "directory";
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
@@ -1529,6 +1548,7 @@ declare var FileSystemDirectoryHandle: {
/** Available only in secure contexts. */
interface FileSystemFileHandle extends FileSystemHandle {
readonly kind: "file";
getFile(): Promise<File>;
}
@@ -2093,6 +2113,29 @@ interface KHR_parallel_shader_compile {
readonly COMPLETION_STATUS_KHR: GLenum;
}
/** Available only in secure contexts. */
interface Lock {
readonly mode: LockMode;
readonly name: string;
}
declare var Lock: {
prototype: Lock;
new(): Lock;
};
/** Available only in secure contexts. */
interface LockManager {
query(): Promise<LockManagerSnapshot>;
request(name: string, callback: LockGrantedCallback): Promise<any>;
request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
}
declare var LockManager: {
prototype: LockManager;
new(): LockManager;
};
interface MediaCapabilities {
decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -5577,6 +5620,10 @@ interface FrameRequestCallback {
(time: DOMHighResTimeStamp): void;
}
interface LockGrantedCallback {
(lock: Lock | null): any;
}
interface OnErrorEventHandlerNonNull {
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
}
@@ -5750,6 +5797,7 @@ type ImageOrientation = "flipY" | "none";
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
type KeyType = "private" | "public" | "secret";
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
type LockMode = "exclusive" | "shared";
type MediaDecodingType = "file" | "media-source" | "webrtc";
type MediaEncodingType = "record" | "webrtc";
type NotificationDirection = "auto" | "ltr" | "rtl";
@@ -855,15 +855,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当类包含初始化属性、参数属性或专用标识符时,"super" 调用必须是构造函数中的第一个语句。]]></Val>
<Val><![CDATA[“super” 调用必须是包含初始化属性、参数属性或专用标识符的派生类的构造函数中的根级语句。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当派生类包含初始化属性、参数属性或专用标识符时,“super” 调用必须是构造函数中用来引用 “super” 或 “this” 的第一个语句。]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1038,18 +1044,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[将“{0}”从“{1}”添加到现有导入声明]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1221,15 +1215,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[将默认导入 "{0}" 从 "{1}" 添加到现有导入声明。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1257,6 +1242,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从“{0}”添加导入]]></Val>
</Tgt>
</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>
@@ -2121,11 +2115,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[严格模式下,对象文不能包含多个具有相同名称的属性。]]></Val>
<Val><![CDATA[对象文不能具有多个名称相同的属性。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2916,6 +2910,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[找不到名称“{0}”。你是否要在异步函数中写入此内容?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3609,6 +3612,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[值“{1}”的编译器选项“{0}”不稳定。使用夜间 TypeScript 消除此错误。请尝试使用 “npm install -D typescript@next” 进行更新。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4029,6 +4041,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[将命名导入转换为默认导入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5241,11 +5262,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有在 "--module" 选项设置为 "esnext" 时,动态导入才支持第二个参数。]]></Val>
<Val><![CDATA[只有当 “--module 选项设置为 esnext” 或 “nodenext” 时,动态导入才支持第二个参数。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5766,6 +5787,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[错误文件]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6543,6 +6573,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在 {1} 个文件中找到 {0} 个错误。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在同一文件中找到 {0} 个错误,起始位置为: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6561,6 +6609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在 {1} 中找到 1 个错误]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7056,23 +7113,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' 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[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有在 "--module" 选项设置为 "esnext" 时,才支持导入断言。]]></Val>
<Val><![CDATA[导入断言值必须为字符串字面量表达式。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[不允许在转译到 commonjs “require” 调用的语句导入断言。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[仅在将 “--module” 选项设置为 “esnext” 或 “nodenext” 时,才支持导入断言。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7125,15 +7197,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从模块“{1}”导入默认的“{0}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7308,6 +7371,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[包含由“{0}”引用的类型的导入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10233,15 +10305,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当 “target” 为 “esnext” 且 “useDefineForClassFields” 为 ”false” 时,属性“{0}”不能用在同一类静态属性的初始化表达式中。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10557,6 +10620,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。请考虑将扩展名添加到导入路径中。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。你是否指的是“{0}”?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10683,6 +10764,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从“{0}”中删除导入声明中的“type”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从“{1}”中删除“{0}”导入中的“type”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12093,15 +12192,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[若未使用 "esnext" 的 "--target" 指定 "--useDefineForClassFields" 标志,则具有专用名称的静态字段不能有初始值设定项。请考虑添加 "--useDefineForClassFields" 标志。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14607,6 +14697,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从“{0}”更新导入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15681,6 +15780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[应为 “catch” 或 “finally”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -855,15 +855,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當類別包含初始化屬性、參數屬性或私人識別碼時,'super' 呼叫必須為建構函式中的第一個陳述式。]]></Val>
<Val><![CDATA['super' 呼叫必須是衍生類別 (包含初始化屬性、參數屬性或私人識別碼) 建構函式內的根等級陳述式。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當衍生類別包含已初始化的屬性、參數屬性或私人識別碼時,'super' 呼叫必須為建構函式中第一個參照 'super' 或 'this' 的陳述式。]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1038,18 +1044,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{1}" 將 '{0}' 新增至現有的匯入宣告]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1221,15 +1215,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{1}" 將預設匯入 '{0}' 新增至現有的匯入宣告]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1257,6 +1242,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{0}" 新增匯入]]></Val>
</Tgt>
</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>
@@ -2121,11 +2115,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在 strict 模式中,物件常值不有多個同名的屬性。]]></Val>
<Val><![CDATA[物件常值不有多個同名的屬性。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2916,6 +2910,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[找不到名稱 '{0}'。您是否想要在非同步函數中寫入此專案?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3609,6 +3612,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{1}' 值的編譯器選項 '{0}'不穩定。使用夜間 TypeScript 將此錯誤設為靜音。請嘗試使用 'npm install -D typescript@next' 更新。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4029,6 +4041,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[將具名匯入轉換為預設匯入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5241,9 +5262,9 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當 '--module' 選項設定為 'esnext' 時,動態匯入只支援第二個引數。]]></Val>
</Tgt>
@@ -5766,6 +5787,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[錯誤檔案]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6543,6 +6573,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在 {1} 檔案中發現 {0} 個錯誤。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在同一個檔案中發現 {0} 個錯誤,開始位置: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6561,6 +6609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在 {1} 找到 1 個錯誤]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7056,21 +7113,36 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' 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[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[匯入判斷提示值必須是字串常值運算式。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[轉換為 commonjs 'require' 呼叫的陳述式上不允許匯入判斷提示。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有當 '--module' 選項設定為 'esnext' 時,才支援匯入判斷提示。]]></Val>
</Tgt>
@@ -7125,15 +7197,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從模組 "{1}" 匯入預設 '{0}']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7308,6 +7371,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[包括 '{0}' 參考的類型匯入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10233,15 +10305,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當 'target' 為 'esnext' 且 'useDefineForClassFields' 為 'false' 時,不能在同一個類別的靜態屬性初始設定式中使用屬性 '{0}'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10557,6 +10620,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當 '--moduleResolution' 為 'node12' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。請考慮將延伸模組新增到匯入路徑。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當 '--moduleResolution' 為 'node12' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。您是 指 '{0}' 嗎?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10683,6 +10764,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{0}" 移除匯入宣告中的 'type']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{1}" 移除匯入 '{0}' 中的 'type']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12093,15 +12192,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[當 '--useDefineForClassFields' 旗標未以 'esnext' 的 '--target' 指定時,具有私人名稱的靜態欄位不得有初始設定式。請考慮新增 '--useDefineForClassFields' 旗標。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14607,6 +14697,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[從 "{0}" 更新匯入]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15681,6 +15780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[必須是 'catch' 或 'finally'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -864,15 +864,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Pokud třída obsahuje inicializované vlastnosti, vlastnosti parametru nebo privátní identifikátory, musí být první příkaz v konstruktoru volání super.]]></Val>
<Val><![CDATA[Volání super musí být příkaz na kořenové úrovni v konstruktoru odvozené třídy, který obsahuje inicializované vlastnosti, vlastnosti parametrů nebo privátní identifikátory.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Volání super musí být prvním příkazem v konstruktoru, který odkazuje na super nebo toto, když odvozená třída obsahuje inicializované vlastnosti, vlastnosti parametrů nebo soukromé identifikátory.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1047,18 +1053,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<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>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1230,15 +1224,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přidat výchozí import {0} do existující deklarace z {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1266,6 +1251,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přidat import z {0}]]></Val>
</Tgt>
</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>
@@ -2130,11 +2124,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Literál objektu nemůže mít víc vlastností se stejným názvem ve striktním režimu.]]></Val>
<Val><![CDATA[Literál objektu nemůže mít víc vlastností se stejným názvem.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2925,6 +2919,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nelze najít název {0}. Nechtěli jste to napsat v asynchronní funkci?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3618,6 +3621,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Možnost kompilátoru {0} hodnoty {1} je nestabilní. Ke ztlumení této chyby použijte noční TypeScript. Zkuste provést aktualizaci pomocí příkazu npm install -D typescript@next.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4038,6 +4050,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Převést pojmenované importy na výchozí import]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5250,11 +5271,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dynamické importy podporují pouze druhý argument, pokud je možnost --module nastavena na hodnotu esnext.]]></Val>
<Val><![CDATA[Dynamické importy podporují pouze druhý argument, pokud je možnost --module nastavena na hodnotu esnext nebo nodenext.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5775,6 +5796,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Soubory chyb]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6552,6 +6582,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[V {1} souborech byly nalezeny chyby ({0}).]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ve stejném souboru byly nalezeny chyby ({0}). Začínají na: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6570,6 +6618,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Našla se 1 chyba v {1}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7065,23 +7122,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importovat {0} z modulu {1}]]></Val>
<Val><![CDATA[Importovat {0} z: {1}]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kontrolní výrazy importu jsou podporovány pouze v případě, že je možnost --module nastavena na hodnotu esnext.]]></Val>
<Val><![CDATA[Hodnoty kontrolních výrazů importu musí být výrazy formou řetězcových literálů.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[V příkazech, které se překládají na volání require commonjs, se kontrolní výrazy importu nepovolují.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kontrolní výrazy importu jsou podporovány pouze v případě, že je možnost --module nastavena na hodnotu esnext nebo nodenext.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7134,15 +7206,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importovat výchozí hodnotu {0} z modulu {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7317,6 +7380,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Zahrnuje importy typů, na které odkazuje {0}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10242,15 +10314,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Vlastnost „{0}“ se nedá použít v inicializátoru statické vlastnosti stejné třídy, když „cíl“ je „esnext“ a „useDefineForClassFields“ je „nepravda“.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10566,6 +10629,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node12 nebo nodenext. Zvažte přidání rozšíření do cesty importu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node12 nebo nodenext. Měli jste na mysli {0}?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10692,6 +10773,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat „type“ z deklarace importu z „{0}“]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat „type“ z importu {0} z „{1}“]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12102,15 +12201,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Statická pole s privátními názvy nemůžou mít inicializátory, pokud se nezadá příznak --useDefineForClassFields s parametrem --target o hodnotě esnext. Zvažte možnost přidat příznak --useDefineForClassFields.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14616,6 +14706,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aktualizovat import z: {0}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15690,6 +15789,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Očekávalo se catch nebo finally.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -852,15 +852,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ein super-Aufruf muss die erste Anweisung im Konstruktor sein, wenn eine Klasse initialisierte Eigenschaften, Parametereigenschaften oder private Bezeichner enthält.]]></Val>
<Val><![CDATA[Ein superAufruf muss eine Anweisung auf Stammebene innerhalb eines Konstruktors einer abgeleiteten Klasse sein, die initialisierte Eigenschaften, Parametereigenschaften oder private Bezeichner enthält.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ein „super“ Aufruf muss die erste Anweisung im Konstruktor sein, um auf „super“ oder „this“ zu verweisen, wenn eine abgeleitete Klasse initialisierte Eigenschaften, Parametereigenschaften oder private Bezeichner enthält.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1035,18 +1041,6 @@
</Str>
<Disp Icon="Str" />
</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>
<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>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1218,15 +1212,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Standardimport "{0}" zur vorhandenen Importdeklaration aus "{1}" hinzufügen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1254,6 +1239,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Import aus "{0}" hinzufügen]]></Val>
</Tgt>
</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>
@@ -2118,11 +2112,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ein Objektliteral darf im Strict-Modus nicht mehrere Eigenschaften mit dem gleichen Namen besitzen.]]></Val>
<Val><![CDATA[Ein Objektliteral darf nicht über mehrere Eigenschaften mit demselben Namen verfügen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2913,6 +2907,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Name „{0}“ wurde nicht gefunden. Wollten Sie dies in eine asynchrone Funktion schreiben?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3606,6 +3609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Compileroption „{0}“ des Werts „{1}“ ist instabil. Verwenden Sie „Nightly TypeScript“, um diesen Fehler zu beheben. Versuchen Sie die Aktualisierung mit „npm install -D typescript@next“ durchzuführen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4026,6 +4038,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Konvertieren benannter Importe in Standardimporte]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5238,11 +5259,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dynamische Importe unterstützen nur ein zweites Argument, wenn die Option "--module" auf "esnext" festgelegt ist.]]></Val>
<Val><![CDATA[Dynamische Importe unterstützen nur ein zweites Argument, wenn die Option --module auf esnext“ oder „nodenext“ festgelegt ist.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5763,6 +5784,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Fehlerdateien]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6540,6 +6570,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[In {1} Dateien wurden {0} Fehler gefunden.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Es wurden {0} Fehler in derselben Datei gefunden, beginnend bei: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6558,6 +6606,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[1 Fehler in {1} gefunden]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7053,23 +7110,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" aus dem Modul "{1}" importieren]]></Val>
<Val><![CDATA["{0}" aus "{1}" importieren]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importassertionen werden nur unterstützt, wenn die Option "--module" auf "esnext" festgelegt ist.]]></Val>
<Val><![CDATA[Importassertionswerte müssen Zeichenfolgenliteralausdrücke sein.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importassertionen sind für Anweisungen, die in „require“-Aufrufe von CommonJs transpilieren, nicht zulässig.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importassertionen werden nur unterstützt, wenn die Option „--module“ auf „esnext“ oder „nodenext“ festgelegt ist.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7122,15 +7194,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Standard "{0}" aus Modul "{1}" importieren]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7305,6 +7368,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Schließt Importe von Typen ein, auf die von „{0}“ verwiesen wird]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10227,15 +10299,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Eigenschaft "{0}" darf nicht im Initialisierer einer statischen Eigenschaft in derselben Klasse verwendet werden, wenn "target" auf "esnext" und "useDefineForClassFields" auf FALSE festgelegt ist.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10551,6 +10614,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Relative Importpfade benötigen explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ auf „node12“ oder „nodenext“ festgelegt ist. Fügen Sie dem Importpfad gegebenenfalls eine Erweiterung hinzu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Relative Importpfade benötigen explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ auf „node12“ oder „nodenext“ festgelegt ist. Meinten Sie „{0}“?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10677,6 +10758,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[„type“ aus Importdeklaration aus „{0}“ entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[„type“ aus Import von „{0}“ aus „{1}“ entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12087,15 +12186,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Statische Felder mit privaten Namen dürfen keine Initialisierer enthalten, wenn das Flag "--useDefineForClassFields" nicht mit dem Wert "esnext" für "--target" angegeben wird. Erwägen Sie, das Flag "--useDefineForClassFields" hinzuzufügen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14601,6 +14691,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Import von "{0}" aktualisieren]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15675,6 +15774,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[„catch“ oder „finally“ erwartet.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -864,15 +864,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una llamada a "super" debe ser la primera instrucción del constructor cuando una clase contiene propiedades inicializadas, propiedades de parámetro o identificadores privados.]]></Val>
<Val><![CDATA[Una llamada "super" debe ser una instrucción de nivel raíz dentro de un constructor de una clase derivada que contiene propiedades inicializadas, propiedades de parámetros o identificadores privados.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una llamada "super" debe ser la primera instrucción del constructor para hacer referencia a "super" o "this" cuando una clase derivada contiene propiedades inicializadas, propiedades de parámetro o identificadores privados.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1047,18 +1053,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<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>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1230,15 +1224,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar la importación "{0}" predeterminada a la declaración de importación existente de "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1266,6 +1251,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar importación desde “{0}”]]></Val>
</Tgt>
</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>
@@ -2133,11 +2127,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Un literal de objeto no puede tener varias propiedades con el mismo nombre en modo strict.]]></Val>
<Val><![CDATA[Un literal de objeto no puede tener varias propiedades con el mismo nombre.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2928,6 +2922,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[No se puede encontrar el nombre "{0}". ¿Ha querido escribir esto en una función asincrónica?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3621,6 +3624,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La opción del compilador "{0}" del valor "{1}" es inestable. Use TypeScript nocturno para silenciar este error. Intente actualizar con "npm install -D typescript@next".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4041,6 +4053,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Convertir importaciones con nombre en importación predeterminada]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5253,11 +5274,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las importaciones dinámicas solo admiten un segundo argumento cuando la opción --módulo” está establecida en esnext.]]></Val>
<Val><![CDATA[Las importaciones dinámicas solo admiten un segundo argumento cuando la opción "--module" está establecida en "esnext" o "nodenext".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5778,6 +5799,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Archivos de errores]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6555,6 +6585,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se han encontrado {0} errores en {1} archivos.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se han encontrado {0} errores en el mismo archivo, empezando por: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6573,6 +6621,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se ha encontrado 1 error en {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7068,23 +7125,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importar "{0}" desde el módulo "{1}"]]></Val>
<Val><![CDATA[Importar {0} desde {1}]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las aserciones de importación solo se admiten cuando la opción "--módulo" está establecida en "esnext".]]></Val>
<Val><![CDATA[Los valores de aserción de importación deben ser expresiones literales de cadena.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las aserciones de importación no están permitidas en instrucciones que se transpilan a llamadas "requeridas" de commonjs.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las aserciones de importación solo se admiten cuando la opción "--module" está establecida en "esnext" o "nodenext".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7137,15 +7209,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importar el valor predeterminado "{0}" del módulo "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7320,6 +7383,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Incluye importaciones de tipos a los que hace referencia "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10245,15 +10317,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La propiedad "{0}" no se puede usar en un inicializador de propiedad estática en la misma clase cuando "target" es "esnext" y "useDefineForClassFields" es "false".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10569,6 +10632,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node12" o "nodenext". Considere la posibilidad de agregar una extensión a la ruta de acceso de importación.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node12" o "nodenext". ¿Quería decir "{0}"?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10695,6 +10776,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar "type" de la declaración de importación de "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar "type" de la importación de '{0}' de "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12105,15 +12204,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Los campos estáticos con nombres privados no pueden tener inicializadores si la marca "--useDefineForClassFields" no se especifica con un valor "--target" de "esnext". Pruebe a agregar la marca "--useDefineForClassFields".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14619,6 +14709,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Actualizar importación desde “{0}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15693,6 +15792,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[se esperaba "catch" o "finally".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -864,15 +864,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Un appel de 'super' doit être la première instruction du constructeur quand une classe contient des propriétés initialisées, des propriétés de paramètre ou des identificateurs privés.]]></Val>
<Val><![CDATA[Un appel « super » doit être une instruction de niveau racine dans un constructeur dune classe dérivée qui contient des propriétés initialisées, des propriétés de paramètre ou des identificateurs privés.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Un appel 'super' doit être la première instruction du constructeur à faire référence à « super » ou « this » lorsquune classe dérivée contient des propriétés initialisées, des propriétés de paramètre ou des identificateurs privés.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1047,18 +1053,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<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>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1230,15 +1224,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ajouter l'importation par défaut '{0}' à la déclaration import existante de "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1266,6 +1251,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ajouter l'importation de "{0}"]]></Val>
</Tgt>
</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>
@@ -2133,11 +2127,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Un littéral d'objet ne peut pas avoir plusieurs propriétés portant le même nom en mode strict.]]></Val>
<Val><![CDATA[Un littéral dobjet ne peut pas avoir plusieurs propriétés portant le même nom.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2928,6 +2922,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le nom « {0} » est introuvable. Voulez-vous écrire ceci dans une fonction asynchrone ?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3621,6 +3624,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Loption de compilateur « {0} » de la valeur «{1}» est instable. Utilisez TypeScript nocturne pour désactiver cette erreur. Essayez de mettre à jour avec « npm install -D typescript@next ».]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4041,6 +4053,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Convertir les importations nommées en importation par défaut]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5253,11 +5274,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les importations dynamiques prennent uniquement en charge un deuxième argument lorsque loption « --module » a la valeur « esnext ».]]></Val>
<Val><![CDATA[Les importations dynamiques prennent uniquement en charge un deuxième argument lorsque loption « --module » a la valeur « esnext » ou « nodenext ».]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5778,6 +5799,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Fichiers derreurs]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6555,6 +6585,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Erreurs {0} trouvées dans les fichiers {1} .]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Erreurs {0} trouvées dans le même fichier, à partir de : {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6573,6 +6621,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[1 erreur trouvée dans {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7068,23 +7125,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importer '{0}' à partir du module "{1}"]]></Val>
<Val><![CDATA[Importez '{0}' à partir de "{1}".]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les assertions dimportation sont prises en charge uniquement lorsque loption « --module » a la valeur « esnext ».]]></Val>
<Val><![CDATA[Les valeurs dassertion dimportation doivent être des expressions littérales de chaîne.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les assertions dimportation ne sont pas autorisées sur les instructions qui transpilent en appels commonjs « require ».]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les assertions dimportation ne sont prises en charge que lorsque loption « --module » a la valeur « esnext » ou « nodenext ».]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7137,15 +7209,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importer le '{0}' par défaut à partir du module "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7320,6 +7383,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Inclut les importations de types référencés par « {0} »]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10245,15 +10317,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La propriété '{0}' ne peut pas être utilisée dans la version initiale dune propriété statique dans la même classe lorsque 'target' est 'esnext' et 'useDefineForClassFields' est 'false'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10569,6 +10632,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les chemins dimportation relatifs nécessitent des extensions de fichier explicites dans les importations EcmaScript quand « --moduleResolution » est « node12 » ou « nodenext ». Envisagez dajouter une extension au chemin dimportation.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les chemins dimportation relatifs ont besoin dextensions de fichier explicites dans les importations EcmaScript quand « --moduleResolution » est « node12 » ou « nodenext ». Voulez-vous dire « {0} » ?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10695,6 +10776,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer 'type' de la déclaration dimportation de « {0} »]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer 'type' de limportation de « {0} » de «{1}»]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12105,15 +12204,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les champs static avec des noms privés ne peuvent pas avoir d'initialiseurs quand l'indicateur '--useDefineForClassFields' n'est pas spécifié avec le '--target' 'esnext'. Ajoutez l'indicateur '--useDefineForClassFields'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14619,6 +14709,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Mettre à jour limportation à partir de "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15693,6 +15792,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[« Catch » ou « finally » attendu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -855,15 +855,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una chiamata 'super' deve essere la prima istruzione del costruttore quando una classe contiene proprietà inizializzate, proprietà di parametri o identificatori privati.]]></Val>
<Val><![CDATA[Una chiamata 'super' deve essere un'istruzione a livello radice all'interno di un costruttore di una classe derivata che contiene proprietà inizializzate, proprietà dei parametri o identificatori privati.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una chiamata 'super' deve essere la prima istruzione del costruttore a fare riferimento a 'super' o 'this' quando una classe derivata contiene proprietà inizializzate, proprietà di parametri o identificatori privati.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1038,18 +1044,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<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>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1221,15 +1215,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere l'importazione predefinita '{0}' alla dichiarazione di importazione esistente restituita da "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1257,6 +1242,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere l'importazione da "{0}"]]></Val>
</Tgt>
</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>
@@ -2121,11 +2115,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Un valore letterale di oggetto non può contenere più proprietà con lo stesso nome in modalità strict.]]></Val>
<Val><![CDATA[Un valore letterale di oggetto non può contenere più proprietà con lo stesso nome.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2916,6 +2910,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Impossibile trovare il nome '{0}'. Si intendeva scrivere questo elemento in una funzione asincrona?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3609,6 +3612,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'opzione del compilatore '{0}' del valore '{1}' è instabile. Usare TypeScript notturno per disattivare l'errore. Provare ad eseguire l'aggiornamento con 'npm install -D typescript@next'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4029,6 +4041,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Converti importazioni denominate nell'importazione predefinita]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5241,11 +5262,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le importazioni dinamiche supportano un secondo argomento solo quando l'opzione '--module' è impostata su 'esnext'.]]></Val>
<Val><![CDATA[Le importazioni dinamiche supportano un secondo argomento solo quando l'opzione --modulo” è impostata su esnext” o “nodenext”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5766,6 +5787,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[File di errori]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6543,6 +6573,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Sono stati trovati {0} errori nei file {1}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Sono stati trovati {0} errori nello stesso file, a partire da: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6561,6 +6609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[È stato trovato 1 errore in {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7056,23 +7113,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importare '{0}' dal modulo "{1}"]]></Val>
<Val><![CDATA[Importare '{0}' da "{1}".]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le asserzioni di importazione sono supportate solo quando l'opzione '--module' è impostata su 'esnext'.]]></Val>
<Val><![CDATA[I valori di asserzione di importazione devono essere espressioni letterali delle stringhe.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le asserzioni di importazione non sono consentite nelle istruzioni che eseguono il transpile nelle chiamate 'require' di commonjs.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le asserzioni di importazione sono supportate solo quando l'opzione “--module” è impostata su “esnext” o “nodenext”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7125,15 +7197,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importare l'elemento '{0}' predefinito dal modulo "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7308,6 +7371,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Include importazioni di tipi a cui fa riferimento '{0}']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10233,15 +10305,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La proprietà '{0}' potrebbe non essere usata in un inizializzatore di proprietà statica nella stessa classe quando 'target' è 'esnext' e 'useDefineForClassFields' è 'false'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10557,6 +10620,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node12' o 'nodenext'. Provare ad aggiungere un'estensione al percorso di importazione.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node12' o 'nodenext'. Si intendeva "{0}"?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10683,6 +10764,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovi 'type' dalla dichiarazione di importazione da "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovi 'type' dall'importazione di '{0}' da "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12093,15 +12192,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[I campi statici con nomi privati non possono includere inizializzatori quando per specificare il flag '--useDefineForClassFields' non si usa '--target' con valore 'esnext'. Provare ad aggiungere il flag '--useDefineForClassFields'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14607,6 +14697,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiornare l'importazione da "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15681,6 +15780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[È previsto 'catch' o 'finally'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -855,15 +855,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['super' の呼び出しは、初期化されたプロパティ、パラメーターのプロパティ、private 識別子がクラスに含まれている場合は、コンストラクターの最初のステートメントである必要があります。]]></Val>
<Val><![CDATA['super' の呼び出しは、初期化されたプロパティ、パラメーターのプロパティ、private 識別子が派生クラスに含まれている場合は、コンストラクターのルートレベルのステートメントである必要があります。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['super' の呼び出しは、初期化されたプロパティ、パラメーターのプロパティ、private 識別子が派生クラスに含まれている場合は、'super' や 'this' を参照するコンストラクターの最初のステートメントである必要があります。]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1038,18 +1044,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}" から既存のインポート宣言に '{0}' を追加する]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1221,15 +1215,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[既定のインポート '{0}' を "{1}" からの既存のインポート宣言に追加する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1257,6 +1242,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" からのインポートの追加]]></Val>
</Tgt>
</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>
@@ -2121,11 +2115,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[厳格モードでは、オブジェクト リテラルに同じ名前の複数のプロパティを指定することはできません。]]></Val>
<Val><![CDATA[オブジェクト リテラルに同じ名前の複数のプロパティを指定することはできません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2916,6 +2910,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[名前 '{0}' が見つかりません。これを非同期関数に書き込むということですか?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3609,6 +3612,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[値 '{1}' のコンパイラ オプション '{0}' が不安定です。夜間 TypeScript を使用して、このエラーを無効にします。'npm install -D typescript@next' を使用して更新してみてください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4029,6 +4041,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[名前付きインポートを既定のインポートに変換する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5241,11 +5262,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--module' オプションが 'esnext' に設定されている場合、動的インポートは 2 番目の引数のみをサポートします。]]></Val>
<Val><![CDATA['--module' オプションが 'esnext' または 'nodenext' に設定されている場合、動的インポートは 2 番目の引数のみをサポートします。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5766,6 +5787,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[エラーの発生したファイル]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6543,6 +6573,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} ファイルに {0} 件のエラーが見つかりました。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[同じファイル内に {0} 件のエラーが見つかりました。{1} から開始します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6561,6 +6609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} で 1 件のエラーが見つかりました]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7056,23 +7113,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' 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[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[インポート アサーションは、'--module' オプションが 'esnext' に設定されている場合にのみサポートされます。]]></Val>
<Val><![CDATA[インポート アサーションの値は、文字列リテラル式である必要があります。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[インポート アサーションは、commonjs 'require' 呼び出しに変換するステートメントでは許可されません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[インポート アサーションは、'--module' オプションが 'esnext' または 'nodenext' に設定されている場合にのみサポートされます。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7125,15 +7197,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[モジュール "{1}" から既定の '{0}' をインポートする]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7308,6 +7371,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' によって参照される型のインポートを含む]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10233,15 +10305,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[' target ' が ' esnext ' で、' useesb Forclassfields ' が ' false ' の場合、プロパティ ' {0} ' を同じクラスにある静的プロパティの初期化子で使用することはできません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10557,6 +10620,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node12' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。インポート パスに拡張機能を追加することを検討してください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node12' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。'{0}' ということですか?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10683,6 +10764,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" からインポート宣言から `type` を削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}" から `{0}` のインポートから `type` を削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12093,15 +12192,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--useDefineForClassFields' フラグに 'esnext' の '--target' が指定されていない場合、プライベート名を持つ静的フィールドに初期化子を指定することはできません。'--useDefineForClassFields' フラグを追加することをご検討ください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14607,6 +14697,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" からのインポートの更新]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15681,6 +15780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['catch' または 'finally' が必要です。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -855,15 +855,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[클래스에 초기화된 속성, 매개 변수 속성 또는 프라이빗 식별자가 있으면 'super' 호출이 생성자에서 첫 번째 문이어야 합니다.]]></Val>
<Val><![CDATA['super' 호출은 초기화된 속성, 매개 변수 속성 또는 개인 식별자를 포함하는 파생 클래스의 생성자에서 루트 수준 문이어야 합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[파생 클래스에 초기화된 속성, 매개 변수 속성 또는 개인 식별자가 포함된 경우 'super' 호출은 '수퍼' 또는 'this'를 참조하는 생성자의 첫 번째 명령문이어야 합니다.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1038,18 +1044,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}"에서 기존 가져오기 선언에 '{0}' 추가]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1221,15 +1215,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}"에서 기존 가져오기 선언으로 기본 '{0}' 가져오기 추가]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1257,6 +1242,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}"에서 가져오기 추가]]></Val>
</Tgt>
</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>
@@ -2121,11 +2115,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[strict 모드에서는 개체 리터럴 이름이 같은 여러 개의 속성을 사용할 수 없습니다.]]></Val>
<Val><![CDATA[개체 리터럴 이름이 같은 여러 속성을 가질 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2916,6 +2910,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[이름 '{0}' 찾을 수 없습니다. 비동기 함수에 쓰려고 했나요?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3609,6 +3612,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[값 '{1}'의 컴파일러 옵션 '{0}'이(가) 불안정합니다. 야간 TypeScript를 사용하여 이 오류를 차단하세요. 'npm install -D typescript@next'로 업데이트해 보세요.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4029,6 +4041,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[명명된 가져오기를 기본 가져오기로 변환]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5241,11 +5262,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[동적 가져오기는 '--module' 옵션이 'esnext'로 설정된 경우에만 두 번째 인수를 지원합니다.]]></Val>
<Val><![CDATA[동적 가져오기는 '--module' 옵션이 'esnext' 또는 'nodenext'로 설정된 경우에만 두 번째 인수를 지원합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5766,6 +5787,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[오류 파일]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6543,6 +6573,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} 파일에서 {0} 오류를 찾았습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1}에서 시작하는 동일한 파일에서 {0}개의 오류를 찾았습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6561,6 +6609,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1}에서 1개의 오류를 찾았습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7056,23 +7113,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' 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[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[가져오기 어설션은 '--module' 옵션이 'esnext'로 설정된 경우에만 지원됩니다.]]></Val>
<Val><![CDATA[가져오기 어설션 값은 문자열 리터럴 ㅁ이이어야 합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[commonjs 'require' 호출로 변환되는 명령문에는 가져오기 어설션이 허용되지 않습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[가져오기 어설션은 '--module' 옵션이 'esnext' 또는 'nodenext'로 설정된 경우에만 지원됩니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7125,15 +7197,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}" 모듈에서 기본값 '{0}' 가져오기]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7308,6 +7371,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}'에서 참조하는 유형의 가져오기를 포함합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10233,15 +10305,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['target'이 'esnext'이고 'useDefineForClassFields'가 'false'인 경우 동일한 클래스의 정적 속성의 이니셜라이저에서 '{0}'(은)는 속성을 사용할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10557,6 +10620,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node12' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. 가져오기 경로에 확장자를 추가하는 것을 고려하세요.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node12' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. '{0}'을(를) 의미했나요?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10683,6 +10764,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}"의 가져오기 선언에서 '형식' 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}"의 '{0}' 가져오기에서 '형식' 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12093,15 +12192,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--useDefineForClassFields' 플래그가 'esnext'의 '--target'과 함께 지정되지 않은 경우 프라이빗 이름을 가진 정적 필드는 이니셜라이저를 포함할 수 없습니다. '--useDefineForClassFields' 플래그를 추가하는 것이 좋습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14607,6 +14697,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}"에서 가져오기 업데이트]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15681,6 +15780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['catch' 또는 'finally'가 필요합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -845,15 +845,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Wywołanie elementu „super” musi być pierwszą instrukcją w konstruktorze, jeśli klasa zawiera zainicjowane właściwości, właściwości parametrów lub identyfikatory prywatne.]]></Val>
<Val><![CDATA[Wywołanie „super” musi być instrukcją na poziomie głównym w konstruktorze klasy pochodnej, która zawiera zainicjowane właściwości, właściwości parametrów lub identyfikatory prywatne.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Wywołanie „super” musi być pierwszą instrukcją w konstruktorze, aby odwoływać się do „super” lub „this”, gdy klasa pochodna zawiera zainicjalizowane właściwości, właściwości parametrów lub prywatne identyfikatory.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1028,18 +1034,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj element „{0}” do istniejącej deklaracji importu z elementu „{1}”]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1211,15 +1205,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj domyślny import „{0}” do istniejącej deklaracji importu z „{1}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1247,6 +1232,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj import z „{0}”]]></Val>
</Tgt>
</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>
@@ -2111,11 +2105,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Literał obiektu nie może mieć wielu właściwości o takiej samej nazwie w trybie z ograniczeniami.]]></Val>
<Val><![CDATA[Literał obiektu nie może mieć wielu właściwości o tej samej nazwie.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2906,6 +2900,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nie można odnaleźć nazwy "{0}". Czy chodziło Ci o napisanie tego w funkcji asynchronicznej?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3599,6 +3602,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Opcja kompilatora "{0}" wartości '{1}' jest niestabilna. Użyj nocnego TypeScript, aby wyciszyć ten błąd. Spróbuj zaktualizować za pomocą polecenia „npm install -D typescript@next”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4019,6 +4031,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Konwertuj nazwane importy na import domyślny]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5231,11 +5252,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importy dynamiczne obsługują drugi argument tylko w przypadku, gdy opcja „--module” ma wartość „esnext”.]]></Val>
<Val><![CDATA[Importy dynamiczne obsługują tylko drugi argument, gdy opcja „--module” jest ustawiona na wartość „esnext” lub „nodenext”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5756,6 +5777,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Pliki z błędami]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6533,6 +6563,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Znaleziono błędy {0} w plikach {1}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Znaleziono błędy {0} w tym samym pliku, zaczynając od: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6551,6 +6599,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Znaleziono 1 błąd w {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7046,23 +7103,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importuj element „{0}” z modułu „{1}”]]></Val>
<Val><![CDATA[Importuj element „{0}” z lokalizacji „{1}”]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Asercje importu są obsługiwane tylko w przypadku, gdy opcja „--module” ma wartość „esnext”.]]></Val>
<Val><![CDATA[Wartości atrybutu importu muszą być wyrażeniami literału ciągu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Atrybuty importu są niedozwolone w instrukcjach, które transpilują do wywołań commonjs „require”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Atrybuty importu są obsługiwane tylko wtedy, gdy opcja „--module” jest ustawiona na wartość „esnext” lub „nodenext”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7115,15 +7187,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importuj domyślny element „{0}” z modułu „{1}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7298,6 +7361,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Obejmuje importy typów przywoływanych przez element "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10220,15 +10292,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nie można użyć właściwości "{0}" w inicjatorze właściwości statycznej w tej samej klasie, gdy parametr "target" ma wartość "esnext", a parametr "useDefineForClassFields" ma wartość "false".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10544,6 +10607,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node12” lub „nodenext”. Zastanów się nad dodaniem rozszerzenia do ścieżki importu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node12” lub „nodenext”. Czy chodziło Ci o "{0}"?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10670,6 +10751,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń element „type” z deklaracji importu z elementu „ {0}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń element „type” z importu elementu „{0}” z „{1}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12080,15 +12179,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Pola statyczne z nazwami prywatnymi nie mogą mieć inicjatorów, gdy flaga „--useDefineForClassFields” nie jest określona z opcją „--target” o wartości „esnext”. Rozważ dodanie flagi „--useDefineForClassFields”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14594,6 +14684,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aktualizuj import z „{0}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15668,6 +15767,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Oczekiwano instrukcji „catch” lub „finally”.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -845,15 +845,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uma chamada 'super' deve ser a primeira instrução no construtor quando uma classe contiver propriedades inicializadas, propriedades de parâmetro ou identificadores privados.]]></Val>
<Val><![CDATA[Uma chamada 'super' deve ser uma instrução de nível raiz dentro de um construtor de uma classe derivada que contém propriedades inicializadas, propriedades de parâmetro ou identificadores privados.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uma chamada 'super' deve ser a primeira instrução no construtor a se referir a 'super' ou 'this' quando uma classe derivada contém propriedades inicializadas, propriedades de parâmetro ou identificadores privados.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1028,18 +1034,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar '{0}' à declaração de importação existente de "{1}"]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1211,15 +1205,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar importação padrão '{0}' à declaração de importação existente de "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1247,6 +1232,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar importação de "{0}"]]></Val>
</Tgt>
</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>
@@ -2114,11 +2108,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Um literal de objeto não pode ter várias propriedades com o mesmo nome no modo estrito.]]></Val>
<Val><![CDATA[Um literal de objeto não pode ter várias propriedades com o mesmo nome.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2909,6 +2903,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Não foi possível encontrar o nome '{0}'. Você quis escrever isto em uma função assíncrona?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3602,6 +3605,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A opção do compilador '{0}' de valor '{1}' é instável. Use o TypeScript noturno para silenciar esse erro. Tente atualizar com 'npm install -D typescript@next'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4022,6 +4034,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Converter importações nomeadas em importação padrão]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5234,11 +5255,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[As importações dinâmicas somente suportam um segundo argumento quando a opção '--module' é definida como 'esnext'.]]></Val>
<Val><![CDATA[As importações dinâmicas suportam apenas um segundo argumento quando a opção '--module' está definida como 'esnext' ou 'nodenext'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5759,6 +5780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Arquivos de Erros]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6536,6 +6566,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Foram encontrados {0} erros em {1} arquivos.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Foram encontrados {0} erros no mesmo arquivo, começando em: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6554,6 +6602,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Encontrado 1 erro em {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7049,23 +7106,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importar '{0}' do módulo "{1}"]]></Val>
<Val><![CDATA[Importar '{0}' de "{1}"]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[As afirmações de importação somente são suportadas quando a opção '--module' é definida como 'esnext'.]]></Val>
<Val><![CDATA[Os valores de asserção de importação devem ser expressões literais de cadeias de caracteres.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[As declarações de importação não são permitidas em declarações que transpilam para chamadas 'require' do commonjs.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[As declarações de importação são suportadas apenas quando a opção '--module' está definida como 'esnext' ou 'nodenext'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7118,15 +7190,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importar '{0}' padrão do módulo "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7301,6 +7364,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Inclui importações de tipos referenciados por '{0}']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10223,15 +10295,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A propriedade '{0}' não pode ser usada em um inicializador de propriedade estática na mesma classe quando 'target' é 'esnext' e ' useDefineForClassFields' é 'false'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10547,6 +10610,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações ECMAScript quando '--moduleResolution' é 'node12' ou 'nodenext'. Considere adicionar uma extensão ao caminho de importação.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações do EcmaScript quando '--moduleResolution' é 'node12' ou 'nodenext'. Você quis dizer '{0}'?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10673,6 +10754,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover 'type' da declaração de importação "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover 'type' da importação de '{0}' de "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12083,15 +12182,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Os campos estáticos com nomes privados não podem ter inicializadores quando o sinalizador '--useDefineForClassFields' não está especificado com um '--target' igual a 'esnext'. Considere adicionar o sinalizador '--useDefineForClassFields'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14597,6 +14687,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Atualizar importação de "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15671,6 +15770,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[é esperado 'catch' ou 'finally'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -854,15 +854,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Вызов "super" должен быть первой инструкцией в конструкторе, если класс содержит инициализированные свойства, свойства параметров или закрытые идентификаторы.]]></Val>
<Val><![CDATA[Вызов "super" должен быть инструкцией на корневом уровне в конструкторе производного класса с инициализированными свойствами, свойствами параметров или частными идентификаторами.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Вызов "super" должен быть первой инструкцией в конструкторе, ссылающейся на "super" или "this", если производный класс содержит инициализированные свойства, свойства параметров или частные идентификаторы.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1037,18 +1043,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавьте "{0}" в существующее объявление импорта из "{1}"]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1220,15 +1214,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавление импорта "{0}" по умолчанию в существующее объявление импорта из "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1256,6 +1241,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавить импортировать из "{0}"]]></Val>
</Tgt>
</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>
@@ -2120,11 +2114,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Объектный литерал не может иметь несколько свойств с одинаковым именем в строгом режиме.]]></Val>
<Val><![CDATA[У объектного литерала не может быть несколько свойств с одинаковым именем.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2915,6 +2909,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Не удается найти имя "{0}". Вы собирались использовать его в асинхронной функции?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3608,6 +3611,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Параметр компилятора "{0}" со значением "{1}" нестабилен. Используйте ночную сборку TypeScript, чтобы скрыть эту ошибку. Для обновления попробуйте использовать команду "npm install -D typescript@next".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4028,6 +4040,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Преобразовать именованные операции импорта в стандартный импорт]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5240,11 +5261,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Динамические импорты поддерживают второй аргумент, только если параметр "--module" имеет значение "esnext".]]></Val>
<Val><![CDATA[Динамический импорт поддерживает второй аргумент только в случае, когда для параметра "--module" задано значение "esnext" или "nodenext".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5765,6 +5786,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Файлы ошибок]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6542,6 +6572,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Обнаружены ошибки ({0}) в файлах ({1}).]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Обнаружены {0} ошибки в этом же файле, начиная с: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6560,6 +6608,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Обнаружена 1 ошибка в {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7055,23 +7112,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' 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[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Утверждения импорта поддерживаются, только если параметр "--module" имеет значение "esnext".]]></Val>
<Val><![CDATA[Значения утверждения импорта должны быть выражениями строковых литералов.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Утверждения импорта не разрешены для операторов, которые транскомпилируются в вызовы "require" в CommonJS.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Утверждения импорта поддерживаются только в случае, когда для параметра "--module" задано значение "esnext" или "nodenext".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7124,15 +7196,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Импортировать "{0}" по умолчанию из модуля "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7307,6 +7370,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Включает импорт типов, на которые ссылается "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10232,15 +10304,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Свойство "{0}" не может использоваться в инициализаторе статического свойства в том же классе, если "target" имеет значение "esnext", а "useDefineForClassFields" — "false".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10556,6 +10619,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[В относительных путях импорта необходимо явным образом указывать расширения файлов при импорте EcmaScript, когда для параметра "--moduleResolution" задано значение "node12" или "nodenext". Попробуйте добавить расширение в путь импорта.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[В относительных путях импорта необходимо явным образом указывать расширения файлов при импорте EcmaScript, когда для параметра "--moduleResolution" задано значение "node12" или "nodenext". Вы имели в виду "{0}"?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10682,6 +10763,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удаление "type" из объявления импорта из "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удаление "type" из импорта "{0}" из "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12092,15 +12191,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Статические поля с частными именами не могут иметь инициализаторы, если не указан флаг "--useDefineForClassFields" с параметром "--target", имеющим значение "esnext". Рекомендуется добавить флаг "--useDefineForClassFields".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14606,6 +14696,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Обновить импорт из "{0}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15680,6 +15779,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ожидается "catch" или "finally".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
@@ -848,15 +848,21 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Val><![CDATA[A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Bir sınıf başlatılmış özellikler, parametre özellikleri veya özel tanımlayıcılar içerdiğinde 'super' çağrısı, oluşturucudaki ilk deyim olmalıdır.]]></Val>
<Val><![CDATA['super' çağrısı, başlatılmış özellikleri, parametre özelliklerini veya özel tanımlayıcıları içeren türetilmiş bir sınıfın oluşturucusu içinde kök düzeyinde bir deyim olmalıdır.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Bir türetilmiş sınıf başlatılmış özellikler, parametre özellikleri veya özel tanımlayıcılar içerdiğinde 'super' çağrısı, 'super' veya 'this' öğesine başvurmak için oluşturucudaki ilk deyim olmalıdır.]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1031,18 +1037,6 @@
</Str>
<Disp Icon="Str" />
</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>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' öğesini "{1}" konumundaki mevcut içeri aktarma bildirimine ekle]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add '{0}' to existing import declaration from "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_0_to_unresolved_variable_90008" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add '{0}.' to unresolved variable]]></Val>
@@ -1214,15 +1208,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_default_import_0_to_existing_import_declaration_from_1_90033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add default import '{0}' to existing import declaration from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Varsayılan '{0}' içeri aktarmasını "{1}" kaynaklı mevcut içeri aktarma bildirimine ekleyin]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
@@ -1250,6 +1235,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_import_from_0_90057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" kaynağından içeri aktarma ekle]]></Val>
</Tgt>
</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>
@@ -2114,11 +2108,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An object literal cannot have multiple properties with the same name in strict mode.]]></Val>
<Val><![CDATA[An object literal cannot have multiple properties with the same name.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nesne sabit değeri, katı modda aynı ada sahip birden fazla özelliğe sahip olamaz.]]></Val>
<Val><![CDATA[Nesne sabit değerinin aynı ada sahip birden fazla özelliği olamaz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -2909,6 +2903,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Did you mean to write this in an async function?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' adı bulunamadı. Bunu zaman uyumsuz bir işleve mi yazmak istediniz?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.]]></Val>
@@ -3602,6 +3605,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Derleyici seçeneği '{0}' değeri '{1}' kararsız. Bu hatayı sessize almak için gecelik TypeScript kullanın. 'npm install -D typescript@next' ile güncelleştirmeyi deneyin.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Compiler_option_0_requires_a_value_of_type_1_5024" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Compiler option '{0}' requires a value of type {1}.]]></Val>
@@ -4022,6 +4034,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_default_import_95170" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to default import]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adlandırılmış içeri aktarmaları varsayılan içeri aktarmaya dönüştür]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_named_imports_to_namespace_import_95057" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert named imports to namespace import]]></Val>
@@ -5234,11 +5255,11 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dinamik içeri aktarmalar yalnızca '--module' seçeneği 'esnext' olarak ayarlandığında ikinci bir bağımsız değişkeni destekler.]]></Val>
<Val><![CDATA[Dinamik içeri aktarmalar, yalnızca '--module' seçeneği 'esnext' veya 'nodenext' olarak ayarlandığında ikinci bir bağımsız değişkeni destekler.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5759,6 +5780,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Errors_Files_6041" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Errors Files]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Hata Dosyaları]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Examples_Colon_0_6026" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Examples: {0}]]></Val>
@@ -6536,6 +6566,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_1_files_6261" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in {1} files.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} dosyada {0} hata bulundu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_0_errors_in_the_same_file_starting_at_Colon_1_6260" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found {0} errors in the same file, starting at: {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aynı dosyada {0} hata bulundu, başlangıç: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_6216" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error.]]></Val>
@@ -6554,6 +6602,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_1_error_in_1_6259" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 1 error in {1}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Şurada 1 hata bulundu: {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Found_package_json_at_0_6099" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Found 'package.json' at '{0}'.]]></Val>
@@ -7049,23 +7106,38 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_0_from_module_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_0_from_1_90013" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}"]]></Val>
<Val><![CDATA[Import '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}" modülünden '{0}' öğesini içeri aktar]]></Val>
<Val><![CDATA['{0}' öğesini "{1}" kaynağından içeri aktar]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Import '{0}' from module "{1}".]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Import_assertion_values_must_be_string_literal_expressions_2837" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext'.]]></Val>
<Val><![CDATA[Import assertion values must be string literal expressions.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[İçeri aktarma onayları, yalnızca '--module' seçeneği 'esnext' olarak ayarlandığında desteklenir.]]></Val>
<Val><![CDATA[İçeri aktarma onaylama değerleri, dize sabit ifadeleri olmalıdır.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are not allowed on statements that transpile to commonjs 'require' calls.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Commonjs 'require' çağrılarına çevrilen deyimler için içeri aktarma onaylamalarına izin verilmez.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[İçeri aktarma onayları, yalnızca '--module' seçeneği 'esnext' veya 'nodenext' olarak ayarlandığında desteklenir.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7118,15 +7190,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_default_0_from_module_1_90032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Varsayılan '{0}' öğesini "{1}" modülünden içeri aktar]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Import_emit_helpers_from_tslib_6139" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Import emit helpers from 'tslib'.]]></Val>
@@ -7301,6 +7364,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Includes_imports_of_types_referenced_by_0_90054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Includes imports of types referenced by '{0}']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' tarafından başvurulan türlerin içeri aktarmalarını içerir]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:]]></Val>
@@ -10226,15 +10298,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['target', 'esnext' ve 'useDefineForClassFields', 'false' olduğunda, '{0}' özelliği aynı sınıftaki bir statik özelliğin başlatıcısında kullanılamaz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?]]></Val>
@@ -10550,6 +10613,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--moduleResolution' değeri 'node12' veya 'nodenext' olduğunda göreli içeri aktarma yolları EcmaScript içeri aktarmalarında açık dosya uzantılarını gerektirir. İçeri aktarma yoluna bir uzantı eklemeyi düşünün.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--moduleResolution' değeri 'node12' veya 'nodenext' olduğunda göreli içeri aktarma yolları EcmaScript içeri aktarmalarında açık dosya uzantılarını gerektirir. Şunu mu demek istediniz: '{0}'?]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_a_list_of_directories_from_the_watch_process_6628" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove a list of directories from the watch process.]]></Val>
@@ -10676,6 +10757,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_declaration_from_0_90055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import declaration from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" içindeki içeri aktarma bildiriminden “type”ı kaldırın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_from_import_of_0_from_1_90056" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove 'type' from import of '{0}' from "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{1}" içindeki “{0}” içe aktarımından “type”ı kaldırın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_type_parameters_90012" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove type parameters]]></Val>
@@ -12086,15 +12185,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['--useDefineForClassFields' bayrağı 'esnext' öğesinin '--target' hedefi ile belirtilmediğinde özel adlara sahip statik alanlar başlatıcılara sahip olamaz. '--useDefineForClassFields' bayrağını eklemeyi düşünün.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Static_members_cannot_reference_class_type_parameters_2302" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Static members cannot reference class type parameters.]]></Val>
@@ -14600,6 +14690,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Update_import_from_0_90058" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Update import from "{0}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0}" kaynağından içeri aktarmayı güncelleştir]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Updating_output_of_project_0_6373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Updating output of project '{0}'...]]></Val>
@@ -15674,6 +15773,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";catch_or_finally_expected_1472" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['catch' or 'finally' expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['catch' veya 'finally' bekleniyor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";const_declarations_can_only_be_declared_inside_a_block_1156" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['const' declarations can only be declared inside a block.]]></Val>
+4 -1
View File
@@ -370,7 +370,8 @@ namespace ts.server {
function combineProjectOutputForReferences(
projects: Projects,
defaultProject: Project,
initialLocation: DocumentPosition
initialLocation: DocumentPosition,
logger: Logger,
): readonly ReferencedSymbol[] {
const outputs: ReferencedSymbol[] = [];
@@ -379,6 +380,7 @@ namespace ts.server {
defaultProject,
initialLocation,
(project, location, getMappedLocation) => {
logger.info(`Finding references to ${location.fileName} position ${location.pos} in project ${project.getProjectName()}`);
for (const outputReferencedSymbol of project.getLanguageService().findReferences(location.fileName, location.pos) || emptyArray) {
const mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ?
@@ -1588,6 +1590,7 @@ namespace ts.server {
projects,
this.getDefaultProject(args),
{ fileName: args.file, pos: position },
this.logger,
);
if (!simplifiedResult) return references;
@@ -25,9 +25,12 @@ namespace ts.codefix {
interface Info { readonly indexSignature: IndexSignatureDeclaration; readonly container: FixableDeclaration; }
function getInfo(sourceFile: SourceFile, pos: number): Info | undefined {
const token = getTokenAtPosition(sourceFile, pos);
const indexSignature = cast(token.parent.parent, isIndexSignatureDeclaration);
if (isClassDeclaration(indexSignature.parent)) return undefined;
const container = isInterfaceDeclaration(indexSignature.parent) ? indexSignature.parent : cast(indexSignature.parent.parent, isTypeAliasDeclaration);
const indexSignature = tryCast(token.parent.parent, isIndexSignatureDeclaration);
if (!indexSignature) return undefined;
const container = isInterfaceDeclaration(indexSignature.parent) ? indexSignature.parent : tryCast(indexSignature.parent.parent, isTypeAliasDeclaration);
if (!container) return undefined;
return { indexSignature, container };
}
@@ -0,0 +1,104 @@
/* @internal */
namespace ts.codefix {
const deleteUnmatchedParameter = "deleteUnmatchedParameter";
const renameUnmatchedParameter = "renameUnmatchedParameter";
const errorCodes = [
Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code,
];
registerCodeFix({
fixIds: [deleteUnmatchedParameter, renameUnmatchedParameter],
errorCodes,
getCodeActions: function getCodeActionsToFixUnmatchedParameter(context) {
const { sourceFile, span } = context;
const actions: CodeFixAction[] = [];
const info = getInfo(sourceFile, span.start);
if (info) {
append(actions, getDeleteAction(context, info));
append(actions, getRenameAction(context, info));
return actions;
}
return undefined;
},
getAllCodeActions: function getAllCodeActionsToFixUnmatchedParameter(context) {
const tagsToSignature = new Map<SignatureDeclaration, JSDocTag[]>();
return createCombinedCodeActions(textChanges.ChangeTracker.with(context, changes => {
eachDiagnostic(context, errorCodes, ({ file, start }) => {
const info = getInfo(file, start);
if (info) {
tagsToSignature.set(info.signature, append(tagsToSignature.get(info.signature), info.jsDocParameterTag));
}
});
tagsToSignature.forEach((tags, signature) => {
if (context.fixId === deleteUnmatchedParameter) {
const tagsSet = new Set(tags);
changes.filterJSDocTags(signature.getSourceFile(), signature, t => !tagsSet.has(t));
}
});
}));
}
});
function getDeleteAction(context: CodeFixContext, { name, signature, jsDocParameterTag }: Info) {
const changes = textChanges.ChangeTracker.with(context, changeTracker =>
changeTracker.filterJSDocTags(context.sourceFile, signature, t => t !== jsDocParameterTag));
return createCodeFixAction(
deleteUnmatchedParameter,
changes,
[Diagnostics.Delete_unused_param_tag_0, name.getText(context.sourceFile)],
deleteUnmatchedParameter,
Diagnostics.Delete_all_unused_param_tags
);
}
function getRenameAction(context: CodeFixContext, { name, signature, jsDocParameterTag }: Info) {
if (!length(signature.parameters)) return undefined;
const sourceFile = context.sourceFile;
const tags = getJSDocTags(signature);
const names = new Set<__String>();
for (const tag of tags) {
if (isJSDocParameterTag(tag) && isIdentifier(tag.name)) {
names.add(tag.name.escapedText);
}
}
// @todo - match to all available names instead to the first parameter name
// @see /codeFixRenameUnmatchedParameter3.ts
const parameterName = firstDefined(signature.parameters, p =>
isIdentifier(p.name) && !names.has(p.name.escapedText) ? p.name.getText(sourceFile) : undefined);
if (parameterName === undefined) return undefined;
const newJSDocParameterTag = factory.updateJSDocParameterTag(
jsDocParameterTag,
jsDocParameterTag.tagName,
factory.createIdentifier(parameterName),
jsDocParameterTag.isBracketed,
jsDocParameterTag.typeExpression,
jsDocParameterTag.isNameFirst,
jsDocParameterTag.comment
);
const changes = textChanges.ChangeTracker.with(context, changeTracker =>
changeTracker.replaceJSDocComment(sourceFile, signature, map(tags, t => t === jsDocParameterTag ? newJSDocParameterTag : t)));
return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name.getText(sourceFile), parameterName]);
}
interface Info {
readonly signature: SignatureDeclaration;
readonly jsDocParameterTag: JSDocParameterTag;
readonly name: Identifier;
}
function getInfo(sourceFile: SourceFile, pos: number): Info | undefined {
const token = getTokenAtPosition(sourceFile, pos);
if (token.parent && isJSDocParameterTag(token.parent) && isIdentifier(token.parent.name)) {
const jsDocParameterTag = token.parent;
const signature = getHostSignatureFromJSDoc(jsDocParameterTag);
if (signature) {
return { signature, name: token.parent.name, jsDocParameterTag };
}
}
return undefined;
}
}
@@ -316,6 +316,10 @@ namespace ts.codefix {
// Setter must have a parameter
return false;
case SyntaxKind.GetAccessor:
// Getter cannot have parameters
return true;
default:
return Debug.failBadSyntaxKind(parent);
}
+234 -73
View File
@@ -10,7 +10,8 @@ namespace ts.codefix {
Diagnostics.Cannot_find_namespace_0.code,
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,
];
registerCodeFix({
@@ -19,9 +20,16 @@ namespace ts.codefix {
const { errorCode, preferences, sourceFile, span, program } = context;
const info = getFixesInfo(context, errorCode, span.start, /*useAutoImportProvider*/ true);
if (!info) return undefined;
const { fixes, symbolName } = info;
const { fixes, symbolName, errorIdentifierText } = info;
const quotePreference = getQuotePreference(sourceFile, preferences);
return fixes.map(fix => codeActionForFix(context, sourceFile, symbolName, fix, quotePreference, program.getCompilerOptions()));
return fixes.map(fix => codeActionForFix(
context,
sourceFile,
symbolName,
fix,
/*includeSymbolNameInDescription*/ symbolName !== errorIdentifierText,
quotePreference,
program.getCompilerOptions()));
},
fixIds: [importFixId],
getAllCodeActions: context => {
@@ -73,11 +81,11 @@ namespace ts.codefix {
const symbolName = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions));
const checker = program.getTypeChecker();
const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker));
const exportInfos = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, host, program, preferences, useAutoImportProvider);
const exportInfo = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, /*isJsxTagName*/ false, host, program, preferences, useAutoImportProvider);
const useRequire = shouldUseRequire(sourceFile, program);
const fix = getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, /*position*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences);
const fix = getImportFixForSymbol(sourceFile, exportInfo, moduleSymbol, symbolName, program, /*position*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences);
if (fix) {
addImport({ fixes: [fix], symbolName });
addImport({ fixes: [fix], symbolName, errorIdentifierText: undefined });
}
}
@@ -133,6 +141,9 @@ namespace ts.codefix {
}
break;
}
case ImportFixKind.PromoteTypeOnly:
// Excluding from fix-all
break;
default:
Debug.assertNever(fix, `fix wasn't never - got kind ${(fix as ImportFix).kind}`);
}
@@ -225,7 +236,7 @@ namespace ts.codefix {
}
// Sorted with the preferred fix coming first.
const enum ImportFixKind { UseNamespace, JsdocTypeImport, AddToExisting, AddNew }
const enum ImportFixKind { UseNamespace, JsdocTypeImport, AddToExisting, AddNew, PromoteTypeOnly }
// These should not be combined as bitflags, but are given powers of 2 values to
// easily detect conflicts between `NotAllowed` and `Required` by giving them a unique sum.
// They're also ordered in terms of increasing priority for a fix-all scenario (see
@@ -235,34 +246,43 @@ namespace ts.codefix {
Required = 1 << 1,
NotAllowed = 1 << 2,
}
type ImportFix = FixUseNamespaceImport | FixAddJsdocTypeImport | FixAddToExistingImport | FixAddNewImport;
interface FixUseNamespaceImport {
type ImportFix = FixUseNamespaceImport | FixAddJsdocTypeImport | FixAddToExistingImport | FixAddNewImport | FixPromoteTypeOnlyImport;
type ImportFixWithModuleSpecifier = FixUseNamespaceImport | FixAddJsdocTypeImport | FixAddToExistingImport | FixAddNewImport;
// Properties are be undefined if fix is derived from an existing import
interface ImportFixBase {
readonly isReExport?: boolean;
readonly exportInfo?: SymbolExportInfo;
readonly moduleSpecifier: string;
}
interface FixUseNamespaceImport extends ImportFixBase {
readonly kind: ImportFixKind.UseNamespace;
readonly namespacePrefix: string;
readonly position: number;
readonly moduleSpecifier: string;
}
interface FixAddJsdocTypeImport {
interface FixAddJsdocTypeImport extends ImportFixBase {
readonly kind: ImportFixKind.JsdocTypeImport;
readonly moduleSpecifier: string;
readonly position: number;
readonly isReExport: boolean;
readonly exportInfo: SymbolExportInfo;
}
interface FixAddToExistingImport {
interface FixAddToExistingImport extends ImportFixBase {
readonly kind: ImportFixKind.AddToExisting;
readonly importClauseOrBindingPattern: ImportClause | ObjectBindingPattern;
readonly moduleSpecifier: string;
readonly importKind: ImportKind.Default | ImportKind.Named;
readonly addAsTypeOnly: AddAsTypeOnly;
}
interface FixAddNewImport {
interface FixAddNewImport extends ImportFixBase {
readonly kind: ImportFixKind.AddNew;
readonly moduleSpecifier: string;
readonly importKind: ImportKind;
readonly addAsTypeOnly: AddAsTypeOnly;
readonly useRequire: boolean;
readonly exportInfo?: SymbolExportInfo;
}
interface FixPromoteTypeOnlyImport {
readonly kind: ImportFixKind.PromoteTypeOnly;
readonly typeOnlyAliasDeclaration: TypeOnlyAliasDeclaration;
}
/** Information needed to augment an existing import declaration. */
interface FixAddToExistingImportInfo {
@@ -277,6 +297,7 @@ namespace ts.codefix {
moduleSymbol: Symbol,
sourceFile: SourceFile,
symbolName: string,
isJsxTagName: boolean,
host: LanguageServiceHost,
program: Program,
formatContext: formatting.FormatContext,
@@ -286,7 +307,7 @@ namespace ts.codefix {
const compilerOptions = program.getCompilerOptions();
const exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name))
? [getSymbolExportInfoForSymbol(targetSymbol, moduleSymbol, program, host)]
: getAllReExportingModules(sourceFile, targetSymbol, moduleSymbol, symbolName, host, program, preferences, /*useAutoImportProvider*/ true);
: getAllReExportingModules(sourceFile, targetSymbol, moduleSymbol, symbolName, isJsxTagName, host, program, preferences, /*useAutoImportProvider*/ true);
const useRequire = shouldUseRequire(sourceFile, program);
const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position));
const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));
@@ -297,14 +318,23 @@ namespace ts.codefix {
sourceFile,
symbolName,
fix,
/*includeSymbolNameInDescription*/ false,
getQuotePreference(sourceFile, preferences), compilerOptions))
};
}
export function getPromoteTypeOnlyCompletionAction(sourceFile: SourceFile, symbolToken: Identifier, program: Program, host: LanguageServiceHost, formatContext: formatting.FormatContext, preferences: UserPreferences) {
const compilerOptions = program.getCompilerOptions();
const symbolName = getSymbolName(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions);
const fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName, program);
const includeSymbolNameInDescription = symbolName !== symbolToken.text;
return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName, fix, includeSymbolNameInDescription, QuotePreference.Double, compilerOptions));
}
function getImportFixForSymbol(sourceFile: SourceFile, exportInfos: readonly SymbolExportInfo[], moduleSymbol: Symbol, symbolName: string, program: Program, position: number | undefined, isValidTypeOnlyUseSite: boolean, useRequire: boolean, host: LanguageServiceHost, preferences: UserPreferences) {
Debug.assert(exportInfos.some(info => info.moduleSymbol === moduleSymbol || info.symbol.parent === moduleSymbol), "Some exportInfo should match the specified moduleSymbol");
const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host);
return getBestFix(getImportFixes(exportInfos, symbolName, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences), sourceFile, program, packageJsonImportFilter);
return getBestFix(getImportFixes(exportInfos, symbolName, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences), sourceFile, program, packageJsonImportFilter, host);
}
function codeFixActionToCodeAction({ description, changes, commands }: CodeFixAction): CodeAction {
@@ -332,7 +362,7 @@ namespace ts.codefix {
}
}
function getAllReExportingModules(importingFile: SourceFile, targetSymbol: Symbol, exportingModuleSymbol: Symbol, symbolName: string, host: LanguageServiceHost, program: Program, preferences: UserPreferences, useAutoImportProvider: boolean): readonly SymbolExportInfo[] {
function getAllReExportingModules(importingFile: SourceFile, targetSymbol: Symbol, exportingModuleSymbol: Symbol, symbolName: string, isJsxTagName: boolean, host: LanguageServiceHost, program: Program, preferences: UserPreferences, useAutoImportProvider: boolean): readonly SymbolExportInfo[] {
const result: SymbolExportInfo[] = [];
const compilerOptions = program.getCompilerOptions();
const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson: boolean) => {
@@ -347,7 +377,7 @@ namespace ts.codefix {
}
const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions);
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, getEmitScriptTarget(compilerOptions)) === symbolName) && skipAlias(defaultInfo.symbol, checker) === targetSymbol && isImportable(program, moduleFile, isFromPackageJson)) {
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, getEmitScriptTarget(compilerOptions), isJsxTagName) === symbolName) && skipAlias(defaultInfo.symbol, checker) === targetSymbol && isImportable(program, moduleFile, isFromPackageJson)) {
result.push({ symbol: defaultInfo.symbol, moduleSymbol, moduleFileName: moduleFile?.fileName, exportKind: defaultInfo.exportKind, targetFlags: skipAlias(defaultInfo.symbol, checker).flags, isFromPackageJson });
}
@@ -383,7 +413,7 @@ namespace ts.codefix {
host,
preferences,
fromCacheOnly);
const result = getBestFix(fixes, importingFile, program, packageJsonImportFilter || createPackageJsonImportFilter(importingFile, preferences, host));
const result = getBestFix(fixes, importingFile, program, packageJsonImportFilter || createPackageJsonImportFilter(importingFile, preferences, host), host);
return result && { ...result, computedWithoutCacheCount };
}
@@ -398,7 +428,7 @@ namespace ts.codefix {
sourceFile: SourceFile,
host: LanguageServiceHost,
preferences: UserPreferences,
): readonly ImportFix[] {
): readonly ImportFixWithModuleSpecifier[] {
const checker = program.getTypeChecker();
const existingImports = flatMap(exportInfos, info => getExistingImportDeclarations(info, checker, sourceFile, program.getCompilerOptions()));
const useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker);
@@ -579,7 +609,7 @@ namespace ts.codefix {
position: number | undefined,
isValidTypeOnlyUseSite: boolean,
useRequire: boolean,
moduleSymbols: readonly SymbolExportInfo[],
exportInfo: readonly SymbolExportInfo[],
host: LanguageServiceHost,
preferences: UserPreferences,
fromCacheOnly?: boolean,
@@ -593,7 +623,7 @@ namespace ts.codefix {
: (moduleSymbol: Symbol, checker: TypeChecker) => moduleSpecifiers.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences);
let computedWithoutCacheCount = 0;
const fixes = flatMap(moduleSymbols, exportInfo => {
const fixes = flatMap(exportInfo, (exportInfo, i) => {
const checker = getChecker(exportInfo.isFromPackageJson);
const { computedWithoutCache, moduleSpecifiers } = getModuleSpecifiers(exportInfo.moduleSymbol, checker);
const importedSymbolHasValueMeaning = !!(exportInfo.targetFlags & SymbolFlags.Value);
@@ -602,7 +632,7 @@ namespace ts.codefix {
return moduleSpecifiers?.map((moduleSpecifier): FixAddNewImport | FixAddJsdocTypeImport =>
// `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types.
!importedSymbolHasValueMeaning && isJs && position !== undefined
? { kind: ImportFixKind.JsdocTypeImport, moduleSpecifier, position, exportInfo }
? { kind: ImportFixKind.JsdocTypeImport, moduleSpecifier, position, exportInfo, isReExport: i > 0 }
: {
kind: ImportFixKind.AddNew,
moduleSpecifier,
@@ -610,6 +640,7 @@ namespace ts.codefix {
useRequire,
addAsTypeOnly,
exportInfo,
isReExport: i > 0,
}
);
});
@@ -648,46 +679,93 @@ namespace ts.codefix {
}
}
interface FixesInfo { readonly fixes: readonly ImportFix[]; readonly symbolName: string; }
interface FixesInfo { readonly fixes: readonly ImportFix[], readonly symbolName: string, readonly errorIdentifierText: string | undefined }
function getFixesInfo(context: CodeFixContextBase, errorCode: number, pos: number, useAutoImportProvider: boolean): FixesInfo | undefined {
const symbolToken = getTokenAtPosition(context.sourceFile, pos);
const info = errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
? getFixesInfoForUMDImport(context, symbolToken)
: isIdentifier(symbolToken) ? getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider) : undefined;
let info;
if (errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {
info = getFixesInfoForUMDImport(context, symbolToken);
}
else if (!isIdentifier(symbolToken)) {
return undefined;
}
else if (errorCode === Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) {
const symbolName = getSymbolName(context.sourceFile, context.program.getTypeChecker(), symbolToken, context.program.getCompilerOptions());
const fix = getTypeOnlyPromotionFix(context.sourceFile, symbolToken, symbolName, context.program);
return fix && { fixes: [fix], symbolName, errorIdentifierText: symbolToken.text };
}
else {
info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider);
}
const packageJsonImportFilter = createPackageJsonImportFilter(context.sourceFile, context.preferences, context.host);
return info && { ...info, fixes: sortFixes(info.fixes, context.sourceFile, context.program, packageJsonImportFilter) };
return info && { ...info, fixes: sortFixes(info.fixes, context.sourceFile, context.program, packageJsonImportFilter, context.host) };
}
function sortFixes(fixes: readonly ImportFix[], sourceFile: SourceFile, program: Program, packageJsonImportFilter: PackageJsonImportFilter): readonly ImportFix[] {
return sort(fixes, (a, b) => compareValues(a.kind, b.kind) || compareModuleSpecifiers(a, b, sourceFile, program, packageJsonImportFilter.allowsImportingSpecifier));
function sortFixes(fixes: readonly ImportFixWithModuleSpecifier[], sourceFile: SourceFile, program: Program, packageJsonImportFilter: PackageJsonImportFilter, host: LanguageServiceHost): readonly ImportFixWithModuleSpecifier[] {
const _toPath = (fileName: string) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host));
return sort(fixes, (a, b) => compareValues(a.kind, b.kind) || compareModuleSpecifiers(a, b, sourceFile, program, packageJsonImportFilter.allowsImportingSpecifier, _toPath));
}
function getBestFix<T extends ImportFix>(fixes: readonly T[], sourceFile: SourceFile, program: Program, packageJsonImportFilter: PackageJsonImportFilter): T | undefined {
function getBestFix(fixes: readonly ImportFixWithModuleSpecifier[], sourceFile: SourceFile, program: Program, packageJsonImportFilter: PackageJsonImportFilter, host: LanguageServiceHost): ImportFixWithModuleSpecifier | undefined {
if (!some(fixes)) return;
// These will always be placed first if available, and are better than other kinds
if (fixes[0].kind === ImportFixKind.UseNamespace || fixes[0].kind === ImportFixKind.AddToExisting) {
return fixes[0];
}
return fixes.reduce((best, fix) =>
// Takes true branch of conditional if `fix` is better than `best`
compareModuleSpecifiers(fix, best, sourceFile, program, packageJsonImportFilter.allowsImportingSpecifier) === Comparison.LessThan ? fix : best
compareModuleSpecifiers(
fix,
best,
sourceFile,
program,
packageJsonImportFilter.allowsImportingSpecifier,
fileName => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)),
) === Comparison.LessThan ? fix : best
);
}
/** @returns `Comparison.LessThan` if `a` is better than `b`. */
function compareModuleSpecifiers(a: ImportFix, b: ImportFix, importingFile: SourceFile, program: Program, allowsImportingSpecifier: (specifier: string) => boolean): Comparison {
function compareModuleSpecifiers(
a: ImportFixWithModuleSpecifier,
b: ImportFixWithModuleSpecifier,
importingFile: SourceFile,
program: Program,
allowsImportingSpecifier: (specifier: string) => boolean,
toPath: (fileName: string) => Path,
): Comparison {
if (a.kind !== ImportFixKind.UseNamespace && b.kind !== ImportFixKind.UseNamespace) {
return compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier))
|| compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program)
|| compareBooleans(isOnlyDotsAndSlashes(a.moduleSpecifier), isOnlyDotsAndSlashes(b.moduleSpecifier))
|| compareBooleans(
isFixPossiblyReExportingImportingFile(a, importingFile, program.getCompilerOptions(), toPath),
isFixPossiblyReExportingImportingFile(b, importingFile, program.getCompilerOptions(), toPath))
|| compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);
}
return Comparison.EqualTo;
}
const notDotOrSlashPattern = /[^.\/]/;
function isOnlyDotsAndSlashes(path: string) {
return !notDotOrSlashPattern.test(path);
// This is a simple heuristic to try to avoid creating an import cycle with a barrel re-export.
// E.g., do not `import { Foo } from ".."` when you could `import { Foo } from "../Foo"`.
// This can produce false positives or negatives if re-exports cross into sibling directories
// (e.g. `export * from "../whatever"`) or are not named "index" (we don't even try to consider
// this if we're in a resolution mode where you can't drop trailing "/index" from paths).
function isFixPossiblyReExportingImportingFile(fix: ImportFixWithModuleSpecifier, importingFile: SourceFile, compilerOptions: CompilerOptions, toPath: (fileName: string) => Path): boolean {
if (fix.isReExport &&
fix.exportInfo?.moduleFileName &&
getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeJs &&
isIndexFileName(fix.exportInfo.moduleFileName)
) {
const reExportDir = toPath(getDirectoryPath(fix.exportInfo.moduleFileName));
return startsWith((importingFile.path), reExportDir);
}
return false;
}
function isIndexFileName(fileName: string) {
return getBaseFileName(fileName, [".js", ".jsx", ".d.ts", ".ts", ".tsx"], /*ignoreCase*/ true) === "index";
}
function compareNodeCoreModuleSpecifiers(a: string, b: string, importingFile: SourceFile, program: Program): Comparison {
@@ -696,16 +774,16 @@ namespace ts.codefix {
return Comparison.EqualTo;
}
function getFixesInfoForUMDImport({ sourceFile, program, host, preferences }: CodeFixContextBase, token: Node): FixesInfo | undefined {
function getFixesInfoForUMDImport({ sourceFile, program, host, preferences }: CodeFixContextBase, token: Node): FixesInfo & { fixes: readonly ImportFixWithModuleSpecifier[] } | undefined {
const checker = program.getTypeChecker();
const umdSymbol = getUmdSymbol(token, checker);
if (!umdSymbol) return undefined;
const symbol = checker.getAliasedSymbol(umdSymbol);
const symbolName = umdSymbol.name;
const exportInfos: readonly SymbolExportInfo[] = [{ symbol: umdSymbol, moduleSymbol: symbol, moduleFileName: undefined, exportKind: ExportKind.UMD, targetFlags: symbol.flags, isFromPackageJson: false }];
const exportInfo: readonly SymbolExportInfo[] = [{ symbol: umdSymbol, moduleSymbol: symbol, moduleFileName: undefined, exportKind: ExportKind.UMD, targetFlags: symbol.flags, isFromPackageJson: false }];
const useRequire = shouldUseRequire(sourceFile, program);
const fixes = getImportFixes(exportInfos, symbolName, isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*isValidTypeOnlyUseSite*/ false, useRequire, program, sourceFile, host, preferences);
return { fixes, symbolName };
const fixes = getImportFixes(exportInfo, symbolName, isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*isValidTypeOnlyUseSite*/ false, useRequire, program, sourceFile, host, preferences);
return { fixes, symbolName, errorIdentifierText: tryCast(token, isIdentifier)?.text };
}
function getUmdSymbol(token: Node, checker: TypeChecker): Symbol | undefined {
// try the identifier to see if it is the umd symbol
@@ -765,7 +843,7 @@ namespace ts.codefix {
}
}
function getFixesInfoForNonUMDImport({ sourceFile, program, cancellationToken, host, preferences }: CodeFixContextBase, symbolToken: Identifier, useAutoImportProvider: boolean): FixesInfo | undefined {
function getFixesInfoForNonUMDImport({ sourceFile, program, cancellationToken, host, preferences }: CodeFixContextBase, symbolToken: Identifier, useAutoImportProvider: boolean): FixesInfo & { fixes: readonly ImportFixWithModuleSpecifier[] } | undefined {
const checker = program.getTypeChecker();
const compilerOptions = program.getCompilerOptions();
const symbolName = getSymbolName(sourceFile, checker, symbolToken, compilerOptions);
@@ -774,10 +852,21 @@ namespace ts.codefix {
const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(symbolToken);
const useRequire = shouldUseRequire(sourceFile, program);
const exportInfos = getExportInfos(symbolName, getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);
const fixes = arrayFrom(flatMapIterator(exportInfos.entries(), ([_, exportInfos]) =>
const exportInfo = getExportInfos(symbolName, isJSXTagName(symbolToken), getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);
const fixes = arrayFrom(flatMapIterator(exportInfo.entries(), ([_, exportInfos]) =>
getImportFixes(exportInfos, symbolName, symbolToken.getStart(sourceFile), isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences)));
return { fixes, symbolName };
return { fixes, symbolName, errorIdentifierText: symbolToken.text };
}
function getTypeOnlyPromotionFix(sourceFile: SourceFile, symbolToken: Identifier, symbolName: string, program: Program): FixPromoteTypeOnlyImport | undefined {
const checker = program.getTypeChecker();
const symbol = checker.resolveName(symbolName, symbolToken, SymbolFlags.Value, /*excludeGlobals*/ true);
if (!symbol) return undefined;
const typeOnlyAliasDeclaration = checker.getTypeOnlyAliasDeclaration(symbol);
if (!typeOnlyAliasDeclaration || getSourceFileOfNode(typeOnlyAliasDeclaration) !== sourceFile) return undefined;
return { kind: ImportFixKind.PromoteTypeOnly, typeOnlyAliasDeclaration };
}
function jsxModeNeedsExplicitImport(jsx: JsxEmit | undefined) {
@@ -788,16 +877,23 @@ namespace ts.codefix {
const parent = symbolToken.parent;
if ((isJsxOpeningLikeElement(parent) || isJsxClosingElement(parent)) && parent.tagName === symbolToken && jsxModeNeedsExplicitImport(compilerOptions.jsx)) {
const jsxNamespace = checker.getJsxNamespace(sourceFile);
if (isIntrinsicJsxName(symbolToken.text) || !checker.resolveName(jsxNamespace, parent, SymbolFlags.Value, /*excludeGlobals*/ true)) {
if (needsJsxNamespaceFix(jsxNamespace, symbolToken, checker)) {
return jsxNamespace;
}
}
return symbolToken.text;
}
function needsJsxNamespaceFix(jsxNamespace: string, symbolToken: Identifier, checker: TypeChecker) {
if (isIntrinsicJsxName(symbolToken.text)) return true; // If we were triggered by a matching error code on an intrinsic, the error must have been about missing the JSX factory
const namespaceSymbol = checker.resolveName(jsxNamespace, symbolToken, SymbolFlags.Value, /*excludeGlobals*/ true);
return !namespaceSymbol || some(namespaceSymbol.declarations, isTypeOnlyImportOrExportDeclaration) && !(namespaceSymbol.flags & SymbolFlags.Value);
}
// Returns a map from an exported symbol's ID to a list of every way it's (re-)exported.
function getExportInfos(
symbolName: string,
isJsxTagName: boolean,
currentTokenMeaning: SemanticMeaning,
cancellationToken: CancellationToken,
fromFile: SourceFile,
@@ -829,7 +925,7 @@ namespace ts.codefix {
const compilerOptions = program.getCompilerOptions();
const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions);
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, getEmitScriptTarget(compilerOptions)) === symbolName) && symbolHasMeaning(defaultInfo.symbolForMeaning, currentTokenMeaning)) {
if (defaultInfo && (defaultInfo.name === symbolName || moduleSymbolToValidIdentifier(moduleSymbol, getEmitScriptTarget(compilerOptions), isJsxTagName) === symbolName) && symbolHasMeaning(defaultInfo.symbolForMeaning, currentTokenMeaning)) {
addSymbol(moduleSymbol, sourceFile, defaultInfo.symbol, defaultInfo.exportKind, program, isFromPackageJson);
}
@@ -871,14 +967,14 @@ namespace ts.codefix {
return allowSyntheticDefaults ? ImportKind.Default : ImportKind.CommonJS;
}
function codeActionForFix(context: textChanges.TextChangesContext, sourceFile: SourceFile, symbolName: string, fix: ImportFix, quotePreference: QuotePreference, compilerOptions: CompilerOptions): CodeFixAction {
function codeActionForFix(context: textChanges.TextChangesContext, sourceFile: SourceFile, symbolName: string, fix: ImportFix, includeSymbolNameInDescription: boolean, quotePreference: QuotePreference, compilerOptions: CompilerOptions): CodeFixAction {
let diag!: DiagnosticAndArguments;
const changes = textChanges.ChangeTracker.with(context, tracker => {
diag = codeActionForFixWorker(tracker, sourceFile, symbolName, fix, quotePreference, compilerOptions);
diag = codeActionForFixWorker(tracker, sourceFile, symbolName, fix, includeSymbolNameInDescription, quotePreference, compilerOptions);
});
return createCodeFixAction(importFixName, changes, diag, importFixId, Diagnostics.Add_all_missing_imports);
}
function codeActionForFixWorker(changes: textChanges.ChangeTracker, sourceFile: SourceFile, symbolName: string, fix: ImportFix, quotePreference: QuotePreference, compilerOptions: CompilerOptions): DiagnosticAndArguments {
function codeActionForFixWorker(changes: textChanges.ChangeTracker, sourceFile: SourceFile, symbolName: string, fix: ImportFix, includeSymbolNameInDescription: boolean, quotePreference: QuotePreference, compilerOptions: CompilerOptions): DiagnosticAndArguments {
switch (fix.kind) {
case ImportFixKind.UseNamespace:
addNamespaceQualifier(changes, sourceFile, fix);
@@ -896,11 +992,9 @@ namespace ts.codefix {
importKind === ImportKind.Named ? [{ name: symbolName, addAsTypeOnly }] : emptyArray,
compilerOptions);
const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier);
return [
importKind === ImportKind.Default ? Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1 : Diagnostics.Add_0_to_existing_import_declaration_from_1,
symbolName,
moduleSpecifierWithoutQuotes
]; // you too!
return includeSymbolNameInDescription
? [Diagnostics.Import_0_from_1, symbolName, moduleSpecifierWithoutQuotes]
: [Diagnostics.Update_import_from_0, moduleSpecifierWithoutQuotes];
}
case ImportFixKind.AddNew: {
const { importKind, moduleSpecifier, addAsTypeOnly, useRequire } = fix;
@@ -909,13 +1003,87 @@ namespace ts.codefix {
const namedImports: Import[] | undefined = importKind === ImportKind.Named ? [{ name: symbolName, addAsTypeOnly }] : undefined;
const namespaceLikeImport = importKind === ImportKind.Namespace || importKind === ImportKind.CommonJS ? { importKind, name: symbolName, addAsTypeOnly } : undefined;
insertImports(changes, sourceFile, getDeclarations(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport), /*blankLineBetween*/ true);
return [importKind === ImportKind.Default ? Diagnostics.Import_default_0_from_module_1 : Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
return includeSymbolNameInDescription
? [Diagnostics.Import_0_from_1, symbolName, moduleSpecifier]
: [Diagnostics.Add_import_from_0, moduleSpecifier];
}
case ImportFixKind.PromoteTypeOnly: {
const { typeOnlyAliasDeclaration } = fix;
const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile);
return promotedDeclaration.kind === SyntaxKind.ImportSpecifier
? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName, getModuleSpecifierText(promotedDeclaration.parent.parent)]
: [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)];
}
default:
return Debug.assertNever(fix, `Unexpected fix kind ${(fix as ImportFix).kind}`);
}
}
function getModuleSpecifierText(promotedDeclaration: ImportClause | ImportEqualsDeclaration): string {
return promotedDeclaration.kind === SyntaxKind.ImportEqualsDeclaration
? tryCast(tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)?.expression, isStringLiteralLike)?.text || promotedDeclaration.moduleReference.getText()
: cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text;
}
function promoteFromTypeOnly(changes: textChanges.ChangeTracker, aliasDeclaration: TypeOnlyAliasDeclaration, compilerOptions: CompilerOptions, sourceFile: SourceFile) {
// See comment in `doAddExistingFix` on constant with the same name.
const convertExistingToTypeOnly = compilerOptions.preserveValueImports && compilerOptions.isolatedModules;
switch (aliasDeclaration.kind) {
case SyntaxKind.ImportSpecifier:
if (aliasDeclaration.isTypeOnly) {
if (aliasDeclaration.parent.elements.length > 1 && OrganizeImports.importSpecifiersAreSorted(aliasDeclaration.parent.elements)) {
changes.delete(sourceFile, aliasDeclaration);
const newSpecifier = factory.updateImportSpecifier(aliasDeclaration, /*isTypeOnly*/ false, aliasDeclaration.propertyName, aliasDeclaration.name);
const insertionIndex = OrganizeImports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier);
changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex);
}
else {
changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()!);
}
return aliasDeclaration;
}
else {
Debug.assert(aliasDeclaration.parent.parent.isTypeOnly);
promoteImportClause(aliasDeclaration.parent.parent);
return aliasDeclaration.parent.parent;
}
case SyntaxKind.ImportClause:
promoteImportClause(aliasDeclaration);
return aliasDeclaration;
case SyntaxKind.NamespaceImport:
promoteImportClause(aliasDeclaration.parent);
return aliasDeclaration.parent;
case SyntaxKind.ImportEqualsDeclaration:
changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1));
return aliasDeclaration;
default:
Debug.failBadSyntaxKind(aliasDeclaration);
}
function promoteImportClause(importClause: ImportClause) {
changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile));
if (convertExistingToTypeOnly) {
const namedImports = tryCast(importClause.namedBindings, isNamedImports);
if (namedImports && namedImports.elements.length > 1) {
if (OrganizeImports.importSpecifiersAreSorted(namedImports.elements) &&
aliasDeclaration.kind === SyntaxKind.ImportSpecifier &&
namedImports.elements.indexOf(aliasDeclaration) !== 0
) {
// The import specifier being promoted will be the only non-type-only,
// import in the NamedImports, so it should be moved to the front.
changes.delete(sourceFile, aliasDeclaration);
changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0);
}
for (const element of namedImports.elements) {
if (element !== aliasDeclaration && !element.isTypeOnly) {
changes.insertModifierBefore(sourceFile, SyntaxKind.TypeKeyword, element);
}
}
}
}
}
}
function doAddExistingFix(
changes: textChanges.ChangeTracker,
sourceFile: SourceFile,
@@ -965,17 +1133,7 @@ namespace ts.codefix {
const insertionIndex = convertExistingToTypeOnly && !spec.isTypeOnly
? 0
: OrganizeImports.getImportSpecifierInsertionIndex(existingSpecifiers, spec);
const prevSpecifier = (clause.namedBindings as NamedImports).elements[insertionIndex - 1];
if (prevSpecifier) {
changes.insertNodeInListAfter(sourceFile, prevSpecifier, spec);
}
else {
changes.insertNodeBefore(
sourceFile,
existingSpecifiers[0],
spec,
!positionsAreOnSameLine(existingSpecifiers[0].getStart(), clause.parent.getStart(), sourceFile));
}
changes.insertImportSpecifierAtIndex(sourceFile, spec, clause.namedBindings as NamedImports, insertionIndex);
}
}
else if (existingSpecifiers?.length) {
@@ -1128,17 +1286,20 @@ namespace ts.codefix {
return some(declarations, decl => !!(getMeaningFromDeclaration(decl) & meaning));
}
export function moduleSymbolToValidIdentifier(moduleSymbol: Symbol, target: ScriptTarget | undefined): string {
return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target);
export function moduleSymbolToValidIdentifier(moduleSymbol: Symbol, target: ScriptTarget | undefined, forceCapitalize: boolean): string {
return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target, forceCapitalize);
}
export function moduleSpecifierToValidIdentifier(moduleSpecifier: string, target: ScriptTarget | undefined): string {
export function moduleSpecifierToValidIdentifier(moduleSpecifier: string, target: ScriptTarget | undefined, forceCapitalize?: boolean): string {
const baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index"));
let res = "";
let lastCharWasValid = true;
const firstCharCode = baseName.charCodeAt(0);
if (isIdentifierStart(firstCharCode, target)) {
res += String.fromCharCode(firstCharCode);
if (forceCapitalize) {
res = res.toUpperCase();
}
}
else {
lastCharWasValid = false;
+138 -33
View File
@@ -60,6 +60,8 @@ namespace ts.Completions {
ThisProperty = "ThisProperty/",
/** Auto-import that comes attached to a class member snippet */
ClassMemberSnippet = "ClassMemberSnippet/",
/** A type-only import that needs to be promoted in order to be used at the completion location */
TypeOnlyAlias = "TypeOnlyAlias/",
}
const enum SymbolOriginInfoKind {
@@ -69,6 +71,7 @@ namespace ts.Completions {
Promise = 1 << 3,
Nullable = 1 << 4,
ResolvedExport = 1 << 5,
TypeOnlyAlias = 1 << 6,
SymbolMemberNoExport = SymbolMember,
SymbolMemberExport = SymbolMember | Export,
@@ -96,6 +99,10 @@ namespace ts.Completions {
moduleSpecifier: string;
}
interface SymbolOriginInfoTypeOnlyAlias extends SymbolOriginInfo {
declaration: TypeOnlyAliasDeclaration;
}
function originIsThisType(origin: SymbolOriginInfo): boolean {
return !!(origin.kind & SymbolOriginInfoKind.ThisType);
}
@@ -128,6 +135,10 @@ namespace ts.Completions {
return !!(origin.kind & SymbolOriginInfoKind.Nullable);
}
function originIsTypeOnlyAlias(origin: SymbolOriginInfo | undefined): origin is SymbolOriginInfoTypeOnlyAlias {
return !!(origin && origin.kind & SymbolOriginInfoKind.TypeOnlyAlias);
}
interface UniqueNameSet {
add(name: string): void;
has(name: string): boolean;
@@ -277,7 +288,7 @@ namespace ts.Completions {
switch (completionData.kind) {
case CompletionDataKind.Data:
const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext);
const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position);
if (response?.isIncomplete) {
incompleteCompletionsCache?.set(response);
}
@@ -441,6 +452,7 @@ namespace ts.Completions {
completionData: CompletionData,
preferences: UserPreferences,
formatContext: formatting.FormatContext | undefined,
position: number
): CompletionInfo | undefined {
const {
symbols,
@@ -501,7 +513,7 @@ namespace ts.Completions {
isJsxIdentifierExpected,
isRightOfOpenTag,
);
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, getEmitScriptTarget(compilerOptions), entries);
}
else {
if (!isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === KeywordCompletionFilters.None) {
@@ -545,6 +557,13 @@ namespace ts.Completions {
}
}
const entryNames = new Set(entries.map(e => e.name));
for (const keywordEntry of getContextualKeywords(contextToken, position)) {
if (!entryNames.has(keywordEntry.name)) {
insertSorted(entries, keywordEntry, compareCompletionEntries, /*allowDuplicates*/ true);
}
}
for (const literal of literals) {
insertSorted(entries, createCompletionEntryForLiteral(sourceFile, preferences, literal), compareCompletionEntries, /*allowDuplicates*/ true);
}
@@ -740,6 +759,10 @@ namespace ts.Completions {
}
}
if (origin?.kind === SymbolOriginInfoKind.TypeOnlyAlias) {
hasAction = true;
}
if (preferences.includeCompletionsWithClassMemberSnippets &&
preferences.includeCompletionsWithInsertText &&
completionKind === CompletionKind.MemberLike &&
@@ -1168,6 +1191,9 @@ namespace ts.Completions {
if (origin?.kind === SymbolOriginInfoKind.ThisType) {
return CompletionSource.ThisProperty;
}
if (origin?.kind === SymbolOriginInfoKind.TypeOnlyAlias) {
return CompletionSource.TypeOnlyAlias;
}
}
export function getCompletionEntriesFromSymbols(
@@ -1245,7 +1271,7 @@ namespace ts.Completions {
}
/** True for locals; false for globals, module exports from other files, `this.` completions. */
const shouldShadowLaterSymbols = !origin && !(symbol.parent === undefined && !some(symbol.declarations, d => d.getSourceFile() === location.getSourceFile()));
const shouldShadowLaterSymbols = (!origin || originIsTypeOnlyAlias(origin)) && !(symbol.parent === undefined && !some(symbol.declarations, d => d.getSourceFile() === location.getSourceFile()));
uniques.set(name, shouldShadowLaterSymbols);
insertSorted(entries, entry, compareCompletionEntries, /*allowDuplicates*/ true);
}
@@ -1261,6 +1287,7 @@ namespace ts.Completions {
};
function shouldIncludeSymbol(symbol: Symbol, symbolToSortTextIdMap: SymbolSortTextIdMap): boolean {
let allFlags = symbol.flags;
if (!isSourceFile(location)) {
// export = /**/ here we want to get all meanings, so any symbol is ok
if (isExportAssignment(location.parent)) {
@@ -1287,12 +1314,12 @@ namespace ts.Completions {
|| symbolToSortTextIdMap[getSymbolId(symbolOrigin)] === SortTextId.LocationPriority)) {
return false;
}
// Continue with origin symbol
symbol = symbolOrigin;
allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin);
// import m = /**/ <-- It can only access namespace (if typing import = x. this would get member symbols and not namespace)
if (isInRightSideOfInternalImportEqualsDeclaration(location)) {
return !!(symbol.flags & SymbolFlags.Namespace);
return !!(allFlags & SymbolFlags.Namespace);
}
if (isTypeOnlyLocation) {
@@ -1302,7 +1329,7 @@ namespace ts.Completions {
}
// expressions are value space (which includes the value namespaces)
return !!(getCombinedLocalAndExportSymbolFlags(symbol) & SymbolFlags.Value);
return !!(allFlags & SymbolFlags.Value);
}
}
@@ -1501,7 +1528,6 @@ namespace ts.Completions {
source: string | undefined,
): CodeActionsAndSourceDisplay {
if (data?.moduleSpecifier) {
const { contextToken, previousToken } = getRelevantTokens(position, sourceFile);
if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementNode) {
// Import statement completion: 'import c|'
return { codeActions: undefined, sourceDisplay: [textPart(data.moduleSpecifier)] };
@@ -1533,6 +1559,19 @@ namespace ts.Completions {
}
}
if (originIsTypeOnlyAlias(origin)) {
const codeAction = codefix.getPromoteTypeOnlyCompletionAction(
sourceFile,
origin.declaration.name,
program,
host,
formatContext,
preferences);
Debug.assertIsDefined(codeAction, "Expected to have a code action for promoting type-only alias");
return { codeActions: [codeAction], sourceDisplay: undefined };
}
if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) {
return { codeActions: undefined, sourceDisplay: undefined };
}
@@ -1540,11 +1579,13 @@ namespace ts.Completions {
const checker = origin.isFromPackageJson ? host.getPackageJsonAutoImportProvider!()!.getTypeChecker() : program.getTypeChecker();
const { moduleSymbol } = origin;
const targetSymbol = checker.getMergedSymbol(skipAlias(symbol.exportSymbol || symbol, checker));
const isJsxOpeningTagName = contextToken?.kind === SyntaxKind.LessThanToken && isJsxOpeningLikeElement(contextToken.parent);
const { moduleSpecifier, codeAction } = codefix.getImportCompletionAction(
targetSymbol,
moduleSymbol,
sourceFile,
getNameForExportedSymbol(symbol, getEmitScriptTarget(compilerOptions)),
getNameForExportedSymbol(symbol, getEmitScriptTarget(compilerOptions), isJsxOpeningTagName),
isJsxOpeningTagName,
host,
program,
formatContext,
@@ -1639,7 +1680,8 @@ namespace ts.Completions {
case SyntaxKind.NewKeyword:
return checker.getContextualType(parent as Expression);
case SyntaxKind.CaseKeyword:
return getSwitchedType(cast(parent, isCaseClause), checker);
const caseClause = tryCast(parent, isCaseClause);
return caseClause ? getSwitchedType(caseClause, checker) : undefined;
case SyntaxKind.OpenBraceToken:
return isJsxExpression(parent) && !isJsxElement(parent.parent) && !isJsxFragment(parent.parent) ? checker.getContextualTypeForJsxAttribute(parent.parent) : undefined;
default:
@@ -2314,14 +2356,23 @@ namespace ts.Completions {
isInSnippetScope = isSnippetScope(scopeNode);
const symbolMeanings = (isTypeOnlyLocation ? SymbolFlags.None : SymbolFlags.Value) | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias;
const typeOnlyAliasNeedsPromotion = previousToken && !isValidTypeOnlyAliasUseSite(previousToken);
symbols = concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
for (const symbol of symbols) {
for (let i = 0; i < symbols.length; i++) {
const symbol = symbols[i];
if (!typeChecker.isArgumentsSymbol(symbol) &&
!some(symbol.declarations, d => d.getSourceFile() === sourceFile)) {
symbolToSortTextIdMap[getSymbolId(symbol)] = SortTextId.GlobalsOrKeywords;
}
if (typeOnlyAliasNeedsPromotion && !(symbol.flags & SymbolFlags.Value)) {
const typeOnlyAliasDeclaration = symbol.declarations && find(symbol.declarations, isTypeOnlyImportOrExportDeclaration);
if (typeOnlyAliasDeclaration) {
const origin: SymbolOriginInfoTypeOnlyAlias = { kind: SymbolOriginInfoKind.TypeOnlyAlias, declaration: typeOnlyAliasDeclaration };
symbolToOriginInfoMap[i] = origin;
}
}
}
// Need to insert 'this.' before properties of `this` type, so only do that if `includeInsertTextCompletions`
@@ -2445,14 +2496,26 @@ namespace ts.Completions {
preferences,
!!importCompletionNode,
context => {
exportInfo.forEach(sourceFile.path, (info, symbolName, isFromAmbientModule, exportMapKey) => {
if (!isIdentifierText(symbolName, getEmitScriptTarget(host.getCompilationSettings()))) return;
if (!detailsEntryId && isStringANonContextualKeyword(symbolName)) return;
// `targetFlags` should be the same for each `info`
if (!isTypeOnlyLocation && !importCompletionNode && !(info[0].targetFlags & SymbolFlags.Value)) return;
if (isTypeOnlyLocation && !(info[0].targetFlags & (SymbolFlags.Module | SymbolFlags.Type))) return;
const isCompletionDetailsMatch = detailsEntryId && some(info, i => detailsEntryId.source === stripQuotes(i.moduleSymbol.name));
if (isCompletionDetailsMatch || !detailsEntryId && charactersFuzzyMatchInString(symbolName, lowerCaseTokenText)) {
exportInfo.search(
sourceFile.path,
/*preferCapitalized*/ isRightOfOpenTag,
(symbolName, targetFlags) => {
if (!isIdentifierText(symbolName, getEmitScriptTarget(host.getCompilationSettings()))) return false;
if (!detailsEntryId && isStringANonContextualKeyword(symbolName)) return false;
if (!isTypeOnlyLocation && !importCompletionNode && !(targetFlags & SymbolFlags.Value)) return false;
if (isTypeOnlyLocation && !(targetFlags & (SymbolFlags.Module | SymbolFlags.Type))) return false;
// Do not try to auto-import something with a lowercase first letter for a JSX tag
const firstChar = symbolName.charCodeAt(0);
if (isRightOfOpenTag && (firstChar < CharacterCodes.A || firstChar > CharacterCodes.Z)) return false;
if (detailsEntryId) return true;
return charactersFuzzyMatchInString(symbolName, lowerCaseTokenText);
},
(info, symbolName, isFromAmbientModule, exportMapKey) => {
if (detailsEntryId && !some(info, i => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) {
return;
}
const defaultExportInfo = find(info, isImportableExportInfo);
if (!defaultExportInfo) {
return;
@@ -2463,6 +2526,7 @@ namespace ts.Completions {
const { exportInfo = defaultExportInfo, moduleSpecifier } = context.tryResolve(info, isFromAmbientModule) || {};
const isDefaultExport = exportInfo.exportKind === ExportKind.Default;
const symbol = isDefaultExport && getLocalSymbolForExportDefault(exportInfo.symbol) || exportInfo.symbol;
pushAutoImportSymbol(symbol, {
kind: moduleSpecifier ? SymbolOriginInfoKind.ResolvedExport : SymbolOriginInfoKind.Export,
moduleSpecifier,
@@ -2475,7 +2539,7 @@ namespace ts.Completions {
isFromPackageJson: exportInfo.isFromPackageJson,
});
}
});
);
hasUnresolvedAutoImports = context.resolutionLimitExceeded();
}
@@ -2543,16 +2607,20 @@ namespace ts.Completions {
}
if (contextToken.kind === SyntaxKind.GreaterThanToken && contextToken.parent) {
// <Component<string> /**/ />
// <Component<string> /**/ ><Component>
// - contextToken: GreaterThanToken (before cursor)
// - location: JsxSelfClosingElement or JsxOpeningElement
// - contextToken.parent === location
if (location === contextToken.parent && (location.kind === SyntaxKind.JsxOpeningElement || location.kind === SyntaxKind.JsxSelfClosingElement)) {
return false;
}
if (contextToken.parent.kind === SyntaxKind.JsxOpeningElement) {
// Two possibilities:
// 1. <div>/**/
// - contextToken: GreaterThanToken (before cursor)
// - location: JSXElement
// - different parents (JSXOpeningElement, JSXElement)
// 2. <Component<string> /**/>
// - contextToken: GreaterThanToken (before cursor)
// - location: GreaterThanToken (after cursor)
// - same parent (JSXOpeningElement)
// <div>/**/
// - contextToken: GreaterThanToken (before cursor)
// - location: JSXElement
// - different parents (JSXOpeningElement, JSXElement)
return location.parent.kind !== SyntaxKind.JsxOpeningElement;
}
@@ -3578,6 +3646,38 @@ namespace ts.Completions {
return isIdentifier(node) ? node.originalKeywordKind || SyntaxKind.Unknown : node.kind;
}
function getContextualKeywords(
contextToken: Node | undefined,
position: number,
): readonly CompletionEntry[] {
const entries = [];
/**
* An `AssertClause` can come after an import declaration:
* import * from "foo" |
* import "foo" |
* or after a re-export declaration that has a module specifier:
* export { foo } from "foo" |
* Source: https://tc39.es/proposal-import-assertions/
*/
if (contextToken) {
const file = contextToken.getSourceFile();
const parent = contextToken.parent;
const tokenLine = file.getLineAndCharacterOfPosition(contextToken.end).line;
const currentLine = file.getLineAndCharacterOfPosition(position).line;
if ((isImportDeclaration(parent) || isExportDeclaration(parent) && parent.moduleSpecifier)
&& contextToken === parent.moduleSpecifier
&& tokenLine === currentLine) {
entries.push({
name: tokenToString(SyntaxKind.AssertKeyword)!,
kind: ScriptElementKind.keyword,
kindModifiers: ScriptElementKindModifier.none,
sortText: SortText.GlobalsOrKeywords,
});
}
}
return entries;
}
/** Get the corresponding JSDocTag node if the position is in a jsDoc comment */
function getJsDocTagAtPosition(node: Node, position: number): JSDocTag | undefined {
return findAncestor(node, n =>
@@ -3901,10 +4001,15 @@ namespace ts.Completions {
/** True if symbol is a type or a module containing at least one type. */
function symbolCanBeReferencedAtTypeLocation(symbol: Symbol, checker: TypeChecker, seenModules = new Map<SymbolId, true>()): boolean {
const sym = skipAlias(symbol.exportSymbol || symbol, checker);
return !!(sym.flags & SymbolFlags.Type) || checker.isUnknownSymbol(sym) ||
!!(sym.flags & SymbolFlags.Module) && addToSeen(seenModules, getSymbolId(sym)) &&
checker.getExportsOfModule(sym).some(e => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules));
// Since an alias can be merged with a local declaration, we need to test both the alias and its target.
// This code used to just test the result of `skipAlias`, but that would ignore any locally introduced meanings.
return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(skipAlias(symbol.exportSymbol || symbol, checker));
function nonAliasCanBeReferencedAtTypeLocation(symbol: Symbol): boolean {
return !!(symbol.flags & SymbolFlags.Type) || checker.isUnknownSymbol(symbol) ||
!!(symbol.flags & SymbolFlags.Module) && addToSeen(seenModules, getSymbolId(symbol)) &&
checker.getExportsOfModule(symbol).some(e => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules));
}
}
function isDeprecated(symbol: Symbol, checker: TypeChecker) {
+20
View File
@@ -202,7 +202,27 @@ namespace ts {
scriptKind?: ScriptKind): SourceFile {
scriptKind = ensureScriptKind(fileName, scriptKind);
const scriptTarget = scriptKind === ScriptKind.JSON ? ScriptTarget.JSON : getEmitScriptTarget(compilationSettings);
const oldBucketCount = buckets.size;
const bucket = getOrUpdate(buckets, key, () => new Map());
if (tracing) {
if (buckets.size > oldBucketCount) {
// It is interesting, but not definitively problematic if a build requires multiple document registry buckets -
// perhaps they are for two projects that don't have any overlap.
// Bonus: these events can help us interpret the more interesting event below.
tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key });
}
// It is fairly suspicious to have one path in two buckets - you'd expect dependencies to have similar configurations.
// If this occurs unexpectedly, the fix is likely to synchronize the project settings.
// Skip .d.ts files to reduce noise (should also cover most of node_modules).
const otherBucketKey = !fileExtensionIs(path, Extension.Dts) &&
forEachEntry(buckets, (bucket, bucketKey) => bucketKey !== key && bucket.has(path) && bucketKey);
if (otherBucketKey) {
tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path, key1: otherBucketKey, key2: key });
}
}
const bucketEntry = bucket.get(path);
let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
if (!entry && externalCache) {
+64 -12
View File
@@ -29,9 +29,11 @@ namespace ts {
// Used to rehydrate `symbol` and `moduleSymbol` when transient
id: number;
symbolName: string;
capitalizedSymbolName: string | undefined;
symbolTableKey: __String;
moduleName: string;
moduleFile: SourceFile | undefined;
packageName: string | undefined;
// SymbolExportInfo, but optional symbols
readonly symbol: Symbol | undefined;
@@ -45,9 +47,9 @@ namespace ts {
export interface ExportInfoMap {
isUsableByFile(importingFile: Path): boolean;
clear(): void;
add(importingFile: Path, symbol: Symbol, key: __String, moduleSymbol: Symbol, moduleFile: SourceFile | undefined, exportKind: ExportKind, isFromPackageJson: boolean, scriptTarget: ScriptTarget, checker: TypeChecker): void;
add(importingFile: Path, symbol: Symbol, key: __String, moduleSymbol: Symbol, moduleFile: SourceFile | undefined, exportKind: ExportKind, isFromPackageJson: boolean, checker: TypeChecker): void;
get(importingFile: Path, key: string): readonly SymbolExportInfo[] | undefined;
forEach(importingFile: Path, action: (info: readonly SymbolExportInfo[], name: string, isFromAmbientModule: boolean, key: string) => void): void;
search(importingFile: Path, preferCapitalized: boolean, matches: (name: string, targetFlags: SymbolFlags) => boolean, action: (info: readonly SymbolExportInfo[], symbolName: string, isFromAmbientModule: boolean, key: string) => void): void;
releaseSymbols(): void;
isEmpty(): boolean;
/** @returns Whether the change resulted in the cache being cleared */
@@ -63,6 +65,17 @@ namespace ts {
let exportInfoId = 1;
const exportInfo = createMultiMap<string, CachedSymbolExportInfo>();
const symbols = new Map<number, [symbol: Symbol, moduleSymbol: Symbol]>();
/**
* Key: node_modules package name (no @types).
* Value: path to deepest node_modules folder seen that is
* both visible to `usableByFileName` and contains the package.
*
* Later, we can see if a given SymbolExportInfo is shadowed by
* a another installation of the same package in a deeper
* node_modules folder by seeing if its path starts with the
* value stored here.
*/
const packages = new Map<string, string>();
let usableByFileName: Path | undefined;
const cache: ExportInfoMap = {
isUsableByFile: importingFile => importingFile === usableByFileName,
@@ -72,11 +85,34 @@ namespace ts {
symbols.clear();
usableByFileName = undefined;
},
add: (importingFile, symbol, symbolTableKey, moduleSymbol, moduleFile, exportKind, isFromPackageJson, scriptTarget, checker) => {
add: (importingFile, symbol, symbolTableKey, moduleSymbol, moduleFile, exportKind, isFromPackageJson, checker) => {
if (importingFile !== usableByFileName) {
cache.clear();
usableByFileName = importingFile;
}
let packageName;
if (moduleFile) {
const nodeModulesPathParts = getNodeModulePathParts(moduleFile.fileName);
if (nodeModulesPathParts) {
const { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex } = nodeModulesPathParts;
packageName = unmangleScopedPackageName(getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex)));
if (startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) {
const prevDeepestNodeModulesPath = packages.get(packageName);
const nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex);
if (prevDeepestNodeModulesPath) {
const prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(nodeModulesPathPart);
if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) {
packages.set(packageName, nodeModulesPath);
}
}
else {
packages.set(packageName, nodeModulesPath);
}
}
}
}
const isDefault = exportKind === ExportKind.Default;
const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol;
// 1. A named export must be imported by its key in `moduleSymbol.exports` or `moduleSymbol.members`.
@@ -86,9 +122,13 @@ namespace ts {
// 3. Otherwise, we have a default/namespace import that can be imported by any name, and
// `symbolTableKey` will be something undesirable like `export=` or `default`, so we try to
// get a better name.
const importedName = exportKind === ExportKind.Named || isExternalModuleSymbol(namedSymbol)
const names = exportKind === ExportKind.Named || isExternalModuleSymbol(namedSymbol)
? unescapeLeadingUnderscores(symbolTableKey)
: getNameForExportedSymbol(namedSymbol, scriptTarget);
: getNamesForExportedSymbol(namedSymbol, /*scriptTarget*/ undefined);
const symbolName = typeof names === "string" ? names : names[0];
const capitalizedSymbolName = typeof names === "string" ? undefined : names[1];
const moduleName = stripQuotes(moduleSymbol.name);
const id = exportInfoId++;
const target = skipAlias(symbol, checker);
@@ -96,13 +136,15 @@ namespace ts {
const storedModuleSymbol = moduleSymbol.flags & SymbolFlags.Transient ? undefined : moduleSymbol;
if (!storedSymbol || !storedModuleSymbol) symbols.set(id, [symbol, moduleSymbol]);
exportInfo.add(key(importedName, symbol, isExternalModuleNameRelative(moduleName) ? undefined : moduleName, checker), {
exportInfo.add(key(symbolName, symbol, isExternalModuleNameRelative(moduleName) ? undefined : moduleName, checker), {
id,
symbolTableKey,
symbolName: importedName,
symbolName,
capitalizedSymbolName,
moduleName,
moduleFile,
moduleFileName: moduleFile?.fileName,
packageName,
exportKind,
targetFlags: target.flags,
isFromPackageJson,
@@ -115,11 +157,18 @@ namespace ts {
const result = exportInfo.get(key);
return result?.map(rehydrateCachedInfo);
},
forEach: (importingFile, action) => {
search: (importingFile, preferCapitalized, matches, action) => {
if (importingFile !== usableByFileName) return;
exportInfo.forEach((info, key) => {
const { symbolName, ambientModuleName } = parseKey(key);
action(info.map(rehydrateCachedInfo), symbolName, !!ambientModuleName, key);
const name = preferCapitalized && info[0].capitalizedSymbolName || symbolName;
if (matches(name, info[0].targetFlags)) {
const rehydrated = info.map(rehydrateCachedInfo);
const filtered = rehydrated.filter((r, i) => isNotShadowedByDeeperNodeModulesPackage(r, info[i].packageName));
if (filtered.length) {
action(filtered, name, !!ambientModuleName, key);
}
}
});
},
releaseSymbols: () => {
@@ -220,6 +269,12 @@ namespace ts {
}
return true;
}
function isNotShadowedByDeeperNodeModulesPackage(info: SymbolExportInfo, packageName: string | undefined) {
if (!packageName || !info.moduleFileName) return true;
const packageDeepestNodeModulesPath = packages.get(packageName);
return !packageDeepestNodeModulesPath || startsWith(info.moduleFileName, packageDeepestNodeModulesPath);
}
}
export function isImportableFile(
@@ -321,7 +376,6 @@ namespace ts {
host.log?.("getExportInfoMap: cache miss or empty; calculating new results");
const compilerOptions = program.getCompilerOptions();
const scriptTarget = getEmitScriptTarget(compilerOptions);
let moduleCount = 0;
forEachExternalModuleToImportFrom(program, host, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => {
if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested();
@@ -339,7 +393,6 @@ namespace ts {
moduleFile,
defaultInfo.exportKind,
isFromPackageJson,
scriptTarget,
checker);
}
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => {
@@ -352,7 +405,6 @@ namespace ts {
moduleFile,
ExportKind.Named,
isFromPackageJson,
scriptTarget,
checker);
}
});
+2
View File
@@ -432,6 +432,8 @@ namespace ts.formatting {
case SyntaxKind.ConstructorType:
case SyntaxKind.ConstructSignature:
return getList((node as SignatureDeclaration).typeParameters) || getList((node as SignatureDeclaration).parameters);
case SyntaxKind.GetAccessor:
return getList((node as GetAccessorDeclaration).parameters);
case SyntaxKind.ClassDeclaration:
case SyntaxKind.ClassExpression:
case SyntaxKind.InterfaceDeclaration:
+1 -1
View File
@@ -171,7 +171,7 @@ namespace ts.GoToDefinition {
}
if (sourceFile.resolvedModules?.size()) {
const node = getTokenAtPosition(sourceFile, position);
const node = getTouchingToken(sourceFile, position);
if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text, getModeForUsageLocation(sourceFile, node))) {
const verifiedFileName = sourceFile.resolvedModules.get(node.text, getModeForUsageLocation(sourceFile, node))?.resolvedFileName;
const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text);
+21 -1
View File
@@ -169,7 +169,27 @@ namespace ts.JsDoc {
case SyntaxKind.JSDocAugmentsTag:
return withNode((tag as JSDocAugmentsTag).class);
case SyntaxKind.JSDocTemplateTag:
return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "));
const templateTag = tag as JSDocTemplateTag;
const displayParts: SymbolDisplayPart[] = [];
if (templateTag.constraint) {
displayParts.push(textPart(templateTag.constraint.getText()));
}
if (length(templateTag.typeParameters)) {
if (length(displayParts)) {
displayParts.push(spacePart());
}
const lastTypeParameter = templateTag.typeParameters[templateTag.typeParameters.length - 1];
forEach(templateTag.typeParameters, tp => {
displayParts.push(namePart(tp.getText()));
if (lastTypeParameter !== tp) {
displayParts.push(...[punctuationPart(SyntaxKind.CommaToken), spacePart()]);
}
});
}
if (comment) {
displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]);
}
return displayParts;
case SyntaxKind.JSDocTypeTag:
return withNode((tag as JSDocTypeTag).typeExpression);
case SyntaxKind.JSDocTypedefTag:
+17 -2
View File
@@ -236,10 +236,9 @@ namespace ts.OrganizeImports {
}
}
newImportSpecifiers.push(...flatMap(namedImports, i => (i.importClause!.namedBindings as NamedImports).elements)); // TODO: GH#18217
newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
const sortedImportSpecifiers = sortSpecifiers(newImportSpecifiers);
const importDecl = defaultImports.length > 0
? defaultImports[0]
: namedImports[0];
@@ -492,4 +491,20 @@ namespace ts.OrganizeImports {
return 6;
}
}
function getNewImportSpecifiers(namedImports: ImportDeclaration[]) {
return flatMap(namedImports, namedImport =>
map(tryGetNamedBindingElements(namedImport), importSpecifier =>
importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText
? factory.updateImportSpecifier(importSpecifier, importSpecifier.isTypeOnly, /*propertyName*/ undefined, importSpecifier.name)
: importSpecifier
)
);
}
function tryGetNamedBindingElements(namedImport: ImportDeclaration) {
return namedImport.importClause?.namedBindings && isNamedImports(namedImport.importClause.namedBindings)
? namedImport.importClause.namedBindings.elements
: undefined;
}
}
+57 -32
View File
@@ -2,46 +2,48 @@
namespace ts.refactor {
const refactorName = "Convert import";
const namespaceToNamedAction = {
name: "Convert namespace import to named imports",
description: Diagnostics.Convert_namespace_import_to_named_imports.message,
kind: "refactor.rewrite.import.named",
};
const namedToNamespaceAction = {
name: "Convert named imports to namespace import",
description: Diagnostics.Convert_named_imports_to_namespace_import.message,
kind: "refactor.rewrite.import.namespace",
const actions = {
[ImportKind.Named]: {
name: "Convert namespace import to named imports",
description: Diagnostics.Convert_namespace_import_to_named_imports.message,
kind: "refactor.rewrite.import.named",
},
[ImportKind.Namespace]: {
name: "Convert named imports to namespace import",
description: Diagnostics.Convert_named_imports_to_namespace_import.message,
kind: "refactor.rewrite.import.namespace",
},
[ImportKind.Default]: {
name: "Convert named imports to default import",
description: Diagnostics.Convert_named_imports_to_default_import.message,
kind: "refactor.rewrite.import.default",
},
};
registerRefactor(refactorName, {
kinds: [
namespaceToNamedAction.kind,
namedToNamespaceAction.kind
],
kinds: getOwnValues(actions).map(a => a.kind),
getAvailableActions: function getRefactorActionsToConvertBetweenNamedAndNamespacedImports(context): readonly ApplicableRefactorInfo[] {
const info = getImportToConvert(context, context.triggerReason === "invoked");
const info = getImportConversionInfo(context, context.triggerReason === "invoked");
if (!info) return emptyArray;
if (!isRefactorErrorInfo(info)) {
const namespaceImport = info.kind === SyntaxKind.NamespaceImport;
const action = namespaceImport ? namespaceToNamedAction : namedToNamespaceAction;
const action = actions[info.convertTo];
return [{ name: refactorName, description: action.description, actions: [action] }];
}
if (context.preferences.provideRefactorNotApplicableReason) {
return [
{ name: refactorName, description: namespaceToNamedAction.description,
actions: [{ ...namespaceToNamedAction, notApplicableReason: info.error }] },
{ name: refactorName, description: namedToNamespaceAction.description,
actions: [{ ...namedToNamespaceAction, notApplicableReason: info.error }] }
];
return getOwnValues(actions).map(action => ({
name: refactorName,
description: action.description,
actions: [{ ...action, notApplicableReason: info.error }]
}));
}
return emptyArray;
},
getEditsForAction: function getRefactorEditsToConvertBetweenNamedAndNamespacedImports(context, actionName): RefactorEditInfo {
Debug.assert(actionName === namespaceToNamedAction.name || actionName === namedToNamespaceAction.name, "Unexpected action name");
const info = getImportToConvert(context);
Debug.assert(some(getOwnValues(actions), action => action.name === actionName), "Unexpected action name");
const info = getImportConversionInfo(context);
Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info");
const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, t, info));
return { edits, renameFilename: undefined, renameLocation: undefined };
@@ -49,7 +51,12 @@ namespace ts.refactor {
});
// Can convert imports of the form `import * as m from "m";` or `import d, { x, y } from "m";`.
function getImportToConvert(context: RefactorContext, considerPartialSpans = true): NamedImportBindings | RefactorErrorInfo | undefined {
type ImportConversionInfo =
| { convertTo: ImportKind.Default, import: NamedImports }
| { convertTo: ImportKind.Namespace, import: NamedImports }
| { convertTo: ImportKind.Named, import: NamespaceImport };
function getImportConversionInfo(context: RefactorContext, considerPartialSpans = true): ImportConversionInfo | RefactorErrorInfo | undefined {
const { file } = context;
const span = getRefactorContextSpan(context);
const token = getTokenAtPosition(file, span.start);
@@ -69,16 +76,25 @@ namespace ts.refactor {
return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) };
}
return importClause.namedBindings;
if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) {
return { convertTo: ImportKind.Named, import: importClause.namedBindings };
}
const compilerOptions = context.program.getCompilerOptions();
const shouldUseDefault = getAllowSyntheticDefaultImports(compilerOptions)
&& isExportEqualsModule(importClause.parent.moduleSpecifier, context.program.getTypeChecker());
return shouldUseDefault
? { convertTo: ImportKind.Default, import: importClause.namedBindings }
: { convertTo: ImportKind.Namespace, import: importClause.namedBindings };
}
function doChange(sourceFile: SourceFile, program: Program, changes: textChanges.ChangeTracker, toConvert: NamedImportBindings): void {
function doChange(sourceFile: SourceFile, program: Program, changes: textChanges.ChangeTracker, info: ImportConversionInfo): void {
const checker = program.getTypeChecker();
if (toConvert.kind === SyntaxKind.NamespaceImport) {
doChangeNamespaceToNamed(sourceFile, checker, changes, toConvert, getAllowSyntheticDefaultImports(program.getCompilerOptions()));
if (info.convertTo === ImportKind.Named) {
doChangeNamespaceToNamed(sourceFile, checker, changes, info.import, getAllowSyntheticDefaultImports(program.getCompilerOptions()));
}
else {
doChangeNamedToNamespace(sourceFile, checker, changes, toConvert);
doChangeNamedToNamespaceOrDefault(sourceFile, checker, changes, info.import, info.convertTo === ImportKind.Default);
}
}
@@ -137,7 +153,7 @@ namespace ts.refactor {
return isPropertyAccessExpression(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.expression : propertyAccessOrQualifiedName.left;
}
function doChangeNamedToNamespace(sourceFile: SourceFile, checker: TypeChecker, changes: textChanges.ChangeTracker, toConvert: NamedImports): void {
function doChangeNamedToNamespaceOrDefault(sourceFile: SourceFile, checker: TypeChecker, changes: textChanges.ChangeTracker, toConvert: NamedImports, shouldUseDefault: boolean) {
const importDecl = toConvert.parent.parent;
const { moduleSpecifier } = importDecl;
@@ -188,7 +204,9 @@ namespace ts.refactor {
});
}
changes.replaceNode(sourceFile, toConvert, factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)));
changes.replaceNode(sourceFile, toConvert, shouldUseDefault
? factory.createIdentifier(namespaceImportName)
: factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)));
if (neededNamedImports.size) {
const newNamedImports: ImportSpecifier[] = arrayFrom(neededNamedImports.values()).map(element =>
factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text)));
@@ -196,6 +214,13 @@ namespace ts.refactor {
}
}
function isExportEqualsModule(moduleSpecifier: Expression, checker: TypeChecker) {
const externalModule = checker.resolveExternalModuleName(moduleSpecifier);
if (!externalModule) return false;
const exportEquals = checker.resolveExternalModuleSymbol(externalModule);
return externalModule !== exportEquals;
}
function updateImport(old: ImportDeclaration, defaultImportName: Identifier | undefined, elements: readonly ImportSpecifier[] | undefined): ImportDeclaration {
return factory.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined,
factory.createImportClause(/*isTypeOnly*/ false, defaultImportName, elements && elements.length ? factory.createNamedImports(elements) : undefined), old.moduleSpecifier, /*assertClause*/ undefined);
@@ -1,7 +1,7 @@
/* @internal */
namespace ts.refactor.convertParamsToDestructuredObject {
const refactorName = "Convert parameters to destructured object";
const minimumParameterLength = 2;
const minimumParameterLength = 1;
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object);
const toDestructuredAction = {
+2 -2
View File
@@ -486,8 +486,8 @@ namespace ts.refactor.extractSymbol {
// but a super *method call* simply implies a 'this' reference
if (node.parent.kind === SyntaxKind.CallExpression) {
// Super constructor call
const containingClass = getContainingClass(node)!; // TODO:GH#18217
if (containingClass.pos < span.start || containingClass.end >= (span.start + span.length)) {
const containingClass = getContainingClass(node);
if (containingClass === undefined || containingClass.pos < span.start || containingClass.end >= (span.start + span.length)) {
(errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractSuper));
return true;
}
+14 -5
View File
@@ -144,11 +144,20 @@ namespace ts.refactor {
function visitor(node: Node): true | undefined {
if (isTypeReferenceNode(node)) {
if (isIdentifier(node.typeName)) {
const symbol = checker.resolveName(node.typeName.text, node.typeName, SymbolFlags.TypeParameter, /* excludeGlobals */ true);
const declaration = tryCast(symbol?.declarations?.[0], isTypeParameterDeclaration);
if (declaration) {
if (rangeContainsSkipTrivia(statement, declaration, file) && !rangeContainsSkipTrivia(selection, declaration, file)) {
pushIfUnique(result, declaration);
const typeName = node.typeName;
const symbol = checker.resolveName(typeName.text, typeName, SymbolFlags.TypeParameter, /* excludeGlobals */ true);
for (const decl of symbol?.declarations || emptyArray) {
if (isTypeParameterDeclaration(decl) && decl.getSourceFile() === file) {
// skip extraction if the type node is in the range of the type parameter declaration.
// function foo<T extends { a?: /**/T }>(): void;
if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selection, file)) {
return true;
}
if (rangeContainsSkipTrivia(statement, decl, file) && !rangeContainsSkipTrivia(selection, decl, file)) {
pushIfUnique(result, decl);
break;
}
}
}
}
+44 -13
View File
@@ -299,6 +299,9 @@ namespace ts {
contextualGetAccessorDocumentationComment?: SymbolDisplayPart[];
contextualSetAccessorDocumentationComment?: SymbolDisplayPart[];
contextualGetAccessorTags?: JSDocTagInfo[];
contextualSetAccessorTags?: JSDocTagInfo[];
constructor(flags: SymbolFlags, name: __String) {
this.flags = flags;
this.escapedName = name;
@@ -343,13 +346,11 @@ namespace ts {
switch (context?.kind) {
case SyntaxKind.GetAccessor:
if (!this.contextualGetAccessorDocumentationComment) {
this.contextualGetAccessorDocumentationComment = emptyArray;
this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker);
}
return this.contextualGetAccessorDocumentationComment;
case SyntaxKind.SetAccessor:
if (!this.contextualSetAccessorDocumentationComment) {
this.contextualSetAccessorDocumentationComment = emptyArray;
this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker);
}
return this.contextualSetAccessorDocumentationComment;
@@ -360,11 +361,28 @@ namespace ts {
getJsDocTags(checker?: TypeChecker): JSDocTagInfo[] {
if (this.tags === undefined) {
this.tags = JsDoc.getJsDocTagsFromDeclarations(this.declarations, checker);
this.tags = getJsDocTagsOfDeclarations(this.declarations, checker);
}
return this.tags;
}
getContextualJsDocTags(context: Node | undefined, checker: TypeChecker | undefined): JSDocTagInfo[] {
switch (context?.kind) {
case SyntaxKind.GetAccessor:
if (!this.contextualGetAccessorTags) {
this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker);
}
return this.contextualGetAccessorTags;
case SyntaxKind.SetAccessor:
if (!this.contextualSetAccessorTags) {
this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker);
}
return this.contextualSetAccessorTags;
default:
return this.getJsDocTags(checker);
}
}
}
class TokenObject<TKind extends SyntaxKind> extends TokenOrIdentifierObject implements Token<TKind> {
@@ -564,10 +582,7 @@ namespace ts {
}
getJsDocTags(): JSDocTagInfo[] {
if (this.jsDocTags === undefined) {
this.jsDocTags = this.declaration ? getJsDocTagsOfSignature(this.declaration, this.checker) : [];
}
return this.jsDocTags;
return this.jsDocTags || (this.jsDocTags = getJsDocTagsOfDeclarations(singleElementArray(this.declaration), this.checker));
}
}
@@ -580,12 +595,25 @@ namespace ts {
return getJSDocTags(node).some(tag => tag.tagName.text === "inheritDoc");
}
function getJsDocTagsOfSignature(declaration: Declaration, checker: TypeChecker): JSDocTagInfo[] {
let tags = JsDoc.getJsDocTagsFromDeclarations([declaration], checker);
if (tags.length === 0 || hasJSDocInheritDocTag(declaration)) {
const inheritedTags = findBaseOfDeclaration(checker, declaration, symbol => symbol.declarations?.length === 1 ? symbol.getJsDocTags() : undefined);
if (inheritedTags) {
tags = [...inheritedTags, ...tags];
function getJsDocTagsOfDeclarations(declarations: Declaration[] | undefined, checker: TypeChecker | undefined): JSDocTagInfo[] {
if (!declarations) return emptyArray;
let tags = JsDoc.getJsDocTagsFromDeclarations(declarations, checker);
if (checker && (tags.length === 0 || declarations.some(hasJSDocInheritDocTag))) {
const seenSymbols = new Set<Symbol>();
for (const declaration of declarations) {
const inheritedTags = findBaseOfDeclaration(checker, declaration, symbol => {
if (!seenSymbols.has(symbol)) {
seenSymbols.add(symbol);
if (declaration.kind === SyntaxKind.GetAccessor || declaration.kind === SyntaxKind.SetAccessor) {
return symbol.getContextualJsDocTags(declaration, checker);
}
return symbol.declarations?.length === 1 ? symbol.getJsDocTags() : undefined;
}
});
if (inheritedTags) {
tags = [...inheritedTags, ...tags];
}
}
}
return tags;
@@ -601,6 +629,9 @@ namespace ts {
const inheritedDocs = findBaseOfDeclaration(checker, declaration, symbol => {
if (!seenSymbols.has(symbol)) {
seenSymbols.add(symbol);
if (declaration.kind === SyntaxKind.GetAccessor || declaration.kind === SyntaxKind.SetAccessor) {
return symbol.getContextualDocumentationComment(declaration, checker);
}
return symbol.getDocumentationComment(checker);
}
});
+9 -10
View File
@@ -169,12 +169,12 @@ namespace ts.SignatureHelp {
: { invocation: info.invocation.node, argumentCount: info.argumentCount, argumentIndex: info.argumentIndex };
}
function getArgumentOrParameterListInfo(node: Node, sourceFile: SourceFile): { readonly list: Node, readonly argumentIndex: number, readonly argumentCount: number, readonly argumentsSpan: TextSpan } | undefined {
function getArgumentOrParameterListInfo(node: Node, position: number, sourceFile: SourceFile): { readonly list: Node, readonly argumentIndex: number, readonly argumentCount: number, readonly argumentsSpan: TextSpan } | undefined {
const info = getArgumentOrParameterListAndIndex(node, sourceFile);
if (!info) return undefined;
const { list, argumentIndex } = info;
const argumentCount = getArgumentCount(list);
const argumentCount = getArgumentCount(list, /*ignoreTrailingComma*/ isInString(sourceFile, position, node));
if (argumentIndex !== 0) {
Debug.assertLessThan(argumentIndex, argumentCount);
}
@@ -222,7 +222,7 @@ namespace ts.SignatureHelp {
// Case 3:
// foo<T#, U#>(a#, #b#) -> The token is buried inside a list, and should give signature help
// Find out if 'node' is an argument, a type argument, or neither
const info = getArgumentOrParameterListInfo(node, sourceFile);
const info = getArgumentOrParameterListInfo(node, position, sourceFile);
if (!info) return undefined;
const { list, argumentIndex, argumentCount, argumentsSpan } = info;
const isTypeParameterList = !!parent.typeArguments && parent.typeArguments.pos === list.pos;
@@ -299,8 +299,8 @@ namespace ts.SignatureHelp {
return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;
}
function tryGetParameterInfo(startingToken: Node, _position: number, sourceFile: SourceFile, checker: TypeChecker): ArgumentListInfo | undefined {
const info = getContextualSignatureLocationInfo(startingToken, sourceFile, checker);
function tryGetParameterInfo(startingToken: Node, position: number, sourceFile: SourceFile, checker: TypeChecker): ArgumentListInfo | undefined {
const info = getContextualSignatureLocationInfo(startingToken, sourceFile, position, checker);
if (!info) return undefined;
const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;
@@ -315,7 +315,7 @@ namespace ts.SignatureHelp {
}
interface ContextualSignatureLocationInfo { readonly contextualType: Type; readonly argumentIndex: number; readonly argumentCount: number; readonly argumentsSpan: TextSpan; }
function getContextualSignatureLocationInfo(startingToken: Node, sourceFile: SourceFile, checker: TypeChecker): ContextualSignatureLocationInfo | undefined {
function getContextualSignatureLocationInfo(startingToken: Node, sourceFile: SourceFile, position: number, checker: TypeChecker): ContextualSignatureLocationInfo | undefined {
if (startingToken.kind !== SyntaxKind.OpenParenToken && startingToken.kind !== SyntaxKind.CommaToken) return undefined;
const { parent } = startingToken;
switch (parent.kind) {
@@ -323,7 +323,7 @@ namespace ts.SignatureHelp {
case SyntaxKind.MethodDeclaration:
case SyntaxKind.FunctionExpression:
case SyntaxKind.ArrowFunction:
const info = getArgumentOrParameterListInfo(startingToken, sourceFile);
const info = getArgumentOrParameterListInfo(startingToken, position, sourceFile);
if (!info) return undefined;
const { argumentIndex, argumentCount, argumentsSpan } = info;
const contextualType = isMethodDeclaration(parent) ? checker.getContextualTypeForObjectLiteralElement(parent) : checker.getContextualType(parent as ParenthesizedExpression | FunctionExpression | ArrowFunction);
@@ -372,7 +372,7 @@ namespace ts.SignatureHelp {
return argumentIndex;
}
function getArgumentCount(argumentsList: Node) {
function getArgumentCount(argumentsList: Node, ignoreTrailingComma: boolean) {
// The argument count for a list is normally the number of non-comma children it has.
// For example, if you have "Foo(a,b)" then there will be three children of the arg
// list 'a' '<comma>' 'b'. So, in this case the arg count will be 2. However, there
@@ -387,10 +387,9 @@ namespace ts.SignatureHelp {
const listChildren = argumentsList.getChildren();
let argumentCount = countWhere(listChildren, arg => arg.kind !== SyntaxKind.CommaToken);
if (listChildren.length > 0 && last(listChildren).kind === SyntaxKind.CommaToken) {
if (!ignoreTrailingComma && listChildren.length > 0 && last(listChildren).kind === SyntaxKind.CommaToken) {
argumentCount++;
}
return argumentCount;
}
+37 -5
View File
@@ -41,7 +41,7 @@ namespace ts.SymbolDisplay {
if (typeChecker.isArgumentsSymbol(symbol)) {
return ScriptElementKind.localVariableElement;
}
if (location.kind === SyntaxKind.ThisKeyword && isExpression(location)) {
if (location.kind === SyntaxKind.ThisKeyword && isExpression(location) || isThisInTypeQuery(location)) {
return ScriptElementKind.parameterElement;
}
const flags = getCombinedLocalAndExportSymbolFlags(symbol);
@@ -58,6 +58,8 @@ namespace ts.SymbolDisplay {
return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localVariableElement : ScriptElementKind.variableElement;
}
if (flags & SymbolFlags.Function) return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localFunctionElement : ScriptElementKind.functionElement;
// FIXME: getter and setter use the same symbol. And it is rare to use only setter without getter, so in most cases the symbol always has getter flag.
// So, even when the location is just on the declaration of setter, this function returns getter.
if (flags & SymbolFlags.GetAccessor) return ScriptElementKind.memberGetAccessorElement;
if (flags & SymbolFlags.SetAccessor) return ScriptElementKind.memberSetAccessorElement;
if (flags & SymbolFlags.Method) return ScriptElementKind.memberFunctionElement;
@@ -141,7 +143,7 @@ namespace ts.SymbolDisplay {
const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol);
let symbolKind = semanticMeaning & SemanticMeaning.Value ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : ScriptElementKind.unknown;
let hasAddedSymbolInfo = false;
const isThisExpression = location.kind === SyntaxKind.ThisKeyword && isInExpressionContext(location);
const isThisExpression = location.kind === SyntaxKind.ThisKeyword && isInExpressionContext(location) || isThisInTypeQuery(location);
let type: Type | undefined;
let printer: Printer;
let documentationFromAlias: SymbolDisplayPart[] | undefined;
@@ -154,9 +156,24 @@ namespace ts.SymbolDisplay {
// Class at constructor site need to be shown as constructor apart from property,method, vars
if (symbolKind !== ScriptElementKind.unknown || symbolFlags & SymbolFlags.Class || symbolFlags & SymbolFlags.Alias) {
// If it is accessor they are allowed only if location is at name of the accessor
// If symbol is accessor, they are allowed only if location is at declaration identifier of the accessor
if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) {
symbolKind = ScriptElementKind.memberVariableElement;
const declaration = find(symbol.declarations as ((GetAccessorDeclaration | SetAccessorDeclaration)[]), declaration => declaration.name === location);
if (declaration) {
switch(declaration.kind){
case SyntaxKind.GetAccessor:
symbolKind = ScriptElementKind.memberGetAccessorElement;
break;
case SyntaxKind.SetAccessor:
symbolKind = ScriptElementKind.memberSetAccessorElement;
break;
default:
Debug.assertNever(declaration);
}
}
else {
symbolKind = ScriptElementKind.memberVariableElement;
}
}
let signature: Signature | undefined;
@@ -492,6 +509,8 @@ namespace ts.SymbolDisplay {
// For properties, variables and local vars: show the type
if (symbolKind === ScriptElementKind.memberVariableElement ||
symbolKind === ScriptElementKind.memberGetAccessorElement ||
symbolKind === ScriptElementKind.memberSetAccessorElement ||
symbolKind === ScriptElementKind.jsxAttribute ||
symbolFlags & SymbolFlags.Variable ||
symbolKind === ScriptElementKind.localVariableElement ||
@@ -565,8 +584,21 @@ namespace ts.SymbolDisplay {
}
}
if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) {
const declaration = symbol.valueDeclaration;
const parent = declaration.parent;
if (isIdentifier(declaration.name) && isObjectBindingPattern(parent)) {
const name = getTextOfIdentifierOrLiteral(declaration.name);
const objectType = typeChecker.getTypeAtLocation(parent);
documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], t => {
const prop = t.getProperty(name);
return prop ? prop.getDocumentationComment(typeChecker) : undefined;
}) || emptyArray;
}
}
if (tags.length === 0 && !hasMultipleSignatures) {
tags = symbol.getJsDocTags(typeChecker);
tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
}
if (documentation.length === 0 && documentationFromAlias) {
+29 -13
View File
@@ -339,6 +339,7 @@ namespace ts.textChanges {
this.deletedNodes.push({ sourceFile, node });
}
/** Stop! Consider using `delete` instead, which has logic for deleting nodes from delimited lists. */
public deleteNode(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd = { leadingTriviaOption: LeadingTriviaOption.IncludeAll }): void {
this.deleteRange(sourceFile, getAdjustedRange(sourceFile, node, node, options));
}
@@ -494,29 +495,30 @@ namespace ts.textChanges {
this.insertNodeAt(sourceFile, fnStart, tag, { preserveLeadingWhitespace: false, suffix: this.newLineCharacter + indent });
}
private createJSDocText(sourceFile: SourceFile, node: HasJSDoc) {
const comments = flatMap(node.jsDoc, jsDoc =>
isString(jsDoc.comment) ? factory.createJSDocText(jsDoc.comment) : jsDoc.comment) as JSDocComment[];
const jsDoc = singleOrUndefined(node.jsDoc);
return jsDoc && positionsAreOnSameLine(jsDoc.pos, jsDoc.end, sourceFile) && length(comments) === 0 ? undefined :
factory.createNodeArray(intersperse(comments, factory.createJSDocText("\n")));
}
public replaceJSDocComment(sourceFile: SourceFile, node: HasJSDoc, tags: readonly JSDocTag[]) {
this.insertJsdocCommentBefore(sourceFile, updateJSDocHost(node), factory.createJSDocComment(this.createJSDocText(sourceFile, node), factory.createNodeArray(tags)));
}
public addJSDocTags(sourceFile: SourceFile, parent: HasJSDoc, newTags: readonly JSDocTag[]): void {
const comments = flatMap(parent.jsDoc, j => typeof j.comment === "string" ? factory.createJSDocText(j.comment) : j.comment) as JSDocComment[];
const oldTags = flatMapToMutable(parent.jsDoc, j => j.tags);
const unmergedNewTags = newTags.filter(newTag => !oldTags.some((tag, i) => {
const merged = tryMergeJsdocTags(tag, newTag);
if (merged) oldTags[i] = merged;
return !!merged;
}));
const tags = [...oldTags, ...unmergedNewTags];
const jsDoc = singleOrUndefined(parent.jsDoc);
const comment = jsDoc && positionsAreOnSameLine(jsDoc.pos, jsDoc.end, sourceFile) && !length(comments) ? undefined :
factory.createNodeArray(intersperse(comments, factory.createJSDocText("\n")));
const tag = factory.createJSDocComment(comment, factory.createNodeArray(tags));
const host = updateJSDocHost(parent);
this.insertJsdocCommentBefore(sourceFile, host, tag);
this.replaceJSDocComment(sourceFile, parent, [...oldTags, ...unmergedNewTags]);
}
public filterJSDocTags(sourceFile: SourceFile, parent: HasJSDoc, predicate: (tag: JSDocTag) => boolean): void {
const comments = flatMap(parent.jsDoc, j => typeof j.comment === "string" ? factory.createJSDocText(j.comment) : j.comment) as JSDocComment[];
const oldTags = flatMapToMutable(parent.jsDoc, j => j.tags);
const tag = factory.createJSDocComment(factory.createNodeArray(intersperse(comments, factory.createJSDocText("\n"))), factory.createNodeArray([...(filter(oldTags, predicate) || emptyArray)]));
const host = updateJSDocHost(parent);
this.insertJsdocCommentBefore(sourceFile, host, tag);
this.replaceJSDocComment(sourceFile, parent, filter(flatMapToMutable(parent.jsDoc, j => j.tags), predicate));
}
public replaceRangeWithText(sourceFile: SourceFile, range: TextRange, text: string): void {
@@ -786,6 +788,20 @@ namespace ts.textChanges {
this.insertText(sourceFile, node.getStart(sourceFile), "export ");
}
public insertImportSpecifierAtIndex(sourceFile: SourceFile, importSpecifier: ImportSpecifier, namedImports: NamedImports, index: number) {
const prevSpecifier = namedImports.elements[index - 1];
if (prevSpecifier) {
this.insertNodeInListAfter(sourceFile, prevSpecifier, importSpecifier);
}
else {
this.insertNodeBefore(
sourceFile,
namedImports.elements[0],
importSpecifier,
!positionsAreOnSameLine(namedImports.elements[0].getStart(), namedImports.parent.parent.getStart(), sourceFile));
}
}
/**
* This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range,
* i.e. arguments in arguments lists, parameters in parameter lists etc.
+1
View File
@@ -87,6 +87,7 @@
"codefixes/fixExtendsInterfaceBecomesImplements.ts",
"codefixes/fixForgottenThisPropertyAccess.ts",
"codefixes/fixInvalidJsxCharacters.ts",
"codefixes/fixUnmatchedParameter.ts",
"codefixes/fixUnusedIdentifier.ts",
"codefixes/fixUnreachableCode.ts",
"codefixes/fixUnusedLabel.ts",
+2
View File
@@ -44,6 +44,8 @@ namespace ts {
/* @internal */
getContextualDocumentationComment(context: Node | undefined, checker: TypeChecker | undefined): SymbolDisplayPart[]
getJsDocTags(checker?: TypeChecker): JSDocTagInfo[];
/* @internal */
getContextualJsDocTags(context: Node | undefined, checker: TypeChecker | undefined): JSDocTagInfo[];
}
export interface Type {
+27 -6
View File
@@ -2320,7 +2320,7 @@ namespace ts {
if (text) parts.push(linkTextPart(text));
}
else {
parts.push(linkTextPart(name + (suffix ? "" : " ") + text));
parts.push(linkTextPart(name + (suffix || text.indexOf("://") === 0 ? "" : " ") + text));
}
}
parts.push(linkPart("}"));
@@ -3210,15 +3210,36 @@ namespace ts {
return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray;
}
export function getNameForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTarget | undefined) {
if (!(symbol.flags & SymbolFlags.Transient) && (symbol.escapedName === InternalSymbolName.ExportEquals || symbol.escapedName === InternalSymbolName.Default)) {
// Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase.
return firstDefined(symbol.declarations, d => isExportAssignment(d) ? tryCast(skipOuterExpressions(d.expression), isIdentifier)?.text : undefined)
|| codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget);
export function getNamesForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTarget | undefined): string | [lowercase: string, capitalized: string] {
if (needsNameFromDeclaration(symbol)) {
const fromDeclaration = getDefaultLikeExportNameFromDeclaration(symbol);
if (fromDeclaration) return fromDeclaration;
const fileNameCase = codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, /*preferCapitalized*/ false);
const capitalized = codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, /*preferCapitalized*/ true);
if (fileNameCase === capitalized) return fileNameCase;
return [fileNameCase, capitalized];
}
return symbol.name;
}
export function getNameForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTarget | undefined, preferCapitalized?: boolean) {
if (needsNameFromDeclaration(symbol)) {
// Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase.
return getDefaultLikeExportNameFromDeclaration(symbol)
|| codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized);
}
return symbol.name;
}
function needsNameFromDeclaration(symbol: Symbol) {
return !(symbol.flags & SymbolFlags.Transient) && (symbol.escapedName === InternalSymbolName.ExportEquals || symbol.escapedName === InternalSymbolName.Default);
}
function getDefaultLikeExportNameFromDeclaration(symbol: Symbol) {
return firstDefined(symbol.declarations, d => isExportAssignment(d) ? tryCast(skipOuterExpressions(d.expression), isIdentifier)?.text : undefined);
}
function getSymbolParentOrFail(symbol: Symbol) {
return Debug.checkDefined(
symbol.parent,
-1
View File
@@ -2,7 +2,6 @@
"extends": "../tsconfig-noncomposite-base",
"compilerOptions": {
"outFile": "../../built/local/run.js",
"moduleResolution": "node",
"composite": false,
"declaration": false,
"declarationMap": false,
+10 -6
View File
@@ -393,13 +393,17 @@ oh.no
assert.equal(last!.kind, SyntaxKind.EndOfFileToken);
});
});
describe("getStart of node with JSDoc but no parent pointers", () => {
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
describe("getStart", () => {
it("runs when node with JSDoc but no parent pointers", () => {
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
});
});
describe("missing type parameter in jsDoc doesn't create a 1-element array", () => {
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
describe("parseIsolatedJSDocComment", () => {
it("doesn't create a 1-element array with missing type parameter in jsDoc", () => {
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
});
});
});
}
@@ -234,7 +234,7 @@ namespace ts {
});
assert.equal(program2.structureIsReused, StructureIsReused.Completely);
const program1Diagnostics = program1.getSemanticDiagnostics(program1.getSourceFile("a.ts"));
const program2Diagnostics = program2.getSemanticDiagnostics(program1.getSourceFile("a.ts"));
const program2Diagnostics = program2.getSemanticDiagnostics(program2.getSourceFile("a.ts"));
assert.equal(program1Diagnostics.length, program2Diagnostics.length);
});
@@ -245,7 +245,26 @@ namespace ts {
});
assert.equal(program2.structureIsReused, StructureIsReused.Completely);
const program1Diagnostics = program1.getSemanticDiagnostics(program1.getSourceFile("a.ts"));
const program2Diagnostics = program2.getSemanticDiagnostics(program1.getSourceFile("a.ts"));
const program2Diagnostics = program2.getSemanticDiagnostics(program2.getSourceFile("a.ts"));
assert.equal(program1Diagnostics.length, program2Diagnostics.length);
});
it("successful if change affects a single module of a package", () => {
const files = [
{ name: "/a.ts", text: SourceText.New("", "import {b} from 'b'", "var a = b;") },
{ name: "/node_modules/b/index.d.ts", text: SourceText.New("", "export * from './internal';", "") },
{ name: "/node_modules/b/internal.d.ts", text: SourceText.New("", "", "export const b = 1;") },
{ name: "/node_modules/b/package.json", text: SourceText.New("", "", JSON.stringify({ name: "b", version: "1.2.3" })) },
];
const options: CompilerOptions = { target, moduleResolution: ModuleResolutionKind.NodeJs };
const program1 = newProgram(files, ["/a.ts"], options);
const program2 = updateProgram(program1, ["/a.ts"], options, files => {
files[2].text = files[2].text.updateProgram("export const b = 2;");
});
assert.equal(program2.structureIsReused, StructureIsReused.Completely);
const program1Diagnostics = program1.getSemanticDiagnostics(program1.getSourceFile("a.ts"));
const program2Diagnostics = program2.getSemanticDiagnostics(program2.getSourceFile("a.ts"));
assert.equal(program1Diagnostics.length, program2Diagnostics.length);
});
@@ -418,5 +418,36 @@ declare global {
incrementalScenarios: noChangeOnlyRuns,
baselinePrograms: true
});
verifyTscSerializedIncrementalEdits({
scenario: "incremental",
subScenario: "serializing error chains",
commandLineArgs: ["-p", `src/project`],
fs: () => loadProjectFromFiles({
"/src/project/tsconfig.json": JSON.stringify({
compilerOptions: {
incremental: true,
strict: true,
jsx: "react",
module: "esnext",
},
}),
"/src/project/index.tsx": Utils.dedent`
declare namespace JSX {
interface ElementChildrenAttribute { children: {}; }
interface IntrinsicElements { div: {} }
}
declare var React: any;
declare function Component(props: never): any;
declare function Component(props: { children?: number }): any;
(<Component>
<div />
<div />
</Component>)`
}, `\ninterface ReadonlyArray<T> { readonly length: number }`),
incrementalScenarios: noChangeOnlyRuns,
});
});
}
@@ -85,7 +85,7 @@ namespace ts.projectSystem {
{
codeActions: [
{
description: `Import 'foo' from module "./a"`,
description: `Add import from "./a"`,
changes: [
{
fileName: "/b.ts",
@@ -118,7 +118,7 @@ namespace ts.projectSystem {
{
codeActions: [
{
description: `Import 'foo' from module "./a"`,
description: `Add import from "./a"`,
changes: [
{
fileName: "/b.ts",
@@ -33,7 +33,7 @@ namespace ts.projectSystem {
});
assert.deepEqual<readonly protocol.CodeFixAction[] | undefined>(response, [
{
description: `Import 'foo' from module "foo"`,
description: `Add import from "foo"`,
fixName: "import",
changes: [{
fileName: user.path,
@@ -87,8 +87,8 @@ namespace ts.projectSystem {
// transient symbols are recreated with every new checker.
const programBefore = project.getCurrentProgram()!;
let sigintPropBefore: readonly SymbolExportInfo[] | undefined;
exportMapCache.forEach(bTs.path as Path, (info, name) => {
if (name === "SIGINT") sigintPropBefore = info;
exportMapCache.search(bTs.path as Path, /*preferCapitalized*/ false, returnTrue, (info, symbolName) => {
if (symbolName === "SIGINT") sigintPropBefore = info;
});
assert.ok(sigintPropBefore);
assert.ok(sigintPropBefore![0].symbol.flags & SymbolFlags.Transient);
@@ -113,8 +113,8 @@ namespace ts.projectSystem {
// Get same info from cache again
let sigintPropAfter: readonly SymbolExportInfo[] | undefined;
exportMapCache.forEach(bTs.path as Path, (info, name) => {
if (name === "SIGINT") sigintPropAfter = info;
exportMapCache.search(bTs.path as Path, /*preferCapitalized*/ false, returnTrue, (info, symbolName) => {
if (symbolName === "SIGINT") sigintPropAfter = info;
});
assert.ok(sigintPropAfter);
assert.notEqual(symbolIdBefore, getSymbolId(sigintPropAfter![0].symbol));
+1 -1
View File
@@ -3,7 +3,7 @@
"pretty": true,
"lib": ["es2015.iterable", "es2015.generator", "es5"],
"target": "es5",
"moduleResolution": "classic",
"moduleResolution": "node",
"rootDir": ".",
"declaration": true,
+9 -5
View File
@@ -572,7 +572,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1702,7 +1702,7 @@ declare namespace ts {
readonly name: Identifier;
readonly isTypeOnly: boolean;
}
export interface ExportSpecifier extends NamedDeclaration {
export interface ExportSpecifier extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.ExportSpecifier;
readonly parent: NamedExports;
readonly isTypeOnly: boolean;
@@ -1720,19 +1720,23 @@ declare namespace ts {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
} | ImportSpecifier & {
} | ImportSpecifier & ({
readonly isTypeOnly: true;
} | {
readonly parent: NamedImports & {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
};
} | ExportSpecifier & {
}) | ExportSpecifier & ({
readonly isTypeOnly: true;
} | {
readonly parent: NamedExports & {
readonly parent: ExportDeclaration & {
readonly isTypeOnly: true;
};
};
};
});
/**
* This is either an `export =` or an `export default` declaration.
* Unless `isExportEquals` is set, this node was parsed as an `export default`.
+9 -5
View File
@@ -572,7 +572,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1702,7 +1702,7 @@ declare namespace ts {
readonly name: Identifier;
readonly isTypeOnly: boolean;
}
export interface ExportSpecifier extends NamedDeclaration {
export interface ExportSpecifier extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.ExportSpecifier;
readonly parent: NamedExports;
readonly isTypeOnly: boolean;
@@ -1720,19 +1720,23 @@ declare namespace ts {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
} | ImportSpecifier & {
} | ImportSpecifier & ({
readonly isTypeOnly: true;
} | {
readonly parent: NamedImports & {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
};
} | ExportSpecifier & {
}) | ExportSpecifier & ({
readonly isTypeOnly: true;
} | {
readonly parent: NamedExports & {
readonly parent: ExportDeclaration & {
readonly isTypeOnly: true;
};
};
};
});
/**
* This is either an `export =` or an `export default` declaration.
* Unless `isExportEquals` is set, this node was parsed as an `export default`.
@@ -1,4 +1,4 @@
tests/cases/compiler/baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'?
tests/cases/compiler/baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'Lock'?
tests/cases/compiler/baseCheck.ts(17,53): error TS2554: Expected 2 arguments, but got 1.
tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
@@ -20,8 +20,8 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'.
constructor(x: number) {
super(0, loc);
~~~
!!! error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'?
!!! related TS2728 tests/cases/compiler/baseCheck.ts:2:7: 'ELoc' is declared here.
!!! error TS2552: Cannot find name 'loc'. Did you mean 'Lock'?
!!! related TS2728 /.ts/lib.dom.d.ts:8963:13: 'Lock' is declared here.
}
m() {
@@ -231,11 +231,13 @@ var _loop_11 = function (y) {
else
inc_1 = true;
if (!(use(function () { return y; }), y < 1))
return "break";
return out_y_2 = y, "break";
out_y_2 = y;
};
var inc_1 = false;
var out_y_2, inc_1 = false;
for (var y = 0;;) {
var state_1 = _loop_11(y);
y = out_y_2;
if (state_1 === "break")
break;
}
@@ -244,14 +246,16 @@ var _loop_12 = function (y) {
use(function () { return y; }), ++y;
else
inc_2 = true;
out_y_3 = y;
};
var inc_2 = false;
var out_y_3, inc_2 = false;
for (var y = 0; y < 1;) {
_loop_12(y);
y = out_y_3;
}
var _loop_init_2 = function () {
var y = (use(function () { return y; }), 0);
out_y_2 = y;
out_y_4 = y;
};
var _loop_13 = function (y) {
if (inc_3)
@@ -259,13 +263,15 @@ var _loop_13 = function (y) {
else
inc_3 = true;
if (!(use(function () { return y; }), y < 1))
return out_y_2 = y, "break";
return out_y_4 = y, "break";
use(function () { return y; });
out_y_4 = y;
};
var out_y_2, inc_3 = false;
var out_y_4, inc_3 = false;
_loop_init_2();
for (var y = out_y_2;;) {
for (var y = out_y_4;;) {
var state_2 = _loop_13(y);
y = out_y_4;
if (state_2 === "break")
break;
}
@@ -0,0 +1,23 @@
tests/cases/conformance/jsdoc/0.js(14,20): error TS8024: JSDoc '@param' tag has name 's', but there is no parameter with that name.
==== tests/cases/conformance/jsdoc/0.js (1 errors) ====
// @ts-check
/**
* @param {number=} n
* @param {string} [s]
*/
var x = function foo(n, s) {}
var y;
/**
* @param {boolean!} b
*/
y = function bar(b) {}
/**
* @param {string} s
~
!!! error TS8024: JSDoc '@param' tag has name 's', but there is no parameter with that name.
*/
var one = function (s) { }, two = function (untyped) { };
@@ -0,0 +1,15 @@
=== tests/cases/conformance/jsdoc/test.js ===
/**
* @typedef {(a: string, b: number) => void} Foo
*/
class C {
>C : Symbol(C, Decl(test.js, 0, 0))
/** @type {Foo} */
foo(a, b) {}
>foo : Symbol(C.foo, Decl(test.js, 4, 9))
>a : Symbol(a, Decl(test.js, 6, 8))
>b : Symbol(b, Decl(test.js, 6, 10))
}
@@ -0,0 +1,15 @@
=== tests/cases/conformance/jsdoc/test.js ===
/**
* @typedef {(a: string, b: number) => void} Foo
*/
class C {
>C : C
/** @type {Foo} */
foo(a, b) {}
>foo : (a: string, b: number) => void
>a : string
>b : number
}
@@ -56,8 +56,8 @@ class D {
constructor() {
this[_a] = 0; // Error
}
static { _a = onInit; }
}
_a = onInit;
class E {
[onInit]() { } // Error
}
@@ -2,7 +2,9 @@ tests/cases/compiler/constEnumErrors.ts(1,12): error TS2567: Enum declarations c
tests/cases/compiler/constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
tests/cases/compiler/constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.
tests/cases/compiler/constEnumErrors.ts(14,9): error TS2474: const enum member initializers can only contain literal values and other computed enum values.
tests/cases/compiler/constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'.
tests/cases/compiler/constEnumErrors.ts(15,10): error TS2474: const enum member initializers can only contain literal values and other computed enum values.
tests/cases/compiler/constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'.
tests/cases/compiler/constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal.
tests/cases/compiler/constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal.
tests/cases/compiler/constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal.
@@ -14,7 +16,7 @@ tests/cases/compiler/constEnumErrors.ts(42,9): error TS2477: 'const' enum member
tests/cases/compiler/constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'.
==== tests/cases/compiler/constEnumErrors.ts (14 errors) ====
==== tests/cases/compiler/constEnumErrors.ts (16 errors) ====
const enum E {
~
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
@@ -37,9 +39,13 @@ tests/cases/compiler/constEnumErrors.ts(43,9): error TS2478: 'const' enum member
Y = E1.Z,
~~~~
!!! error TS2474: const enum member initializers can only contain literal values and other computed enum values.
~
!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'.
Y1 = E1["Z"]
~~~~~~~
!!! error TS2474: const enum member initializers can only contain literal values and other computed enum values.
~~~
!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'.
}
const enum E2 {
@@ -0,0 +1,73 @@
=== tests/cases/conformance/salsa/constructorFunctionMethodTypeParameters.js ===
/**
* @template {string} T
* @param {T} t
*/
function Cls(t) {
>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0))
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 4, 13))
this.t = t;
>this.t : Symbol(Cls.t, Decl(constructorFunctionMethodTypeParameters.js, 4, 17))
>this : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0))
>t : Symbol(Cls.t, Decl(constructorFunctionMethodTypeParameters.js, 4, 17))
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 4, 13))
}
/**
* @template {string} V
* @param {T} t
* @param {V} v
* @return {V}
*/
Cls.prototype.topLevelComment = function (t, v) {
>Cls.prototype : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1))
>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0))
>prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --))
>topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1))
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 14, 42))
>v : Symbol(v, Decl(constructorFunctionMethodTypeParameters.js, 14, 44))
return v
>v : Symbol(v, Decl(constructorFunctionMethodTypeParameters.js, 14, 44))
};
Cls.prototype.nestedComment =
>Cls.prototype : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2))
>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0))
>prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --))
>nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2))
/**
* @template {string} U
* @param {T} t
* @param {U} u
* @return {T}
*/
function (t, u) {
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 25, 14))
>u : Symbol(u, Decl(constructorFunctionMethodTypeParameters.js, 25, 16))
return t
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 25, 14))
};
var c = new Cls('a');
>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3))
>Cls : Symbol(Cls, Decl(constructorFunctionMethodTypeParameters.js, 0, 0))
const s = c.topLevelComment('a', 'b');
>s : Symbol(s, Decl(constructorFunctionMethodTypeParameters.js, 30, 5))
>c.topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1))
>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3))
>topLevelComment : Symbol(Cls.topLevelComment, Decl(constructorFunctionMethodTypeParameters.js, 6, 1))
const t = c.nestedComment('a', 'b');
>t : Symbol(t, Decl(constructorFunctionMethodTypeParameters.js, 31, 5))
>c.nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2))
>c : Symbol(c, Decl(constructorFunctionMethodTypeParameters.js, 29, 3))
>nestedComment : Symbol(Cls.nestedComment, Decl(constructorFunctionMethodTypeParameters.js, 16, 2))
@@ -0,0 +1,88 @@
=== tests/cases/conformance/salsa/constructorFunctionMethodTypeParameters.js ===
/**
* @template {string} T
* @param {T} t
*/
function Cls(t) {
>Cls : typeof Cls
>t : T
this.t = t;
>this.t = t : T
>this.t : any
>this : this
>t : any
>t : T
}
/**
* @template {string} V
* @param {T} t
* @param {V} v
* @return {V}
*/
Cls.prototype.topLevelComment = function (t, v) {
>Cls.prototype.topLevelComment = function (t, v) { return v} : <V extends string>(t: T, v: V) => V
>Cls.prototype.topLevelComment : any
>Cls.prototype : any
>Cls : typeof Cls
>prototype : any
>topLevelComment : any
>function (t, v) { return v} : <V extends string>(t: T, v: V) => V
>t : T
>v : V
return v
>v : V
};
Cls.prototype.nestedComment =
>Cls.prototype.nestedComment = /** * @template {string} U * @param {T} t * @param {U} u * @return {T} */ function (t, u) { return t } : <U extends string>(t: T, u: U) => T
>Cls.prototype.nestedComment : any
>Cls.prototype : any
>Cls : typeof Cls
>prototype : any
>nestedComment : any
/**
* @template {string} U
* @param {T} t
* @param {U} u
* @return {T}
*/
function (t, u) {
>function (t, u) { return t } : <U extends string>(t: T, u: U) => T
>t : T
>u : U
return t
>t : T
};
var c = new Cls('a');
>c : Cls<"a">
>new Cls('a') : Cls<"a">
>Cls : typeof Cls
>'a' : "a"
const s = c.topLevelComment('a', 'b');
>s : "b"
>c.topLevelComment('a', 'b') : "b"
>c.topLevelComment : <V extends string>(t: "a", v: V) => V
>c : Cls<"a">
>topLevelComment : <V extends string>(t: "a", v: V) => V
>'a' : "a"
>'b' : "b"
const t = c.nestedComment('a', 'b');
>t : "a"
>c.nestedComment('a', 'b') : "a"
>c.nestedComment : <U extends string>(t: "a", u: U) => "a"
>c : Cls<"a">
>nestedComment : <U extends string>(t: "a", u: U) => "a"
>'a' : "a"
>'b' : "b"
@@ -0,0 +1,108 @@
//// [divergentAccessorsTypes3.ts]
class One {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
get prop2(): string { return ""; }
set prop2(s: string | number) { }
prop3: number;
get prop4(): string { return ""; }
set prop4(s: string | number) { }
}
class Two {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
get prop2(): string { return ""; }
set prop2(s: string) { }
get prop3(): string { return ""; }
set prop3(s: string | boolean) { }
get prop4(): string { return ""; }
set prop4(s: string | boolean) { }
}
declare const u1: One|Two;
u1.prop1 = 42;
u1.prop1 = "hello";
u1.prop2 = 42;
u1.prop2 = "hello";
u1.prop3 = 42;
u1.prop3 = "hello";
u1.prop3 = true;
u1.prop4 = 42;
u1.prop4 = "hello";
u1.prop4 = true;
//// [divergentAccessorsTypes3.js]
var One = /** @class */ (function () {
function One() {
}
Object.defineProperty(One.prototype, "prop1", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(One.prototype, "prop2", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(One.prototype, "prop4", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return One;
}());
var Two = /** @class */ (function () {
function Two() {
}
Object.defineProperty(Two.prototype, "prop1", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Two.prototype, "prop2", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Two.prototype, "prop3", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Two.prototype, "prop4", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return Two;
}());
u1.prop1 = 42;
u1.prop1 = "hello";
u1.prop2 = 42;
u1.prop2 = "hello";
u1.prop3 = 42;
u1.prop3 = "hello";
u1.prop3 = true;
u1.prop4 = 42;
u1.prop4 = "hello";
u1.prop4 = true;
@@ -0,0 +1,116 @@
=== tests/cases/compiler/divergentAccessorsTypes3.ts ===
class One {
>One : Symbol(One, Decl(divergentAccessorsTypes3.ts, 0, 0))
get prop1(): string { return ""; }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36))
set prop1(s: string | number) { }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 2, 12))
get prop2(): string { return ""; }
>prop2 : Symbol(One.prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36))
set prop2(s: string | number) { }
>prop2 : Symbol(One.prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 5, 12))
prop3: number;
>prop3 : Symbol(One.prop3, Decl(divergentAccessorsTypes3.ts, 5, 35))
get prop4(): string { return ""; }
>prop4 : Symbol(One.prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36))
set prop4(s: string | number) { }
>prop4 : Symbol(One.prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 10, 12))
}
class Two {
>Two : Symbol(Two, Decl(divergentAccessorsTypes3.ts, 11, 1))
get prop1(): string { return ""; }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
set prop1(s: string | number) { }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 15, 12))
get prop2(): string { return ""; }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
set prop2(s: string) { }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 18, 12))
get prop3(): string { return ""; }
>prop3 : Symbol(Two.prop3, Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
set prop3(s: string | boolean) { }
>prop3 : Symbol(Two.prop3, Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 21, 12))
get prop4(): string { return ""; }
>prop4 : Symbol(Two.prop4, Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
set prop4(s: string | boolean) { }
>prop4 : Symbol(Two.prop4, Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes3.ts, 24, 12))
}
declare const u1: One|Two;
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>One : Symbol(One, Decl(divergentAccessorsTypes3.ts, 0, 0))
>Two : Symbol(Two, Decl(divergentAccessorsTypes3.ts, 11, 1))
u1.prop1 = 42;
>u1.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36), Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36), Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
u1.prop1 = "hello";
>u1.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36), Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes3.ts, 0, 11), Decl(divergentAccessorsTypes3.ts, 1, 36), Decl(divergentAccessorsTypes3.ts, 13, 11), Decl(divergentAccessorsTypes3.ts, 14, 36))
u1.prop2 = 42;
>u1.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36), Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36), Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
u1.prop2 = "hello";
>u1.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36), Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes3.ts, 2, 35), Decl(divergentAccessorsTypes3.ts, 4, 36), Decl(divergentAccessorsTypes3.ts, 15, 35), Decl(divergentAccessorsTypes3.ts, 17, 36))
u1.prop3 = 42;
>u1.prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
u1.prop3 = "hello";
>u1.prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
u1.prop3 = true;
>u1.prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop3 : Symbol(prop3, Decl(divergentAccessorsTypes3.ts, 5, 35), Decl(divergentAccessorsTypes3.ts, 18, 26), Decl(divergentAccessorsTypes3.ts, 20, 36))
u1.prop4 = 42;
>u1.prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
u1.prop4 = "hello";
>u1.prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
u1.prop4 = true;
>u1.prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
>u1 : Symbol(u1, Decl(divergentAccessorsTypes3.ts, 27, 13))
>prop4 : Symbol(prop4, Decl(divergentAccessorsTypes3.ts, 7, 16), Decl(divergentAccessorsTypes3.ts, 9, 36), Decl(divergentAccessorsTypes3.ts, 21, 36), Decl(divergentAccessorsTypes3.ts, 23, 36))
@@ -0,0 +1,141 @@
=== tests/cases/compiler/divergentAccessorsTypes3.ts ===
class One {
>One : One
get prop1(): string { return ""; }
>prop1 : string
>"" : ""
set prop1(s: string | number) { }
>prop1 : string
>s : string | number
get prop2(): string { return ""; }
>prop2 : string
>"" : ""
set prop2(s: string | number) { }
>prop2 : string
>s : string | number
prop3: number;
>prop3 : number
get prop4(): string { return ""; }
>prop4 : string
>"" : ""
set prop4(s: string | number) { }
>prop4 : string
>s : string | number
}
class Two {
>Two : Two
get prop1(): string { return ""; }
>prop1 : string
>"" : ""
set prop1(s: string | number) { }
>prop1 : string
>s : string | number
get prop2(): string { return ""; }
>prop2 : string
>"" : ""
set prop2(s: string) { }
>prop2 : string
>s : string
get prop3(): string { return ""; }
>prop3 : string
>"" : ""
set prop3(s: string | boolean) { }
>prop3 : string
>s : string | boolean
get prop4(): string { return ""; }
>prop4 : string
>"" : ""
set prop4(s: string | boolean) { }
>prop4 : string
>s : string | boolean
}
declare const u1: One|Two;
>u1 : One | Two
u1.prop1 = 42;
>u1.prop1 = 42 : 42
>u1.prop1 : string | number
>u1 : One | Two
>prop1 : string | number
>42 : 42
u1.prop1 = "hello";
>u1.prop1 = "hello" : "hello"
>u1.prop1 : string | number
>u1 : One | Two
>prop1 : string | number
>"hello" : "hello"
u1.prop2 = 42;
>u1.prop2 = 42 : 42
>u1.prop2 : string | number
>u1 : One | Two
>prop2 : string | number
>42 : 42
u1.prop2 = "hello";
>u1.prop2 = "hello" : "hello"
>u1.prop2 : string | number
>u1 : One | Two
>prop2 : string | number
>"hello" : "hello"
u1.prop3 = 42;
>u1.prop3 = 42 : 42
>u1.prop3 : string | number | boolean
>u1 : One | Two
>prop3 : string | number | boolean
>42 : 42
u1.prop3 = "hello";
>u1.prop3 = "hello" : "hello"
>u1.prop3 : string | number | boolean
>u1 : One | Two
>prop3 : string | number | boolean
>"hello" : "hello"
u1.prop3 = true;
>u1.prop3 = true : true
>u1.prop3 : string | number | boolean
>u1 : One | Two
>prop3 : string | number | boolean
>true : true
u1.prop4 = 42;
>u1.prop4 = 42 : 42
>u1.prop4 : string | number | boolean
>u1 : One | Two
>prop4 : string | number | boolean
>42 : 42
u1.prop4 = "hello";
>u1.prop4 = "hello" : "hello"
>u1.prop4 : string | number | boolean
>u1 : One | Two
>prop4 : string | number | boolean
>"hello" : "hello"
u1.prop4 = true;
>u1.prop4 = true : true
>u1.prop4 : string | number | boolean
>u1 : One | Two
>prop4 : string | number | boolean
>true : true
@@ -0,0 +1,36 @@
tests/cases/compiler/divergentAccessorsTypes4.ts(29,1): error TS2322: Type '"hello"' is not assignable to type '42'.
==== tests/cases/compiler/divergentAccessorsTypes4.ts (1 errors) ====
class One {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
prop2: number;
}
class Two {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | number) { }
get prop2(): string { return ""; }
set prop2(s: string | 42) { }
}
declare const i: One & Two;
// "hello"
i.prop1;
// number | "hello"
i.prop1 = 42;
i.prop1 = "hello";
// never
i.prop2;
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
~~~~~~~
!!! error TS2322: Type '"hello"' is not assignable to type '42'.
@@ -0,0 +1,71 @@
//// [divergentAccessorsTypes4.ts]
class One {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
prop2: number;
}
class Two {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | number) { }
get prop2(): string { return ""; }
set prop2(s: string | 42) { }
}
declare const i: One & Two;
// "hello"
i.prop1;
// number | "hello"
i.prop1 = 42;
i.prop1 = "hello";
// never
i.prop2;
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
//// [divergentAccessorsTypes4.js]
var One = /** @class */ (function () {
function One() {
}
Object.defineProperty(One.prototype, "prop1", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return One;
}());
var Two = /** @class */ (function () {
function Two() {
}
Object.defineProperty(Two.prototype, "prop1", {
get: function () { return "hello"; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Two.prototype, "prop2", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return Two;
}());
// "hello"
i.prop1;
// number | "hello"
i.prop1 = 42;
i.prop1 = "hello";
// never
i.prop2;
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
@@ -0,0 +1,73 @@
=== tests/cases/compiler/divergentAccessorsTypes4.ts ===
class One {
>One : Symbol(One, Decl(divergentAccessorsTypes4.ts, 0, 0))
get prop1(): string { return ""; }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36))
set prop1(s: string | number) { }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes4.ts, 2, 12))
prop2: number;
>prop2 : Symbol(One.prop2, Decl(divergentAccessorsTypes4.ts, 2, 35))
}
class Two {
>Two : Symbol(Two, Decl(divergentAccessorsTypes4.ts, 5, 1))
get prop1(): "hello" { return "hello"; }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
set prop1(s: "hello" | number) { }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
>s : Symbol(s, Decl(divergentAccessorsTypes4.ts, 9, 12))
get prop2(): string { return ""; }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
set prop2(s: string | 42) { }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes4.ts, 12, 12))
}
declare const i: One & Two;
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>One : Symbol(One, Decl(divergentAccessorsTypes4.ts, 0, 0))
>Two : Symbol(Two, Decl(divergentAccessorsTypes4.ts, 5, 1))
// "hello"
i.prop1;
>i.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
// number | "hello"
i.prop1 = 42;
>i.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
i.prop1 = "hello";
>i.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes4.ts, 0, 11), Decl(divergentAccessorsTypes4.ts, 1, 36), Decl(divergentAccessorsTypes4.ts, 7, 11), Decl(divergentAccessorsTypes4.ts, 8, 42))
// never
i.prop2;
>i.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
// 42
i.prop2 = 42;
>i.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
i.prop2 = "hello"; // error
>i.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
>i : Symbol(i, Decl(divergentAccessorsTypes4.ts, 16, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes4.ts, 2, 35), Decl(divergentAccessorsTypes4.ts, 9, 36), Decl(divergentAccessorsTypes4.ts, 11, 36))
@@ -0,0 +1,82 @@
=== tests/cases/compiler/divergentAccessorsTypes4.ts ===
class One {
>One : One
get prop1(): string { return ""; }
>prop1 : string
>"" : ""
set prop1(s: string | number) { }
>prop1 : string
>s : string | number
prop2: number;
>prop2 : number
}
class Two {
>Two : Two
get prop1(): "hello" { return "hello"; }
>prop1 : "hello"
>"hello" : "hello"
set prop1(s: "hello" | number) { }
>prop1 : "hello"
>s : number | "hello"
get prop2(): string { return ""; }
>prop2 : string
>"" : ""
set prop2(s: string | 42) { }
>prop2 : string
>s : string | 42
}
declare const i: One & Two;
>i : One & Two
// "hello"
i.prop1;
>i.prop1 : "hello"
>i : One & Two
>prop1 : "hello"
// number | "hello"
i.prop1 = 42;
>i.prop1 = 42 : 42
>i.prop1 : number | "hello"
>i : One & Two
>prop1 : number | "hello"
>42 : 42
i.prop1 = "hello";
>i.prop1 = "hello" : "hello"
>i.prop1 : number | "hello"
>i : One & Two
>prop1 : number | "hello"
>"hello" : "hello"
// never
i.prop2;
>i.prop2 : never
>i : One & Two
>prop2 : never
// 42
i.prop2 = 42;
>i.prop2 = 42 : 42
>i.prop2 : 42
>i : One & Two
>prop2 : 42
>42 : 42
i.prop2 = "hello"; // error
>i.prop2 = "hello" : "hello"
>i.prop2 : 42
>i : One & Two
>prop2 : 42
>"hello" : "hello"
@@ -0,0 +1,46 @@
tests/cases/compiler/divergentAccessorsTypes5.ts(31,1): error TS2322: Type '42' is not assignable to type '"hello"'.
tests/cases/compiler/divergentAccessorsTypes5.ts(36,1): error TS2322: Type '"hello"' is not assignable to type '42'.
==== tests/cases/compiler/divergentAccessorsTypes5.ts (2 errors) ====
// Not really different from divergentAccessorsTypes4.ts,
// but goes through the deferred type code
class One {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
prop2: number;
}
class Two {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | number) { }
get prop2(): string { return ""; }
set prop2(s: string | 42) { }
}
class Three {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | boolean) { }
get prop2(): string { return ""; }
set prop2(s: string | number | boolean) { }
}
declare const i: One & Two & Three;
// "hello"
i.prop1 = 42; // error
~~~~~~~
!!! error TS2322: Type '42' is not assignable to type '"hello"'.
i.prop1 = "hello";
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
~~~~~~~
!!! error TS2322: Type '"hello"' is not assignable to type '42'.
@@ -0,0 +1,93 @@
//// [divergentAccessorsTypes5.ts]
// Not really different from divergentAccessorsTypes4.ts,
// but goes through the deferred type code
class One {
get prop1(): string { return ""; }
set prop1(s: string | number) { }
prop2: number;
}
class Two {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | number) { }
get prop2(): string { return ""; }
set prop2(s: string | 42) { }
}
class Three {
get prop1(): "hello" { return "hello"; }
set prop1(s: "hello" | boolean) { }
get prop2(): string { return ""; }
set prop2(s: string | number | boolean) { }
}
declare const i: One & Two & Three;
// "hello"
i.prop1 = 42; // error
i.prop1 = "hello";
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
//// [divergentAccessorsTypes5.js]
// Not really different from divergentAccessorsTypes4.ts,
// but goes through the deferred type code
var One = /** @class */ (function () {
function One() {
}
Object.defineProperty(One.prototype, "prop1", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return One;
}());
var Two = /** @class */ (function () {
function Two() {
}
Object.defineProperty(Two.prototype, "prop1", {
get: function () { return "hello"; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Two.prototype, "prop2", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return Two;
}());
var Three = /** @class */ (function () {
function Three() {
}
Object.defineProperty(Three.prototype, "prop1", {
get: function () { return "hello"; },
set: function (s) { },
enumerable: false,
configurable: true
});
Object.defineProperty(Three.prototype, "prop2", {
get: function () { return ""; },
set: function (s) { },
enumerable: false,
configurable: true
});
return Three;
}());
// "hello"
i.prop1 = 42; // error
i.prop1 = "hello";
// 42
i.prop2 = 42;
i.prop2 = "hello"; // error
@@ -0,0 +1,83 @@
=== tests/cases/compiler/divergentAccessorsTypes5.ts ===
// Not really different from divergentAccessorsTypes4.ts,
// but goes through the deferred type code
class One {
>One : Symbol(One, Decl(divergentAccessorsTypes5.ts, 0, 0))
get prop1(): string { return ""; }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36))
set prop1(s: string | number) { }
>prop1 : Symbol(One.prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes5.ts, 5, 12))
prop2: number;
>prop2 : Symbol(One.prop2, Decl(divergentAccessorsTypes5.ts, 5, 35))
}
class Two {
>Two : Symbol(Two, Decl(divergentAccessorsTypes5.ts, 8, 1))
get prop1(): "hello" { return "hello"; }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42))
set prop1(s: "hello" | number) { }
>prop1 : Symbol(Two.prop1, Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42))
>s : Symbol(s, Decl(divergentAccessorsTypes5.ts, 12, 12))
get prop2(): string { return ""; }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36))
set prop2(s: string | 42) { }
>prop2 : Symbol(Two.prop2, Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes5.ts, 15, 12))
}
class Three {
>Three : Symbol(Three, Decl(divergentAccessorsTypes5.ts, 17, 1))
get prop1(): "hello" { return "hello"; }
>prop1 : Symbol(Three.prop1, Decl(divergentAccessorsTypes5.ts, 19, 13), Decl(divergentAccessorsTypes5.ts, 20, 42))
set prop1(s: "hello" | boolean) { }
>prop1 : Symbol(Three.prop1, Decl(divergentAccessorsTypes5.ts, 19, 13), Decl(divergentAccessorsTypes5.ts, 20, 42))
>s : Symbol(s, Decl(divergentAccessorsTypes5.ts, 21, 12))
get prop2(): string { return ""; }
>prop2 : Symbol(Three.prop2, Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
set prop2(s: string | number | boolean) { }
>prop2 : Symbol(Three.prop2, Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
>s : Symbol(s, Decl(divergentAccessorsTypes5.ts, 24, 12))
}
declare const i: One & Two & Three;
>i : Symbol(i, Decl(divergentAccessorsTypes5.ts, 27, 13))
>One : Symbol(One, Decl(divergentAccessorsTypes5.ts, 0, 0))
>Two : Symbol(Two, Decl(divergentAccessorsTypes5.ts, 8, 1))
>Three : Symbol(Three, Decl(divergentAccessorsTypes5.ts, 17, 1))
// "hello"
i.prop1 = 42; // error
>i.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36), Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42), Decl(divergentAccessorsTypes5.ts, 19, 13) ... and 1 more)
>i : Symbol(i, Decl(divergentAccessorsTypes5.ts, 27, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36), Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42), Decl(divergentAccessorsTypes5.ts, 19, 13) ... and 1 more)
i.prop1 = "hello";
>i.prop1 : Symbol(prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36), Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42), Decl(divergentAccessorsTypes5.ts, 19, 13) ... and 1 more)
>i : Symbol(i, Decl(divergentAccessorsTypes5.ts, 27, 13))
>prop1 : Symbol(prop1, Decl(divergentAccessorsTypes5.ts, 3, 11), Decl(divergentAccessorsTypes5.ts, 4, 36), Decl(divergentAccessorsTypes5.ts, 10, 11), Decl(divergentAccessorsTypes5.ts, 11, 42), Decl(divergentAccessorsTypes5.ts, 19, 13) ... and 1 more)
// 42
i.prop2 = 42;
>i.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes5.ts, 5, 35), Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36), Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
>i : Symbol(i, Decl(divergentAccessorsTypes5.ts, 27, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes5.ts, 5, 35), Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36), Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
i.prop2 = "hello"; // error
>i.prop2 : Symbol(prop2, Decl(divergentAccessorsTypes5.ts, 5, 35), Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36), Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
>i : Symbol(i, Decl(divergentAccessorsTypes5.ts, 27, 13))
>prop2 : Symbol(prop2, Decl(divergentAccessorsTypes5.ts, 5, 35), Decl(divergentAccessorsTypes5.ts, 12, 36), Decl(divergentAccessorsTypes5.ts, 14, 36), Decl(divergentAccessorsTypes5.ts, 21, 37), Decl(divergentAccessorsTypes5.ts, 23, 36))
@@ -0,0 +1,93 @@
=== tests/cases/compiler/divergentAccessorsTypes5.ts ===
// Not really different from divergentAccessorsTypes4.ts,
// but goes through the deferred type code
class One {
>One : One
get prop1(): string { return ""; }
>prop1 : string
>"" : ""
set prop1(s: string | number) { }
>prop1 : string
>s : string | number
prop2: number;
>prop2 : number
}
class Two {
>Two : Two
get prop1(): "hello" { return "hello"; }
>prop1 : "hello"
>"hello" : "hello"
set prop1(s: "hello" | number) { }
>prop1 : "hello"
>s : number | "hello"
get prop2(): string { return ""; }
>prop2 : string
>"" : ""
set prop2(s: string | 42) { }
>prop2 : string
>s : string | 42
}
class Three {
>Three : Three
get prop1(): "hello" { return "hello"; }
>prop1 : "hello"
>"hello" : "hello"
set prop1(s: "hello" | boolean) { }
>prop1 : "hello"
>s : boolean | "hello"
get prop2(): string { return ""; }
>prop2 : string
>"" : ""
set prop2(s: string | number | boolean) { }
>prop2 : string
>s : string | number | boolean
}
declare const i: One & Two & Three;
>i : One & Two & Three
// "hello"
i.prop1 = 42; // error
>i.prop1 = 42 : 42
>i.prop1 : "hello"
>i : One & Two & Three
>prop1 : "hello"
>42 : 42
i.prop1 = "hello";
>i.prop1 = "hello" : "hello"
>i.prop1 : "hello"
>i : One & Two & Three
>prop1 : "hello"
>"hello" : "hello"
// 42
i.prop2 = 42;
>i.prop2 = 42 : 42
>i.prop2 : 42
>i : One & Two & Three
>prop2 : 42
>42 : 42
i.prop2 = "hello"; // error
>i.prop2 = "hello" : "hello"
>i.prop2 : 42
>i : One & Two & Three
>prop2 : 42
>"hello" : "hello"
@@ -0,0 +1,33 @@
tests/cases/compiler/enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo'.
tests/cases/compiler/enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo'.
tests/cases/compiler/enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo'.
tests/cases/compiler/enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo'.
tests/cases/compiler/enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo'.
==== tests/cases/compiler/enumBasics2.ts (5 errors) ====
enum Foo {
a = 2,
b = 3,
x = a.b, // should error
~
!!! error TS2339: Property 'b' does not exist on type 'Foo'.
y = b.a, // should error
~
!!! error TS2339: Property 'a' does not exist on type 'Foo'.
z = y.x * a.x, // should error
~
!!! error TS2339: Property 'x' does not exist on type 'Foo'.
~
!!! error TS2339: Property 'x' does not exist on type 'Foo'.
}
enum Bar {
a = (1).valueOf(), // ok
b = Foo.a, // ok
c = Foo.a.valueOf(), // ok
d = Foo.a.a, // should error
~
!!! error TS2339: Property 'a' does not exist on type 'Foo'.
}
+33
View File
@@ -0,0 +1,33 @@
//// [enumBasics2.ts]
enum Foo {
a = 2,
b = 3,
x = a.b, // should error
y = b.a, // should error
z = y.x * a.x, // should error
}
enum Bar {
a = (1).valueOf(), // ok
b = Foo.a, // ok
c = Foo.a.valueOf(), // ok
d = Foo.a.a, // should error
}
//// [enumBasics2.js]
var Foo;
(function (Foo) {
Foo[Foo["a"] = 2] = "a";
Foo[Foo["b"] = 3] = "b";
Foo[Foo["x"] = Foo.a.b] = "x";
Foo[Foo["y"] = Foo.b.a] = "y";
Foo[Foo["z"] = Foo.y.x * Foo.a.x] = "z";
})(Foo || (Foo = {}));
var Bar;
(function (Bar) {
Bar[Bar["a"] = (1).valueOf()] = "a";
Bar[Bar["b"] = 2] = "b";
Bar[Bar["c"] = Foo.a.valueOf()] = "c";
Bar[Bar["d"] = Foo.a.a] = "d";
})(Bar || (Bar = {}));
@@ -0,0 +1,53 @@
=== tests/cases/compiler/enumBasics2.ts ===
enum Foo {
>Foo : Symbol(Foo, Decl(enumBasics2.ts, 0, 0))
a = 2,
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
b = 3,
>b : Symbol(Foo.b, Decl(enumBasics2.ts, 1, 8))
x = a.b, // should error
>x : Symbol(Foo.x, Decl(enumBasics2.ts, 2, 8))
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
y = b.a, // should error
>y : Symbol(Foo.y, Decl(enumBasics2.ts, 3, 10))
>b : Symbol(Foo.b, Decl(enumBasics2.ts, 1, 8))
z = y.x * a.x, // should error
>z : Symbol(Foo.z, Decl(enumBasics2.ts, 4, 10))
>y : Symbol(Foo.y, Decl(enumBasics2.ts, 3, 10))
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
}
enum Bar {
>Bar : Symbol(Bar, Decl(enumBasics2.ts, 6, 1))
a = (1).valueOf(), // ok
>a : Symbol(Bar.a, Decl(enumBasics2.ts, 8, 10))
>(1).valueOf : Symbol(Number.valueOf, Decl(lib.es5.d.ts, --, --))
>valueOf : Symbol(Number.valueOf, Decl(lib.es5.d.ts, --, --))
b = Foo.a, // ok
>b : Symbol(Bar.b, Decl(enumBasics2.ts, 9, 20))
>Foo.a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
>Foo : Symbol(Foo, Decl(enumBasics2.ts, 0, 0))
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
c = Foo.a.valueOf(), // ok
>c : Symbol(Bar.c, Decl(enumBasics2.ts, 10, 12))
>Foo.a.valueOf : Symbol(Number.valueOf, Decl(lib.es5.d.ts, --, --))
>Foo.a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
>Foo : Symbol(Foo, Decl(enumBasics2.ts, 0, 0))
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
>valueOf : Symbol(Number.valueOf, Decl(lib.es5.d.ts, --, --))
d = Foo.a.a, // should error
>d : Symbol(Bar.d, Decl(enumBasics2.ts, 11, 22))
>Foo.a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
>Foo : Symbol(Foo, Decl(enumBasics2.ts, 0, 0))
>a : Symbol(Foo.a, Decl(enumBasics2.ts, 0, 10))
}
@@ -0,0 +1,70 @@
=== tests/cases/compiler/enumBasics2.ts ===
enum Foo {
>Foo : Foo
a = 2,
>a : Foo
>2 : 2
b = 3,
>b : Foo
>3 : 3
x = a.b, // should error
>x : Foo
>a.b : any
>a : Foo
>b : any
y = b.a, // should error
>y : Foo
>b.a : any
>b : Foo
>a : any
z = y.x * a.x, // should error
>z : Foo
>y.x * a.x : number
>y.x : any
>y : Foo
>x : any
>a.x : any
>a : Foo
>x : any
}
enum Bar {
>Bar : Bar
a = (1).valueOf(), // ok
>a : Bar
>(1).valueOf() : number
>(1).valueOf : () => number
>(1) : 1
>1 : 1
>valueOf : () => number
b = Foo.a, // ok
>b : Bar
>Foo.a : Foo
>Foo : typeof Foo
>a : Foo
c = Foo.a.valueOf(), // ok
>c : Bar
>Foo.a.valueOf() : number
>Foo.a.valueOf : () => number
>Foo.a : Foo
>Foo : typeof Foo
>a : Foo
>valueOf : () => number
d = Foo.a.a, // should error
>d : Bar
>Foo.a.a : any
>Foo.a : Foo
>Foo : typeof Foo
>a : Foo
>a : any
}
@@ -0,0 +1,27 @@
tests/cases/compiler/enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1'.
tests/cases/compiler/enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1'.
==== tests/cases/compiler/enumBasics3.ts (2 errors) ====
module M {
export namespace N {
export enum E1 {
a = 1,
b = a.a, // should error
~
!!! error TS2339: Property 'a' does not exist on type 'E1'.
}
}
}
module M {
export namespace N {
export enum E2 {
b = M.N.E1.a,
c = M.N.E1.a.a, // should error
~
!!! error TS2339: Property 'a' does not exist on type 'E1'.
}
}
}
+42
View File
@@ -0,0 +1,42 @@
//// [enumBasics3.ts]
module M {
export namespace N {
export enum E1 {
a = 1,
b = a.a, // should error
}
}
}
module M {
export namespace N {
export enum E2 {
b = M.N.E1.a,
c = M.N.E1.a.a, // should error
}
}
}
//// [enumBasics3.js]
var M;
(function (M) {
var N;
(function (N) {
var E1;
(function (E1) {
E1[E1["a"] = 1] = "a";
E1[E1["b"] = E1.a.a] = "b";
})(E1 = N.E1 || (N.E1 = {}));
})(N = M.N || (M.N = {}));
})(M || (M = {}));
(function (M) {
var N;
(function (N) {
var E2;
(function (E2) {
E2[E2["b"] = 1] = "b";
E2[E2["c"] = M.N.E1.a.a] = "c";
})(E2 = N.E2 || (N.E2 = {}));
})(N = M.N || (M.N = {}));
})(M || (M = {}));
@@ -0,0 +1,52 @@
=== tests/cases/compiler/enumBasics3.ts ===
module M {
>M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1))
export namespace N {
>N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
export enum E1 {
>E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22))
a = 1,
>a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
b = a.a, // should error
>b : Symbol(E1.b, Decl(enumBasics3.ts, 3, 12))
>a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
}
}
}
module M {
>M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1))
export namespace N {
>N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
export enum E2 {
>E2 : Symbol(E2, Decl(enumBasics3.ts, 10, 22))
b = M.N.E1.a,
>b : Symbol(E2.b, Decl(enumBasics3.ts, 11, 20))
>M.N.E1.a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
>M.N.E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22))
>M.N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
>M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1))
>N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
>E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22))
>a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
c = M.N.E1.a.a, // should error
>c : Symbol(E2.c, Decl(enumBasics3.ts, 12, 19))
>M.N.E1.a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
>M.N.E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22))
>M.N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
>M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1))
>N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10))
>E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22))
>a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20))
}
}
}
@@ -0,0 +1,57 @@
=== tests/cases/compiler/enumBasics3.ts ===
module M {
>M : typeof M
export namespace N {
>N : typeof N
export enum E1 {
>E1 : E1
a = 1,
>a : E1
>1 : 1
b = a.a, // should error
>b : E1
>a.a : any
>a : E1
>a : any
}
}
}
module M {
>M : typeof M
export namespace N {
>N : typeof N
export enum E2 {
>E2 : E2
b = M.N.E1.a,
>b : E2
>M.N.E1.a : E1
>M.N.E1 : typeof E1
>M.N : typeof N
>M : typeof M
>N : typeof N
>E1 : typeof E1
>a : E1
c = M.N.E1.a.a, // should error
>c : E2
>M.N.E1.a.a : any
>M.N.E1.a : E1
>M.N.E1 : typeof E1
>M.N : typeof N
>M : typeof M
>N : typeof N
>E1 : typeof E1
>a : E1
>a : any
}
}
}
@@ -12,10 +12,10 @@ tests/cases/compiler/extendArray.ts(7,32): error TS2552: Cannot find name '_elem
collect(fn:(e:_element) => _element[]) : any[];
~~~~~~~~
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
!!! related TS2728 /.ts/lib.dom.d.ts:4844:13: 'Element' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:4877:13: 'Element' is declared here.
~~~~~~~~
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
!!! related TS2728 /.ts/lib.dom.d.ts:4844:13: 'Element' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:4877:13: 'Element' is declared here.
}
}
@@ -0,0 +1,165 @@
//// [forAwaitPerIterationBindingDownlevel.ts]
const sleep = (tm: number) => new Promise(resolve => setTimeout(resolve, tm));
async function* gen() {
yield 1;
await sleep(1000);
yield 2;
}
const log = console.log;
(async () => {
for await (const outer of gen()) {
log(`I'm loop ${outer}`);
(async () => {
const inner = outer;
await sleep(2000);
if (inner === outer) {
log(`I'm loop ${inner} and I know I'm loop ${outer}`);
} else {
log(`I'm loop ${inner}, but I think I'm loop ${outer}`);
}
})();
}
})();
//// [forAwaitPerIterationBindingDownlevel.js]
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
var _this = this;
var sleep = function (tm) { return new Promise(function (resolve) { return setTimeout(resolve, tm); }); };
function gen() {
return __asyncGenerator(this, arguments, function gen_1() {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, __await(1)];
case 1: return [4 /*yield*/, _a.sent()];
case 2:
_a.sent();
return [4 /*yield*/, __await(sleep(1000))];
case 3:
_a.sent();
return [4 /*yield*/, __await(2)];
case 4: return [4 /*yield*/, _a.sent()];
case 5:
_a.sent();
return [2 /*return*/];
}
});
});
}
var log = console.log;
(function () { return __awaiter(_this, void 0, void 0, function () {
var _loop_1, _a, _b, e_1_1;
var _this = this;
var e_1, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_d.trys.push([0, 5, 6, 11]);
_loop_1 = function () {
var outer = _b.value;
log("I'm loop ".concat(outer));
(function () { return __awaiter(_this, void 0, void 0, function () {
var inner;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
inner = outer;
return [4 /*yield*/, sleep(2000)];
case 1:
_a.sent();
if (inner === outer) {
log("I'm loop ".concat(inner, " and I know I'm loop ").concat(outer));
}
else {
log("I'm loop ".concat(inner, ", but I think I'm loop ").concat(outer));
}
return [2 /*return*/];
}
});
}); })();
};
_a = __asyncValues(gen());
_d.label = 1;
case 1: return [4 /*yield*/, _a.next()];
case 2:
if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 4];
_loop_1();
_d.label = 3;
case 3: return [3 /*break*/, 1];
case 4: return [3 /*break*/, 11];
case 5:
e_1_1 = _d.sent();
e_1 = { error: e_1_1 };
return [3 /*break*/, 11];
case 6:
_d.trys.push([6, , 9, 10]);
if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 8];
return [4 /*yield*/, _c.call(_a)];
case 7:
_d.sent();
_d.label = 8;
case 8: return [3 /*break*/, 10];
case 9:
if (e_1) throw e_1.error;
return [7 /*endfinally*/];
case 10: return [7 /*endfinally*/];
case 11: return [2 /*return*/];
}
});
}); })();
@@ -0,0 +1,35 @@
//// [functionParameterObjectRestAndInitializers.ts]
// https://github.com/microsoft/TypeScript/issues/47079
function f({a, ...x}, b = a) {
return b;
}
function g({a, ...x}, b = ({a}, b = a) => {}) {
return b;
}
//// [functionParameterObjectRestAndInitializers.js]
// https://github.com/microsoft/TypeScript/issues/47079
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
function f(_a, b) {
var { a } = _a, x = __rest(_a, ["a"]);
if (b === void 0) { b = a; }
return b;
}
function g(_a, b) {
var { a } = _a, x = __rest(_a, ["a"]);
if (b === void 0) { b = ({ a }, b = a) => { }; }
return b;
}

Some files were not shown because too many files have changed in this diff Show More