Merge remote-tracking branch 'upstream/master' into diagnose-accidental-accessor-call

This commit is contained in:
Jacob Bandes-Storch committed 2020-04-29 23:00:16 -07:00
commit fd4eccee6c
506 files changed
+9436 -2623

No files matched your search

+1 -1
View File
@@ -14,6 +14,6 @@ contact_links:
name: "TypeScript FAQ"
url: "https://github.com/microsoft/TypeScript/wiki/FAQ"
-
about: "Please raise issues about the site on it's own repo."
about: "Please raise issues about the site on its own repo."
name: Website
url: "https://github.com/microsoft/TypeScript-Website/issues/new"
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "3.9.0",
"version": "4.0.0",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
+5 -15
View File
@@ -320,16 +320,6 @@ namespace ts {
}
}
function setValueDeclaration(symbol: Symbol, node: Declaration): void {
const { valueDeclaration } = symbol;
if (!valueDeclaration ||
(isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) ||
(valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration))) {
// other kinds of value declarations take precedence over modules and assignment declarations
symbol.valueDeclaration = node;
}
}
// Should not be called on a declaration with a computed property name,
// unless it is a well known Symbol.
function getDeclarationName(node: Declaration): __String | undefined {
@@ -659,7 +649,7 @@ namespace ts {
}
// We create a return control flow graph for IIFEs and constructors. For constructors
// we use the return control flow graph in strict property initialization checks.
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor ? createBranchLabel() : undefined;
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor || (isInJSFile && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression)) ? createBranchLabel() : undefined;
currentExceptionTarget = undefined;
currentBreakTarget = undefined;
currentContinueTarget = undefined;
@@ -680,8 +670,8 @@ namespace ts {
if (currentReturnTarget) {
addAntecedent(currentReturnTarget, currentFlow);
currentFlow = finishFlowLabel(currentReturnTarget);
if (node.kind === SyntaxKind.Constructor) {
(<ConstructorDeclaration>node).returnFlowNode = currentFlow;
if (node.kind === SyntaxKind.Constructor || (isInJSFile && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression))) {
(<FunctionLikeDeclaration>node).returnFlowNode = currentFlow;
}
}
if (!isIIFE) {
@@ -2974,7 +2964,7 @@ namespace ts {
function bindSpecialPropertyAssignment(node: BindablePropertyAssignmentExpression) {
// Class declarations in Typescript do not allow property declarations
const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression);
const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, container) || lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer) ;
if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) {
return;
}
@@ -3083,7 +3073,7 @@ namespace ts {
}
function bindPropertyAssignment(name: BindableStaticNameExpression, propertyAccess: BindableStaticAccessExpression, isPrototypeProperty: boolean, containerIsClass: boolean) {
let namespaceSymbol = lookupSymbolForPropertyAccess(name);
let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
const isToplevel = isTopLevelNamespaceAssignment(propertyAccess);
namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass);
bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty);
+472 -209
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1721,7 +1721,7 @@ namespace ts {
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected));
}
const textOfKey = getTextOfPropertyName(element.name);
const textOfKey = isComputedNonLiteralName(element.name) ? undefined : getTextOfPropertyName(element.name);
const keyText = textOfKey && unescapeLeadingUnderscores(textOfKey);
const option = keyText && knownOptions ? knownOptions.get(keyText) : undefined;
if (keyText && extraKeyDiagnostics && !option) {
+22
View File
@@ -844,6 +844,28 @@ namespace ts {
return to;
}
/**
* Combines two arrays, values, or undefineds into the smallest container that can accommodate the resulting set:
*
* ```
* undefined -> undefined -> undefined
* T -> undefined -> T
* T -> T -> T[]
* T[] -> undefined -> T[] (no-op)
* T[] -> T -> T[] (append)
* T[] -> T[] -> T[] (concatenate)
* ```
*/
export function combine<T>(xs: T | readonly T[] | undefined, ys: T | readonly T[] | undefined): T | readonly T[] | undefined;
export function combine<T>(xs: T | T[] | undefined, ys: T | T[] | undefined): T | T[] | undefined;
export function combine<T>(xs: T | T[] | undefined, ys: T | T[] | undefined) {
if (xs === undefined) return ys;
if (ys === undefined) return xs;
if (isArray(xs)) return isArray(ys) ? concatenate(xs, ys) : append(xs, ys);
if (isArray(ys)) return append(ys, xs);
return [xs, ys];
}
/**
* Gets the actual offset into an array for a relative offset. Negative offsets indicate a
* position offset from the end of the array.
+1 -1
View File
@@ -1,7 +1,7 @@
namespace ts {
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
// If changing the text in this section, be sure to test `configurePrerelease` too.
export const versionMajorMinor = "3.9";
export const versionMajorMinor = "4.0";
/** The version of the TypeScript compiler release */
export const version = `${versionMajorMinor}.0-dev`;
+19 -3
View File
@@ -1477,11 +1477,11 @@
"category": "Error",
"code": 2371
},
"Parameter '{0}' cannot be referenced in its initializer.": {
"Parameter '{0}' cannot reference itself.": {
"category": "Error",
"code": 2372
},
"Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.": {
"Parameter '{0}' cannot reference identifier '{1}' declared after it.": {
"category": "Error",
"code": 2373
},
@@ -2963,6 +2963,10 @@
"category": "Error",
"code": 2789
},
"The operand of a 'delete' operator must be optional.": {
"category": "Error",
"code": 2790
},
"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",
@@ -4384,9 +4388,17 @@
"category": "Error",
"code": 6231
},
"Declaration augments declaration in another file. This cannot be serialized.": {
"category": "Error",
"code": 6232
},
"This is the declaration being augmented. Consider moving the augmenting declaration into the same file.": {
"category": "Error",
"code": 6233
},
"This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?": {
"category": "Message",
"code": 6232
"code": 6234
},
"Projects to reference": {
@@ -5741,5 +5753,9 @@
"The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.": {
"category": "Error",
"code": 18032
},
"Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.": {
"category": "Error",
"code": 18033
}
}
+25 -10
View File
@@ -664,6 +664,7 @@ namespace ts {
getSymbolOfExternalModuleSpecifier: notImplemented,
isBindingCapturedByNode: notImplemented,
getDeclarationStatementsForSourceFile: notImplemented,
isImportRequiredByAugmentation: notImplemented,
};
/*@internal*/
@@ -2365,16 +2366,10 @@ namespace ts {
function emitParenthesizedExpression(node: ParenthesizedExpression) {
const openParenPos = emitTokenWithComment(SyntaxKind.OpenParenToken, node.pos, writePunctuation, node);
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(node, [node.expression], ListFormat.None);
if (leadingNewlines) {
writeLinesAndIndent(leadingNewlines, /*writeLinesIfNotIndenting*/ false);
}
const indented = writeLineSeparatorsAndIndentBefore(node.expression, node);
emitExpression(node.expression);
const trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(node, [node.expression], ListFormat.None);
if (trailingNewlines) {
writeLine(trailingNewlines);
}
decreaseIndentIf(leadingNewlines);
writeLineSeparatorsAfter(node.expression, node);
decreaseIndentIf(indented);
emitTokenWithComment(SyntaxKind.CloseParenToken, node.expression ? node.expression.end : openParenPos, writePunctuation, node);
}
@@ -3292,12 +3287,15 @@ namespace ts {
writePunctuation("<");
if (isJsxOpeningElement(node)) {
const indented = writeLineSeparatorsAndIndentBefore(node.tagName, node);
emitJsxTagName(node.tagName);
emitTypeArguments(node, node.typeArguments);
if (node.attributes.properties && node.attributes.properties.length > 0) {
writeSpace();
}
emit(node.attributes);
writeLineSeparatorsAfter(node.attributes, node);
decreaseIndentIf(indented);
}
writePunctuation(">");
@@ -4132,7 +4130,7 @@ namespace ts {
if (closingLineTerminatorCount) {
writeLine(closingLineTerminatorCount);
}
else if (format & ListFormat.SpaceBetweenBraces) {
else if (format & (ListFormat.SpaceAfterList | ListFormat.SpaceBetweenBraces)) {
writeSpace();
}
}
@@ -4301,6 +4299,7 @@ namespace ts {
return getEffectiveLines(
includeComments => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(
firstChild.pos,
parentNode.pos,
currentSourceFile!,
includeComments));
}
@@ -4358,6 +4357,7 @@ namespace ts {
return getEffectiveLines(
includeComments => getLinesBetweenPositionAndNextNonWhitespaceCharacter(
lastChild.end,
parentNode.end,
currentSourceFile!,
includeComments));
}
@@ -4397,6 +4397,21 @@ namespace ts {
return lines;
}
function writeLineSeparatorsAndIndentBefore(node: Node, parent: Node): boolean {
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, [node], ListFormat.None);
if (leadingNewlines) {
writeLinesAndIndent(leadingNewlines, /*writeLinesIfNotIndenting*/ false);
}
return !!leadingNewlines;
}
function writeLineSeparatorsAfter(node: Node, parent: Node) {
const trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(parent, [node], ListFormat.None);
if (trailingNewlines) {
writeLine(trailingNewlines);
}
}
function synthesizedNodeStartsOnNewLine(node: Node, format: ListFormat) {
if (nodeIsSynthesized(node)) {
const startsOnNewLine = getStartsOnNewLine(node);
+8 -5
View File
@@ -4,11 +4,14 @@ namespace ts {
enableEmitNotification: noop,
enableSubstitution: noop,
endLexicalEnvironment: returnUndefined,
getCompilerOptions: notImplemented,
getCompilerOptions: () => ({}),
getEmitHost: notImplemented,
getEmitResolver: notImplemented,
setLexicalEnvironmentFlags: noop,
getLexicalEnvironmentFlags: () => 0,
hoistFunctionDeclaration: noop,
hoistVariableDeclaration: noop,
addInitializationStatement: noop,
isEmitNotificationEnabled: notImplemented,
isSubstitutionEnabled: notImplemented,
onEmitNode: noop,
@@ -852,13 +855,13 @@ namespace ts {
* This function needs to be called whenever we transform the statement
* list of a source file, namespace, or function-like body.
*/
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number, visitor?: (node: Node) => VisitResult<Node>): number;
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number | undefined, visitor?: (node: Node) => VisitResult<Node>): number | undefined;
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number | undefined, visitor?: (node: Node) => VisitResult<Node>): number | undefined {
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number, visitor?: (node: Node) => VisitResult<Node>, filter?: (node: Node) => boolean): number;
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number | undefined, visitor?: (node: Node) => VisitResult<Node>, filter?: (node: Node) => boolean): number | undefined;
export function addCustomPrologue(target: Statement[], source: readonly Statement[], statementOffset: number | undefined, visitor?: (node: Node) => VisitResult<Node>, filter: (node: Node) => boolean = returnTrue): number | undefined {
const numStatements = source.length;
while (statementOffset !== undefined && statementOffset < numStatements) {
const statement = source[statementOffset];
if (getEmitFlags(statement) & EmitFlags.CustomPrologue) {
if (getEmitFlags(statement) & EmitFlags.CustomPrologue && filter(statement)) {
append(target, visitor ? visitNode(statement, visitor, isStatement) : statement);
}
else {
+56 -1
View File
@@ -148,8 +148,12 @@ namespace ts {
const enabledSyntaxKindFeatures = new Array<SyntaxKindFeatureFlags>(SyntaxKind.Count);
let lexicalEnvironmentVariableDeclarations: VariableDeclaration[];
let lexicalEnvironmentFunctionDeclarations: FunctionDeclaration[];
let lexicalEnvironmentStatements: Statement[];
let lexicalEnvironmentFlags = LexicalEnvironmentFlags.None;
let lexicalEnvironmentVariableDeclarationsStack: VariableDeclaration[][] = [];
let lexicalEnvironmentFunctionDeclarationsStack: FunctionDeclaration[][] = [];
let lexicalEnvironmentStatementsStack: Statement[][] = [];
let lexicalEnvironmentFlagsStack: LexicalEnvironmentFlags[] = [];
let lexicalEnvironmentStackOffset = 0;
let lexicalEnvironmentSuspended = false;
let emitHelpers: EmitHelper[] | undefined;
@@ -168,8 +172,11 @@ namespace ts {
suspendLexicalEnvironment,
resumeLexicalEnvironment,
endLexicalEnvironment,
setLexicalEnvironmentFlags,
getLexicalEnvironmentFlags,
hoistVariableDeclaration,
hoistFunctionDeclaration,
addInitializationStatement,
requestEmitHelper,
readEmitHelpers,
enableSubstitution,
@@ -313,6 +320,9 @@ namespace ts {
else {
lexicalEnvironmentVariableDeclarations.push(decl);
}
if (lexicalEnvironmentFlags & LexicalEnvironmentFlags.InParameters) {
lexicalEnvironmentFlags |= LexicalEnvironmentFlags.VariablesHoistedInParameters;
}
}
/**
@@ -321,6 +331,7 @@ namespace ts {
function hoistFunctionDeclaration(func: FunctionDeclaration): void {
Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization.");
Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed.");
setEmitFlags(func, EmitFlags.CustomPrologue);
if (!lexicalEnvironmentFunctionDeclarations) {
lexicalEnvironmentFunctionDeclarations = [func];
}
@@ -329,6 +340,21 @@ namespace ts {
}
}
/**
* Adds an initialization statement to the top of the lexical environment.
*/
function addInitializationStatement(node: Statement): void {
Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization.");
Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed.");
setEmitFlags(node, EmitFlags.CustomPrologue);
if (!lexicalEnvironmentStatements) {
lexicalEnvironmentStatements = [node];
}
else {
lexicalEnvironmentStatements.push(node);
}
}
/**
* Starts a new lexical environment. Any existing hoisted variable or function declarations
* are pushed onto a stack, and the related storage variables are reset.
@@ -344,9 +370,13 @@ namespace ts {
// transformation.
lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations;
lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations;
lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentStatements;
lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFlags;
lexicalEnvironmentStackOffset++;
lexicalEnvironmentVariableDeclarations = undefined!;
lexicalEnvironmentFunctionDeclarations = undefined!;
lexicalEnvironmentStatements = undefined!;
lexicalEnvironmentFlags = LexicalEnvironmentFlags.None;
}
/** Suspends the current lexical environment, usually after visiting a parameter list. */
@@ -375,7 +405,9 @@ namespace ts {
Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended.");
let statements: Statement[] | undefined;
if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) {
if (lexicalEnvironmentVariableDeclarations ||
lexicalEnvironmentFunctionDeclarations ||
lexicalEnvironmentStatements) {
if (lexicalEnvironmentFunctionDeclarations) {
statements = [...lexicalEnvironmentFunctionDeclarations];
}
@@ -395,19 +427,42 @@ namespace ts {
statements.push(statement);
}
}
if (lexicalEnvironmentStatements) {
if (!statements) {
statements = [...lexicalEnvironmentStatements];
}
else {
statements = [...statements, ...lexicalEnvironmentStatements];
}
}
}
// Restore the previous lexical environment.
lexicalEnvironmentStackOffset--;
lexicalEnvironmentVariableDeclarations = lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset];
lexicalEnvironmentFunctionDeclarations = lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset];
lexicalEnvironmentStatements = lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset];
lexicalEnvironmentFlags = lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset];
if (lexicalEnvironmentStackOffset === 0) {
lexicalEnvironmentVariableDeclarationsStack = [];
lexicalEnvironmentFunctionDeclarationsStack = [];
lexicalEnvironmentStatementsStack = [];
lexicalEnvironmentFlagsStack = [];
}
return statements;
}
function setLexicalEnvironmentFlags(flags: LexicalEnvironmentFlags, value: boolean): void {
lexicalEnvironmentFlags = value ?
lexicalEnvironmentFlags | flags :
lexicalEnvironmentFlags & ~flags;
}
function getLexicalEnvironmentFlags(): LexicalEnvironmentFlags {
return lexicalEnvironmentFlags;
}
function requestEmitHelper(helper: EmitHelper): void {
Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization.");
Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed.");
+1 -1
View File
@@ -606,7 +606,7 @@ namespace ts {
createConstructor(
/*decorators*/ undefined,
/*modifiers*/ undefined,
parameters,
parameters ?? [],
body
),
constructor || node
+23 -1
View File
@@ -76,7 +76,8 @@ namespace ts {
reportLikelyUnsafeImportRequiredError,
moduleResolverHost: host,
trackReferencedAmbientModule,
trackExternalModuleSymbolOfImportTypeNode
trackExternalModuleSymbolOfImportTypeNode,
reportNonlocalAugmentation
};
let errorNameNode: DeclarationName | undefined;
@@ -190,6 +191,17 @@ namespace ts {
}
}
function reportNonlocalAugmentation(containingFile: SourceFile, parentSymbol: Symbol, symbol: Symbol) {
const primaryDeclaration = find(parentSymbol.declarations, d => getSourceFileOfNode(d) === containingFile)!;
const augmentingDeclarations = filter(symbol.declarations, d => getSourceFileOfNode(d) !== containingFile);
for (const augmentations of augmentingDeclarations) {
context.addDiagnostic(addRelatedInfo(
createDiagnosticForNode(augmentations, Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),
createDiagnosticForNode(primaryDeclaration, Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)
));
}
}
function transformDeclarationsForJS(sourceFile: SourceFile, bundled?: boolean) {
const oldDiag = getSymbolAccessibilityDiagnostic;
getSymbolAccessibilityDiagnostic = (s) => ({
@@ -717,6 +729,16 @@ namespace ts {
rewriteModuleSpecifier(decl, decl.moduleSpecifier)
);
}
// Augmentation of export depends on import
if (resolver.isImportRequiredByAugmentation(decl)) {
return updateImportDeclaration(
decl,
/*decorators*/ undefined,
decl.modifiers,
/*importClause*/ undefined,
rewriteModuleSpecifier(decl, decl.moduleSpecifier)
);
}
// Nothing visible
}
+2
View File
@@ -1853,6 +1853,8 @@ namespace ts {
// ensureUseStrict is false because no new prologue-directive should be added.
// addStandardPrologue will put already-existing directives at the beginning of the target statement-array
statementOffset = addStandardPrologue(prologue, body.statements, /*ensureUseStrict*/ false);
statementOffset = addCustomPrologue(statements, body.statements, statementOffset, visitor, isHoistedFunction);
statementOffset = addCustomPrologue(statements, body.statements, statementOffset, visitor, isHoistedVariableStatement);
}
multiLine = addDefaultValueAssignmentsIfNeeded(statements, node) || multiLine;
+138 -27
View File
@@ -5,6 +5,38 @@ namespace ts {
AsyncMethodsWithSuper = 1 << 0
}
// Facts we track as we traverse the tree
const enum HierarchyFacts {
None = 0,
//
// Ancestor facts
//
HasLexicalThis = 1 << 0,
IterationContainer = 1 << 1,
// NOTE: do not add more ancestor flags without also updating AncestorFactsMask below.
//
// Ancestor masks
//
AncestorFactsMask = (IterationContainer << 1) - 1,
SourceFileIncludes = HasLexicalThis,
SourceFileExcludes = IterationContainer,
StrictModeSourceFileIncludes = None,
ClassOrFunctionIncludes = HasLexicalThis,
ClassOrFunctionExcludes = IterationContainer,
ArrowFunctionIncludes = None,
ArrowFunctionExcludes = ClassOrFunctionExcludes,
IterationStatementIncludes = IterationContainer,
IterationStatementExcludes = None,
}
export function transformES2018(context: TransformationContext) {
const {
resumeLexicalEnvironment,
@@ -26,7 +58,7 @@ namespace ts {
let enabledSubstitutions: ESNextSubstitutionFlags;
let enclosingFunctionFlags: FunctionFlags;
let enclosingSuperContainerFlags: NodeCheckFlags = 0;
let hasLexicalThis: boolean;
let hierarchyFacts: HierarchyFacts = 0;
let currentSourceFile: SourceFile;
let taggedTemplateStringDeclarations: VariableDeclaration[];
@@ -40,6 +72,30 @@ namespace ts {
return chainBundle(transformSourceFile);
function affectsSubtree(excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) {
return hierarchyFacts !== (hierarchyFacts & ~excludeFacts | includeFacts);
}
/**
* Sets the `HierarchyFacts` for this node prior to visiting this node's subtree, returning the facts set prior to modification.
* @param excludeFacts The existing `HierarchyFacts` to reset before visiting the subtree.
* @param includeFacts The new `HierarchyFacts` to set before visiting the subtree.
*/
function enterSubtree(excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) {
const ancestorFacts = hierarchyFacts;
hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & HierarchyFacts.AncestorFactsMask;
return ancestorFacts;
}
/**
* Restores the `HierarchyFacts` for this node's ancestor after visiting this node's
* subtree.
* @param ancestorFacts The `HierarchyFacts` of the ancestor to restore after visiting the subtree.
*/
function exitSubtree(ancestorFacts: HierarchyFacts) {
hierarchyFacts = ancestorFacts;
}
function recordTaggedTemplateString(temp: Identifier) {
taggedTemplateStringDeclarations = append(
taggedTemplateStringDeclarations,
@@ -75,11 +131,11 @@ namespace ts {
return node;
}
function doWithLexicalThis<T, U>(cb: (value: T) => U, value: T) {
if (!hasLexicalThis) {
hasLexicalThis = true;
function doWithHierarchyFacts<T, U>(cb: (value: T) => U, value: T, excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) {
if (affectsSubtree(excludeFacts, includeFacts)) {
const ancestorFacts = enterSubtree(excludeFacts, includeFacts);
const result = cb(value);
hasLexicalThis = false;
exitSubtree(ancestorFacts);
return result;
}
return cb(value);
@@ -112,26 +168,66 @@ namespace ts {
return visitVariableStatement(node as VariableStatement);
case SyntaxKind.VariableDeclaration:
return visitVariableDeclaration(node as VariableDeclaration);
case SyntaxKind.DoStatement:
case SyntaxKind.WhileStatement:
case SyntaxKind.ForInStatement:
return doWithHierarchyFacts(
visitDefault,
node,
HierarchyFacts.IterationStatementExcludes,
HierarchyFacts.IterationStatementIncludes);
case SyntaxKind.ForOfStatement:
return visitForOfStatement(node as ForOfStatement, /*outermostLabeledStatement*/ undefined);
case SyntaxKind.ForStatement:
return visitForStatement(node as ForStatement);
return doWithHierarchyFacts(
visitForStatement,
node as ForStatement,
HierarchyFacts.IterationStatementExcludes,
HierarchyFacts.IterationStatementIncludes);
case SyntaxKind.VoidExpression:
return visitVoidExpression(node as VoidExpression);
case SyntaxKind.Constructor:
return doWithLexicalThis(visitConstructorDeclaration, node as ConstructorDeclaration);
return doWithHierarchyFacts(
visitConstructorDeclaration,
node as ConstructorDeclaration,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.MethodDeclaration:
return doWithLexicalThis(visitMethodDeclaration, node as MethodDeclaration);
return doWithHierarchyFacts(
visitMethodDeclaration,
node as MethodDeclaration,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.GetAccessor:
return doWithLexicalThis(visitGetAccessorDeclaration, node as GetAccessorDeclaration);
return doWithHierarchyFacts(
visitGetAccessorDeclaration,
node as GetAccessorDeclaration,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.SetAccessor:
return doWithLexicalThis(visitSetAccessorDeclaration, node as SetAccessorDeclaration);
return doWithHierarchyFacts(
visitSetAccessorDeclaration,
node as SetAccessorDeclaration,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.FunctionDeclaration:
return doWithLexicalThis(visitFunctionDeclaration, node as FunctionDeclaration);
return doWithHierarchyFacts(
visitFunctionDeclaration,
node as FunctionDeclaration,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.FunctionExpression:
return doWithLexicalThis(visitFunctionExpression, node as FunctionExpression);
return doWithHierarchyFacts(
visitFunctionExpression,
node as FunctionExpression,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
case SyntaxKind.ArrowFunction:
return visitArrowFunction(node as ArrowFunction);
return doWithHierarchyFacts(
visitArrowFunction,
node as ArrowFunction,
HierarchyFacts.ArrowFunctionExcludes,
HierarchyFacts.ArrowFunctionIncludes);
case SyntaxKind.Parameter:
return visitParameter(node as ParameterDeclaration);
case SyntaxKind.ExpressionStatement:
@@ -152,7 +248,11 @@ namespace ts {
return visitEachChild(node, visitor, context);
case SyntaxKind.ClassDeclaration:
case SyntaxKind.ClassExpression:
return doWithLexicalThis(visitDefault, node);
return doWithHierarchyFacts(
visitDefault,
node,
HierarchyFacts.ClassOrFunctionExcludes,
HierarchyFacts.ClassOrFunctionIncludes);
default:
return visitEachChild(node, visitor, context);
}
@@ -231,7 +331,7 @@ namespace ts {
if (statement.kind === SyntaxKind.ForOfStatement && (<ForOfStatement>statement).awaitModifier) {
return visitForOfStatement(<ForOfStatement>statement, node);
}
return restoreEnclosingLabel(visitEachChild(statement, visitor, context), node);
return restoreEnclosingLabel(visitNode(statement, visitor, isStatement, liftToBlock), node);
}
return visitEachChild(node, visitor, context);
}
@@ -311,14 +411,20 @@ namespace ts {
}
function visitSourceFile(node: SourceFile): SourceFile {
const ancestorFacts = enterSubtree(
HierarchyFacts.SourceFileExcludes,
isEffectiveStrictModeSourceFile(node, compilerOptions) ?
HierarchyFacts.StrictModeSourceFileIncludes :
HierarchyFacts.SourceFileIncludes);
exportedVariableStatement = false;
hasLexicalThis = !isEffectiveStrictModeSourceFile(node, compilerOptions);
const visited = visitEachChild(node, visitor, context);
const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [
createVariableStatement(/*modifiers*/ undefined,
createVariableDeclarationList(taggedTemplateStringDeclarations))
]);
return updateSourceFileNode(visited, setTextRange(createNodeArray(statement), node.statements));
const result = updateSourceFileNode(visited, setTextRange(createNodeArray(statement), node.statements));
exitSubtree(ancestorFacts);
return result;
}
function visitTaggedTemplateExpression(node: TaggedTemplateExpression) {
@@ -441,15 +547,15 @@ namespace ts {
* @param node A ForOfStatement.
*/
function visitForOfStatement(node: ForOfStatement, outermostLabeledStatement: LabeledStatement | undefined): VisitResult<Statement> {
const ancestorFacts = enterSubtree(HierarchyFacts.IterationStatementExcludes, HierarchyFacts.IterationStatementIncludes);
if (node.initializer.transformFlags & TransformFlags.ContainsObjectRestOrSpread) {
node = transformForOfStatementWithObjectRest(node);
}
if (node.awaitModifier) {
return transformForAwaitOfStatement(node, outermostLabeledStatement);
}
else {
return restoreEnclosingLabel(visitEachChild(node, visitor, context), outermostLabeledStatement);
}
const result = node.awaitModifier ?
transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) :
restoreEnclosingLabel(visitEachChild(node, visitor, context), outermostLabeledStatement);
exitSubtree(ancestorFacts);
return result;
}
function transformForOfStatementWithObjectRest(node: ForOfStatement) {
@@ -528,7 +634,7 @@ namespace ts {
: createAwait(expression);
}
function transformForAwaitOfStatement(node: ForOfStatement, outermostLabeledStatement: LabeledStatement | undefined) {
function transformForAwaitOfStatement(node: ForOfStatement, outermostLabeledStatement: LabeledStatement | undefined, ancestorFacts: HierarchyFacts) {
const expression = visitNode(node.expression, visitor, isExpression);
const iterator = isIdentifier(expression) ? getGeneratedNameForNode(expression) : createTempVariable(/*recordTempVariable*/ undefined);
const result = isIdentifier(expression) ? getGeneratedNameForNode(iterator) : createTempVariable(/*recordTempVariable*/ undefined);
@@ -544,13 +650,18 @@ namespace ts {
hoistVariableDeclaration(errorRecord);
hoistVariableDeclaration(returnMethod);
// if we are enclosed in an outer loop ensure we reset 'errorRecord' per each iteration
const initializer = ancestorFacts & HierarchyFacts.IterationContainer ?
inlineExpressions([createAssignment(errorRecord, createVoidZero()), callValues]) :
callValues;
const forStatement = setEmitFlags(
setTextRange(
createFor(
/*initializer*/ setEmitFlags(
setTextRange(
createVariableDeclarationList([
setTextRange(createVariableDeclaration(iterator, /*type*/ undefined, callValues), node.expression),
setTextRange(createVariableDeclaration(iterator, /*type*/ undefined, initializer), node.expression),
createVariableDeclaration(result)
]),
node.expression
@@ -809,7 +920,7 @@ namespace ts {
visitLexicalEnvironment(node.body!.statements, visitor, context, statementOffset)
)
),
hasLexicalThis
!!(hierarchyFacts & HierarchyFacts.HasLexicalThis)
)
);
@@ -1115,7 +1226,7 @@ namespace ts {
context.requestEmitHelper(asyncGeneratorHelper);
// Mark this node as originally an async function
(generatorFunc.emitNode || (generatorFunc.emitNode = {} as EmitNode)).flags |= EmitFlags.AsyncFunctionBody;
(generatorFunc.emitNode || (generatorFunc.emitNode = {} as EmitNode)).flags |= EmitFlags.AsyncFunctionBody | EmitFlags.ReuseTempVariableScope;
return createCall(
getUnscopedHelperName("__asyncGenerator"),
+192 -188
View File
@@ -1,209 +1,213 @@
/*@internal*/
namespace ts {
export function transformES2020(context: TransformationContext) {
const {
hoistVariableDeclaration,
} = context;
export function transformES2020(context: TransformationContext) {
const {
hoistVariableDeclaration,
} = context;
return chainBundle(transformSourceFile);
return chainBundle(transformSourceFile);
function transformSourceFile(node: SourceFile) {
if (node.isDeclarationFile) {
return node;
}
function transformSourceFile(node: SourceFile) {
if (node.isDeclarationFile) {
return node;
}
return visitEachChild(node, visitor, context);
}
return visitEachChild(node, visitor, context);
}
function visitor(node: Node): VisitResult<Node> {
if ((node.transformFlags & TransformFlags.ContainsES2020) === 0) {
return node;
}
switch (node.kind) {
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression:
case SyntaxKind.CallExpression:
if (node.flags & NodeFlags.OptionalChain) {
const updated = visitOptionalExpression(node as OptionalChain, /*captureThisArg*/ false, /*isDelete*/ false);
Debug.assertNotNode(updated, isSyntheticReference);
return updated;
}
return visitEachChild(node, visitor, context);
case SyntaxKind.BinaryExpression:
if ((<BinaryExpression>node).operatorToken.kind === SyntaxKind.QuestionQuestionToken) {
return transformNullishCoalescingExpression(<BinaryExpression>node);
}
return visitEachChild(node, visitor, context);
case SyntaxKind.DeleteExpression:
return visitDeleteExpression(node as DeleteExpression);
default:
return visitEachChild(node, visitor, context);
}
}
function visitor(node: Node): VisitResult<Node> {
if ((node.transformFlags & TransformFlags.ContainsES2020) === 0) {
return node;
}
switch (node.kind) {
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression:
case SyntaxKind.CallExpression:
if (node.flags & NodeFlags.OptionalChain) {
const updated = visitOptionalExpression(node as OptionalChain, /*captureThisArg*/ false, /*isDelete*/ false);
Debug.assertNotNode(updated, isSyntheticReference);
return updated;
}
return visitEachChild(node, visitor, context);
case SyntaxKind.BinaryExpression:
if ((<BinaryExpression>node).operatorToken.kind === SyntaxKind.QuestionQuestionToken) {
return transformNullishCoalescingExpression(<BinaryExpression>node);
}
return visitEachChild(node, visitor, context);
case SyntaxKind.DeleteExpression:
return visitDeleteExpression(node as DeleteExpression);
default:
return visitEachChild(node, visitor, context);
}
}
function flattenChain(chain: OptionalChain) {
Debug.assertNotNode(chain, isNonNullChain);
const links: OptionalChain[] = [chain];
while (!chain.questionDotToken && !isTaggedTemplateExpression(chain)) {
chain = cast(skipPartiallyEmittedExpressions(chain.expression), isOptionalChain);
Debug.assertNotNode(chain, isNonNullChain);
links.unshift(chain);
}
return { expression: chain.expression, chain: links };
}
function flattenChain(chain: OptionalChain) {
Debug.assertNotNode(chain, isNonNullChain);
const links: OptionalChain[] = [chain];
while (!chain.questionDotToken && !isTaggedTemplateExpression(chain)) {
chain = cast(skipPartiallyEmittedExpressions(chain.expression), isOptionalChain);
Debug.assertNotNode(chain, isNonNullChain);
links.unshift(chain);
}
return { expression: chain.expression, chain: links };
}
function visitNonOptionalParenthesizedExpression(node: ParenthesizedExpression, captureThisArg: boolean, isDelete: boolean): Expression {
const expression = visitNonOptionalExpression(node.expression, captureThisArg, isDelete);
if (isSyntheticReference(expression)) {
// `(a.b)` -> { expression `((_a = a).b)`, thisArg: `_a` }
// `(a[b])` -> { expression `((_a = a)[b])`, thisArg: `_a` }
return createSyntheticReferenceExpression(updateParen(node, expression.expression), expression.thisArg);
}
return updateParen(node, expression);
}
function visitNonOptionalParenthesizedExpression(node: ParenthesizedExpression, captureThisArg: boolean, isDelete: boolean): Expression {
const expression = visitNonOptionalExpression(node.expression, captureThisArg, isDelete);
if (isSyntheticReference(expression)) {
// `(a.b)` -> { expression `((_a = a).b)`, thisArg: `_a` }
// `(a[b])` -> { expression `((_a = a)[b])`, thisArg: `_a` }
return createSyntheticReferenceExpression(updateParen(node, expression.expression), expression.thisArg);
}
return updateParen(node, expression);
}
function visitNonOptionalPropertyOrElementAccessExpression(node: AccessExpression, captureThisArg: boolean, isDelete: boolean): Expression {
if (isOptionalChain(node)) {
// If `node` is an optional chain, then it is the outermost chain of an optional expression.
return visitOptionalExpression(node, captureThisArg, isDelete);
}
function visitNonOptionalPropertyOrElementAccessExpression(node: AccessExpression, captureThisArg: boolean, isDelete: boolean): Expression {
if (isOptionalChain(node)) {
// If `node` is an optional chain, then it is the outermost chain of an optional expression.
return visitOptionalExpression(node, captureThisArg, isDelete);
}
let expression: Expression = visitNode(node.expression, visitor, isExpression);
Debug.assertNotNode(expression, isSyntheticReference);
let expression: Expression = visitNode(node.expression, visitor, isExpression);
Debug.assertNotNode(expression, isSyntheticReference);
let thisArg: Expression | undefined;
if (captureThisArg) {
if (shouldCaptureInTempVariable(expression)) {
thisArg = createTempVariable(hoistVariableDeclaration);
expression = createAssignment(thisArg, expression);
}
else {
thisArg = expression;
}
}
let thisArg: Expression | undefined;
if (captureThisArg) {
if (shouldCaptureInTempVariable(expression)) {
thisArg = createTempVariable(hoistVariableDeclaration);
expression = createAssignment(thisArg, expression);
// if (inParameterInitializer) tempVariableInParameter = true;
}
else {
thisArg = expression;
}
}
expression = node.kind === SyntaxKind.PropertyAccessExpression
? updatePropertyAccess(node, expression, visitNode(node.name, visitor, isIdentifier))
: updateElementAccess(node, expression, visitNode(node.argumentExpression, visitor, isExpression));
return thisArg ? createSyntheticReferenceExpression(expression, thisArg) : expression;
}
expression = node.kind === SyntaxKind.PropertyAccessExpression
? updatePropertyAccess(node, expression, visitNode(node.name, visitor, isIdentifier))
: updateElementAccess(node, expression, visitNode(node.argumentExpression, visitor, isExpression));
return thisArg ? createSyntheticReferenceExpression(expression, thisArg) : expression;
}
function visitNonOptionalCallExpression(node: CallExpression, captureThisArg: boolean): Expression {
if (isOptionalChain(node)) {
// If `node` is an optional chain, then it is the outermost chain of an optional expression.
return visitOptionalExpression(node, captureThisArg, /*isDelete*/ false);
}
return visitEachChild(node, visitor, context);
}
function visitNonOptionalCallExpression(node: CallExpression, captureThisArg: boolean): Expression {
if (isOptionalChain(node)) {
// If `node` is an optional chain, then it is the outermost chain of an optional expression.
return visitOptionalExpression(node, captureThisArg, /*isDelete*/ false);
}
return visitEachChild(node, visitor, context);
}
function visitNonOptionalExpression(node: Expression, captureThisArg: boolean, isDelete: boolean): Expression {
switch (node.kind) {
case SyntaxKind.ParenthesizedExpression: return visitNonOptionalParenthesizedExpression(node as ParenthesizedExpression, captureThisArg, isDelete);
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression: return visitNonOptionalPropertyOrElementAccessExpression(node as AccessExpression, captureThisArg, isDelete);
case SyntaxKind.CallExpression: return visitNonOptionalCallExpression(node as CallExpression, captureThisArg);
default: return visitNode(node, visitor, isExpression);
}
}
function visitNonOptionalExpression(node: Expression, captureThisArg: boolean, isDelete: boolean): Expression {
switch (node.kind) {
case SyntaxKind.ParenthesizedExpression: return visitNonOptionalParenthesizedExpression(node as ParenthesizedExpression, captureThisArg, isDelete);
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression: return visitNonOptionalPropertyOrElementAccessExpression(node as AccessExpression, captureThisArg, isDelete);
case SyntaxKind.CallExpression: return visitNonOptionalCallExpression(node as CallExpression, captureThisArg);
default: return visitNode(node, visitor, isExpression);
}
}
function visitOptionalExpression(node: OptionalChain, captureThisArg: boolean, isDelete: boolean): Expression {
const { expression, chain } = flattenChain(node);
const left = visitNonOptionalExpression(expression, isCallChain(chain[0]), /*isDelete*/ false);
const leftThisArg = isSyntheticReference(left) ? left.thisArg : undefined;
let leftExpression = isSyntheticReference(left) ? left.expression : left;
let capturedLeft: Expression = leftExpression;
if (shouldCaptureInTempVariable(leftExpression)) {
capturedLeft = createTempVariable(hoistVariableDeclaration);
leftExpression = createAssignment(capturedLeft, leftExpression);
}
let rightExpression = capturedLeft;
let thisArg: Expression | undefined;
for (let i = 0; i < chain.length; i++) {
const segment = chain[i];
switch (segment.kind) {
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression:
if (i === chain.length - 1 && captureThisArg) {
if (shouldCaptureInTempVariable(rightExpression)) {
thisArg = createTempVariable(hoistVariableDeclaration);
rightExpression = createAssignment(thisArg, rightExpression);
}
else {
thisArg = rightExpression;
}
}
rightExpression = segment.kind === SyntaxKind.PropertyAccessExpression
? createPropertyAccess(rightExpression, visitNode(segment.name, visitor, isIdentifier))
: createElementAccess(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression));
break;
case SyntaxKind.CallExpression:
if (i === 0 && leftThisArg) {
rightExpression = createFunctionCall(
rightExpression,
leftThisArg.kind === SyntaxKind.SuperKeyword ? createThis() : leftThisArg,
visitNodes(segment.arguments, visitor, isExpression)
);
}
else {
rightExpression = createCall(
rightExpression,
/*typeArguments*/ undefined,
visitNodes(segment.arguments, visitor, isExpression)
);
}
break;
}
setOriginalNode(rightExpression, segment);
}
function visitOptionalExpression(node: OptionalChain, captureThisArg: boolean, isDelete: boolean): Expression {
const { expression, chain } = flattenChain(node);
const left = visitNonOptionalExpression(expression, isCallChain(chain[0]), /*isDelete*/ false);
const leftThisArg = isSyntheticReference(left) ? left.thisArg : undefined;
let leftExpression = isSyntheticReference(left) ? left.expression : left;
let capturedLeft: Expression = leftExpression;
if (shouldCaptureInTempVariable(leftExpression)) {
capturedLeft = createTempVariable(hoistVariableDeclaration);
leftExpression = createAssignment(capturedLeft, leftExpression);
// if (inParameterInitializer) tempVariableInParameter = true;
}
let rightExpression = capturedLeft;
let thisArg: Expression | undefined;
for (let i = 0; i < chain.length; i++) {
const segment = chain[i];
switch (segment.kind) {
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ElementAccessExpression:
if (i === chain.length - 1 && captureThisArg) {
if (shouldCaptureInTempVariable(rightExpression)) {
thisArg = createTempVariable(hoistVariableDeclaration);
rightExpression = createAssignment(thisArg, rightExpression);
// if (inParameterInitializer) tempVariableInParameter = true;
}
else {
thisArg = rightExpression;
}
}
rightExpression = segment.kind === SyntaxKind.PropertyAccessExpression
? createPropertyAccess(rightExpression, visitNode(segment.name, visitor, isIdentifier))
: createElementAccess(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression));
break;
case SyntaxKind.CallExpression:
if (i === 0 && leftThisArg) {
rightExpression = createFunctionCall(
rightExpression,
leftThisArg.kind === SyntaxKind.SuperKeyword ? createThis() : leftThisArg,
visitNodes(segment.arguments, visitor, isExpression)
);
}
else {
rightExpression = createCall(
rightExpression,
/*typeArguments*/ undefined,
visitNodes(segment.arguments, visitor, isExpression)
);
}
break;
}
setOriginalNode(rightExpression, segment);
}
const target = isDelete
? createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createTrue(), createDelete(rightExpression))
: createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createVoidZero(), rightExpression);
return thisArg ? createSyntheticReferenceExpression(target, thisArg) : target;
}
const target = isDelete
? createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createTrue(), createDelete(rightExpression))
: createConditional(createNotNullCondition(leftExpression, capturedLeft, /*invert*/ true), createVoidZero(), rightExpression);
return thisArg ? createSyntheticReferenceExpression(target, thisArg) : target;
}
function createNotNullCondition(left: Expression, right: Expression, invert?: boolean) {
return createBinary(
createBinary(
left,
createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken),
createNull()
),
createToken(invert ? SyntaxKind.BarBarToken : SyntaxKind.AmpersandAmpersandToken),
createBinary(
right,
createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken),
createVoidZero()
)
);
}
function createNotNullCondition(left: Expression, right: Expression, invert?: boolean) {
return createBinary(
createBinary(
left,
createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken),
createNull()
),
createToken(invert ? SyntaxKind.BarBarToken : SyntaxKind.AmpersandAmpersandToken),
createBinary(
right,
createToken(invert ? SyntaxKind.EqualsEqualsEqualsToken : SyntaxKind.ExclamationEqualsEqualsToken),
createVoidZero()
)
);
}
function transformNullishCoalescingExpression(node: BinaryExpression) {
let left = visitNode(node.left, visitor, isExpression);
let right = left;
if (shouldCaptureInTempVariable(left)) {
right = createTempVariable(hoistVariableDeclaration);
left = createAssignment(right, left);
}
return createConditional(
createNotNullCondition(left, right),
right,
visitNode(node.right, visitor, isExpression),
);
}
function transformNullishCoalescingExpression(node: BinaryExpression) {
let left = visitNode(node.left, visitor, isExpression);
let right = left;
if (shouldCaptureInTempVariable(left)) {
right = createTempVariable(hoistVariableDeclaration);
left = createAssignment(right, left);
// if (inParameterInitializer) tempVariableInParameter = true;
}
return createConditional(
createNotNullCondition(left, right),
right,
visitNode(node.right, visitor, isExpression),
);
}
function shouldCaptureInTempVariable(expression: Expression): boolean {
// don't capture identifiers and `this` in a temporary variable
// `super` cannot be captured as it's no real variable
return !isIdentifier(expression) &&
expression.kind !== SyntaxKind.ThisKeyword &&
expression.kind !== SyntaxKind.SuperKeyword;
}
function shouldCaptureInTempVariable(expression: Expression): boolean {
// don't capture identifiers and `this` in a temporary variable
// `super` cannot be captured as it's no real variable
return !isIdentifier(expression) &&
expression.kind !== SyntaxKind.ThisKeyword &&
expression.kind !== SyntaxKind.SuperKeyword;
}
function visitDeleteExpression(node: DeleteExpression) {
return isOptionalChain(skipParentheses(node.expression))
? setOriginalNode(visitNonOptionalExpression(node.expression, /*captureThisArg*/ false, /*isDelete*/ true), node)
: updateDelete(node, visitNode(node.expression, visitor, isExpression));
}
}
function visitDeleteExpression(node: DeleteExpression) {
return isOptionalChain(skipParentheses(node.expression))
? setOriginalNode(visitNonOptionalExpression(node.expression, /*captureThisArg*/ false, /*isDelete*/ true), node)
: updateDelete(node, visitNode(node.expression, visitor, isExpression));
}
}
}
+1 -1
View File
@@ -1886,7 +1886,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
priority: 2,
text: `
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}`
};
+21 -2
View File
@@ -1107,6 +1107,7 @@ namespace ts {
exclamationToken?: ExclamationToken;
body?: Block | Expression;
/* @internal */ endFlowNode?: FlowNode;
/* @internal */ returnFlowNode?: FlowNode;
}
export type FunctionLikeDeclaration =
@@ -1152,7 +1153,6 @@ namespace ts {
kind: SyntaxKind.Constructor;
parent: ClassLikeDeclaration;
body?: FunctionBody;
/* @internal */ returnFlowNode?: FlowNode;
}
/** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
@@ -4004,6 +4004,7 @@ namespace ts {
getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined;
isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean;
getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker, bundled?: boolean): Statement[] | undefined;
isImportRequiredByAugmentation(decl: ImportDeclaration): boolean;
}
export const enum SymbolFlags {
@@ -4156,6 +4157,7 @@ namespace ts {
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?: TypeOnlyCompatibleAliasDeclaration | false; // First resolved alias declaration that makes the symbol only usable in type constructs
isConstructorDeclaredProperty?: boolean; // Property declared through 'this.x = ...' assignment in constructor
}
/* @internal */
@@ -4322,6 +4324,7 @@ namespace ts {
instantiations?: Map<Type>; // Instantiations of generic type alias (undefined if non-generic)
isExhaustive?: boolean; // Is node an exhaustive switch statement
skipDirectInference?: true; // Flag set by the API `getContextualType` call on a node when `Completions` is passed to force the checker to skip making inferences to a node's type
declarationRequiresScopeChange?: boolean; // Set by `useOuterVariableScopeInParameter` in checker when downlevel emit would change the name resolution scope inside of a parameter.
}
export const enum TypeFlags {
@@ -5993,6 +5996,13 @@ namespace ts {
set?: Expression;
}
/* @internal */
export const enum LexicalEnvironmentFlags {
None = 0,
InParameters = 1 << 0, // currently visiting a parameter list
VariablesHoistedInParameters = 1 << 1 // a temp variable was hoisted while visiting a parameter list
}
export interface TransformationContext {
/*@internal*/ getEmitResolver(): EmitResolver;
/*@internal*/ getEmitHost(): EmitHost;
@@ -6003,6 +6013,9 @@ namespace ts {
/** Starts a new lexical environment. */
startLexicalEnvironment(): void;
/* @internal */ setLexicalEnvironmentFlags(flags: LexicalEnvironmentFlags, value: boolean): void;
/* @internal */ getLexicalEnvironmentFlags(): LexicalEnvironmentFlags;
/** Suspends the current lexical environment, usually after visiting a parameter list. */
suspendLexicalEnvironment(): void;
@@ -6018,6 +6031,10 @@ namespace ts {
/** Hoists a variable declaration to the containing scope. */
hoistVariableDeclaration(node: Identifier): void;
/** Adds an initialization statement to the top of the lexical environment. */
/* @internal */
addInitializationStatement(node: Statement): void;
/** Records a request for a non-scoped emit helper in the current context. */
requestEmitHelper(helper: EmitHelper): void;
@@ -6467,6 +6484,7 @@ namespace ts {
moduleResolverHost?: ModuleSpecifierResolutionHost & { getCommonSourceDirectory(): string };
trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void;
trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void;
reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void;
}
export interface TextSpan {
@@ -6545,6 +6563,7 @@ namespace ts {
NoSpaceIfEmpty = 1 << 19, // If the literal is empty, do not add spaces between braces.
SingleElement = 1 << 20,
SpaceAfterList = 1 << 21, // Add space after list
// Precomputed Formats
Modifiers = SingleLine | SpaceBetweenSiblings | NoInterveningComments,
@@ -6579,7 +6598,7 @@ namespace ts {
CaseOrDefaultClauseStatements = Indented | MultiLine | NoTrailingNewLine | OptionalIfEmpty,
HeritageClauseTypes = CommaDelimited | SpaceBetweenSiblings | SingleLine,
SourceFileStatements = MultiLine | NoTrailingNewLine,
Decorators = MultiLine | Optional,
Decorators = MultiLine | Optional | SpaceAfterList,
TypeArguments = CommaDelimited | SpaceBetweenSiblings | SingleLine | AngleBrackets | Optional,
TypeParameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | AngleBrackets | Optional,
Parameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis,
+43 -8
View File
@@ -876,6 +876,10 @@ namespace ts {
return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : undefined;
}
export function isComputedNonLiteralName(name: PropertyName): boolean {
return name.kind === SyntaxKind.ComputedPropertyName && !isStringOrNumericLiteralLike(name.expression);
}
export function getTextOfPropertyName(name: PropertyName | NoSubstitutionTemplateLiteral): __String {
switch (name.kind) {
case SyntaxKind.Identifier:
@@ -1088,6 +1092,26 @@ namespace ts {
&& (<ExpressionStatement>node).expression.kind === SyntaxKind.StringLiteral;
}
export function isCustomPrologue(node: Statement) {
return !!(getEmitFlags(node) & EmitFlags.CustomPrologue);
}
export function isHoistedFunction(node: Statement) {
return isCustomPrologue(node)
&& isFunctionDeclaration(node);
}
function isHoistedVariable(node: VariableDeclaration) {
return isIdentifier(node.name)
&& !node.initializer;
}
export function isHoistedVariableStatement(node: Statement) {
return isCustomPrologue(node)
&& isVariableStatement(node)
&& every(node.declarationList.declarations, isHoistedVariable);
}
export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile) {
return node.kind !== SyntaxKind.JsxText ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : undefined;
}
@@ -1992,7 +2016,7 @@ namespace ts {
/**
* Get the assignment 'initializer' -- the righthand side-- when the initializer is container-like (See getExpandoInitializer).
* We treat the right hand side of assignments with container-like initalizers as declarations.
* We treat the right hand side of assignments with container-like initializers as declarations.
*/
export function getAssignedExpandoInitializer(node: Node | undefined): Expression | undefined {
if (node && node.parent && isBinaryExpression(node.parent) && node.parent.operatorToken.kind === SyntaxKind.EqualsToken) {
@@ -2290,6 +2314,17 @@ namespace ts {
!!getJSDocTypeTag(expr.parent);
}
export function setValueDeclaration(symbol: Symbol, node: Declaration): void {
const { valueDeclaration } = symbol;
if (!valueDeclaration ||
!(node.flags & NodeFlags.Ambient && !(valueDeclaration.flags & NodeFlags.Ambient)) &&
(isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) ||
(valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration))) {
// other kinds of value declarations take precedence over modules and assignment declarations
symbol.valueDeclaration = node;
}
}
export function isFunctionSymbol(symbol: Symbol | undefined) {
if (!symbol || !symbol.valueDeclaration) {
return false;
@@ -4776,19 +4811,19 @@ namespace ts {
return positionIsSynthesized(range.pos) ? -1 : skipTrivia(sourceFile.text, range.pos, /*stopAfterLineBreak*/ false, includeComments);
}
export function getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(pos: number, sourceFile: SourceFile, includeComments?: boolean) {
export function getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(pos: number, stopPos: number, sourceFile: SourceFile, includeComments?: boolean) {
const startPos = skipTrivia(sourceFile.text, pos, /*stopAfterLineBreak*/ false, includeComments);
const prevPos = getPreviousNonWhitespacePosition(startPos, sourceFile);
return getLinesBetweenPositions(sourceFile, prevPos || 0, startPos);
const prevPos = getPreviousNonWhitespacePosition(startPos, stopPos, sourceFile);
return getLinesBetweenPositions(sourceFile, prevPos ?? stopPos, startPos);
}
export function getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos: number, sourceFile: SourceFile, includeComments?: boolean) {
export function getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos: number, stopPos: number, sourceFile: SourceFile, includeComments?: boolean) {
const nextPos = skipTrivia(sourceFile.text, pos, /*stopAfterLineBreak*/ false, includeComments);
return getLinesBetweenPositions(sourceFile, pos, nextPos);
return getLinesBetweenPositions(sourceFile, pos, Math.min(stopPos, nextPos));
}
function getPreviousNonWhitespacePosition(pos: number, sourceFile: SourceFile) {
while (pos-- > 0) {
function getPreviousNonWhitespacePosition(pos: number, stopPos = 0, sourceFile: SourceFile) {
while (pos-- > stopPos) {
if (!isWhiteSpaceLike(sourceFile.text.charCodeAt(pos))) {
return pos;
}
+1 -1
View File
@@ -769,7 +769,7 @@ namespace ts {
const sig = find(type.members, isCallSignatureDeclaration);
return sig && sig.type;
}
if (isFunctionTypeNode(type)) {
if (isFunctionTypeNode(type) || isJSDocFunctionType(type)) {
return type.type;
}
}
+93 -4
View File
@@ -520,11 +520,18 @@ namespace ts {
return result;
}
function findSpanEnd<T>(array: readonly T[], test: (value: T) => boolean, start: number) {
let i = start;
while (i < array.length && test(array[i])) {
i++;
}
return i;
}
/**
* Merges generated lexical declarations into a new statement list.
*/
export function mergeLexicalEnvironment(statements: NodeArray<Statement>, declarations: readonly Statement[] | undefined): NodeArray<Statement>;
/**
* Appends generated lexical declarations to an array of statements.
*/
@@ -534,9 +541,91 @@ namespace ts {
return statements;
}
return isNodeArray(statements)
? setTextRange(createNodeArray(insertStatementsAfterStandardPrologue(statements.slice(), declarations)), statements)
: insertStatementsAfterStandardPrologue(statements, declarations);
// When we merge new lexical statements into an existing statement list, we merge them in the following manner:
//
// Given:
//
// | Left | Right |
// |------------------------------------|-------------------------------------|
// | [standard prologues (left)] | [standard prologues (right)] |
// | [hoisted functions (left)] | [hoisted functions (right)] |
// | [hoisted variables (left)] | [hoisted variables (right)] |
// | [lexical init statements (left)] | [lexical init statements (right)] |
// | [other statements (left)] | |
//
// The resulting statement list will be:
//
// | Result |
// |-------------------------------------|
// | [standard prologues (right)] |
// | [standard prologues (left)] |
// | [hoisted functions (right)] |
// | [hoisted functions (left)] |
// | [hoisted variables (right)] |
// | [hoisted variables (left)] |
// | [lexical init statements (right)] |
// | [lexical init statements (left)] |
// | [other statements (left)] |
//
// NOTE: It is expected that new lexical init statements must be evaluated before existing lexical init statements,
// as the prior transformation may depend on the evaluation of the lexical init statements to be in the correct state.
// find standard prologues on left in the following order: standard directives, hoisted functions, hoisted variables, other custom
const leftStandardPrologueEnd = findSpanEnd(statements, isPrologueDirective, 0);
const leftHoistedFunctionsEnd = findSpanEnd(statements, isHoistedFunction, leftStandardPrologueEnd);
const leftHoistedVariablesEnd = findSpanEnd(statements, isHoistedVariableStatement, leftHoistedFunctionsEnd);
// find standard prologues on right in the following order: standard directives, hoisted functions, hoisted variables, other custom
const rightStandardPrologueEnd = findSpanEnd(declarations, isPrologueDirective, 0);
const rightHoistedFunctionsEnd = findSpanEnd(declarations, isHoistedFunction, rightStandardPrologueEnd);
const rightHoistedVariablesEnd = findSpanEnd(declarations, isHoistedVariableStatement, rightHoistedFunctionsEnd);
const rightCustomPrologueEnd = findSpanEnd(declarations, isCustomPrologue, rightHoistedVariablesEnd);
Debug.assert(rightCustomPrologueEnd === declarations.length, "Expected declarations to be valid standard or custom prologues");
// splice prologues from the right into the left. We do this in reverse order
// so that we don't need to recompute the index on the left when we insert items.
const left = isNodeArray(statements) ? statements.slice() : statements;
// splice other custom prologues from right into left
if (rightCustomPrologueEnd > rightHoistedVariablesEnd) {
left.splice(leftHoistedVariablesEnd, 0, ...declarations.slice(rightHoistedVariablesEnd, rightCustomPrologueEnd));
}
// splice hoisted variables from right into left
if (rightHoistedVariablesEnd > rightHoistedFunctionsEnd) {
left.splice(leftHoistedFunctionsEnd, 0, ...declarations.slice(rightHoistedFunctionsEnd, rightHoistedVariablesEnd));
}
// splice hoisted functions from right into left
if (rightHoistedFunctionsEnd > rightStandardPrologueEnd) {
left.splice(leftStandardPrologueEnd, 0, ...declarations.slice(rightStandardPrologueEnd, rightHoistedFunctionsEnd));
}
// splice standard prologues from right into left (that are not already in left)
if (rightStandardPrologueEnd > 0) {
if (leftStandardPrologueEnd === 0) {
left.splice(0, 0, ...declarations.slice(0, rightStandardPrologueEnd));
}
else {
const leftPrologues = createMap<boolean>();
for (let i = 0; i < leftStandardPrologueEnd; i++) {
const leftPrologue = statements[i] as PrologueDirective;
leftPrologues.set(leftPrologue.expression.text, true);
}
for (let i = rightStandardPrologueEnd - 1; i >= 0; i--) {
const rightPrologue = declarations[i] as PrologueDirective;
if (!leftPrologues.has(rightPrologue.expression.text)) {
left.unshift(rightPrologue);
}
}
}
}
if (isNodeArray(statements)) {
return setTextRange(createNodeArray(left, statements.hasTrailingComma), statements);
}
return statements;
}
/**
+112 -1
View File
@@ -149,13 +149,124 @@ namespace ts {
* Starts a new lexical environment and visits a parameter list, suspending the lexical
* environment upon completion.
*/
export function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T>): NodeArray<ParameterDeclaration>;
export function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T> | undefined): NodeArray<ParameterDeclaration> | undefined;
export function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor = visitNodes) {
let updated: NodeArray<ParameterDeclaration> | undefined;
context.startLexicalEnvironment();
const updated = nodesVisitor(nodes, visitor, isParameterDeclaration);
if (nodes) {
context.setLexicalEnvironmentFlags(LexicalEnvironmentFlags.InParameters, true);
updated = nodesVisitor(nodes, visitor, isParameterDeclaration);
// As of ES2015, any runtime execution of that occurs in for a parameter (such as evaluating an
// initializer or a binding pattern), occurs in its own lexical scope. As a result, any expression
// that we might transform that introduces a temporary variable would fail as the temporary variable
// exists in a different lexical scope. To address this, we move any binding patterns and initializers
// in a parameter list to the body if we detect a variable being hoisted while visiting a parameter list
// when the emit target is greater than ES2015.
if (context.getLexicalEnvironmentFlags() & LexicalEnvironmentFlags.VariablesHoistedInParameters &&
getEmitScriptTarget(context.getCompilerOptions()) >= ScriptTarget.ES2015) {
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
}
context.setLexicalEnvironmentFlags(LexicalEnvironmentFlags.InParameters, false);
}
context.suspendLexicalEnvironment();
return updated;
}
function addDefaultValueAssignmentsIfNeeded(parameters: NodeArray<ParameterDeclaration>, context: TransformationContext) {
let result: ParameterDeclaration[] | undefined;
for (let i = 0; i < parameters.length; i++) {
const parameter = parameters[i];
const updated = addDefaultValueAssignmentIfNeeded(parameter, context);
if (result || updated !== parameter) {
if (!result) result = parameters.slice(0, i);
result[i] = updated;
}
}
if (result) {
return setTextRange(createNodeArray(result, parameters.hasTrailingComma), parameters);
}
return parameters;
}
function addDefaultValueAssignmentIfNeeded(parameter: ParameterDeclaration, context: TransformationContext) {
// A rest parameter cannot have a binding pattern or an initializer,
// so let's just ignore it.
return parameter.dotDotDotToken ? parameter :
isBindingPattern(parameter.name) ? addDefaultValueAssignmentForBindingPattern(parameter, context) :
parameter.initializer ? addDefaultValueAssignmentForInitializer(parameter, parameter.name, parameter.initializer, context) :
parameter;
}
function addDefaultValueAssignmentForBindingPattern(parameter: ParameterDeclaration, context: TransformationContext) {
context.addInitializationStatement(
createVariableStatement(
/*modifiers*/ undefined,
createVariableDeclarationList([
createVariableDeclaration(
parameter.name,
parameter.type,
parameter.initializer ?
createConditional(
createStrictEquality(
getGeneratedNameForNode(parameter),
createVoidZero()
),
parameter.initializer,
getGeneratedNameForNode(parameter)
) :
getGeneratedNameForNode(parameter)
),
])
)
);
return updateParameter(parameter,
parameter.decorators,
parameter.modifiers,
parameter.dotDotDotToken,
getGeneratedNameForNode(parameter),
parameter.questionToken,
parameter.type,
/*initializer*/ undefined);
}
function addDefaultValueAssignmentForInitializer(parameter: ParameterDeclaration, name: Identifier, initializer: Expression, context: TransformationContext) {
context.addInitializationStatement(
createIf(
createTypeCheck(getSynthesizedClone(name), "undefined"),
setEmitFlags(
setTextRange(
createBlock([
createExpressionStatement(
setEmitFlags(
setTextRange(
createAssignment(
setEmitFlags(getMutableClone(name), EmitFlags.NoSourceMap),
setEmitFlags(initializer, EmitFlags.NoSourceMap | getEmitFlags(initializer) | EmitFlags.NoComments)
),
parameter
),
EmitFlags.NoComments
)
)
]),
parameter
),
EmitFlags.SingleLine | EmitFlags.NoTrailingSourceMap | EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments
)
)
);
return updateParameter(parameter,
parameter.decorators,
parameter.modifiers,
parameter.dotDotDotToken,
parameter.name,
parameter.questionToken,
parameter.type,
/*initializer*/ undefined);
}
/**
* Resumes a suspended lexical environment and visits a function body, ending the lexical
* environment and merging hoisted declarations upon completion.
+1
View File
@@ -51,6 +51,7 @@ declare namespace ts.server {
export interface InitializationFailedResponse extends TypingInstallerResponse {
readonly kind: EventInitializationFailed;
readonly message: string;
readonly stack?: string;
}
export interface ProjectResponse extends TypingInstallerResponse {
-9
View File
@@ -42,15 +42,6 @@ interface Array<T> {
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
/**
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove. If deleteCount is omitted, or if its value is equal to or larger
* than array.length - start (that is, if it is equal to or greater than the number of elements left in the array,
* starting at start), then all the elements from start to the end of the array will be deleted.
*/
splice(start: number, deleteCount?: number): T[];
}
interface ArrayConstructor {
+1 -1
View File
@@ -254,7 +254,7 @@ interface Int8Array {
}
interface Uint8Array {
readonly [Symbol.toStringTag]: "UInt8Array";
readonly [Symbol.toStringTag]: "Uint8Array";
}
interface Uint8ClampedArray {
+1 -1
View File
@@ -1254,7 +1254,7 @@ interface Array<T> {
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove.
*/
splice(start: number, deleteCount: number): T[];
splice(start: number, deleteCount?: number): T[];
/**
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
* @param start The zero-based location in the array from which to start removing elements.
@@ -1017,6 +1017,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[添加 return 语句]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1059,6 +1062,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[添加所有缺少的 return 语句]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1174,7 +1180,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[添加 "export {}" 以将此文件变为模块]]></Val>
<Val><![CDATA[添加 "export {}",将此文件变为模块]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1845,6 +1851,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[索引签名不能包含尾随逗号。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3184,7 +3193,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[当发出专用标识符下层时,编译器预留名称 "{0}"。]]></Val>
<Val><![CDATA[当发出专用标识符下层时,编译器会预留名称“{0}”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3633,6 +3642,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[该声明扩充了另一文件中的声明。这无法被序列化。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -4987,7 +5005,7 @@
<Str Cat="Text">
<Val><![CDATA[File '{0}' has an unsupported extension. The only supported extensions are {1}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[文件 "{0}" 具有不受支持的扩展名。支持的扩展名只有 {1}。]]></Val>
<Val><![CDATA[文件“{0}”具有不受支持的扩展名。仅支持 {1} 扩展名。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5632,7 +5650,7 @@
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[从模块 "{1}" 导入默认的 "{0}"]]></Val>
<Val><![CDATA[从模块“{1}”导入默认的“{0}”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5823,15 +5841,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[参数“{0}”的初始化表达式不能引用在它之后声明的标识符“{1}”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7179,6 +7188,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有数字枚举可具有计算成员,但此表达式的类型为“{0}”。如果不需要全面性检查,请考虑改用对象文本。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7390,7 +7408,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} 个重载 中的第 {0} 个("{2}")出现了以下错误。]]></Val>
<Val><![CDATA[第 {0} 个重载(共 {1} 个),“{2}”,出现以下错误。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7440,11 +7458,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[参数“{0}”的初始化表达式中不能引用该参数自身。]]></Val>
<Val><![CDATA[参数“{0}”不能引用在它之后声明的标识符“{1}”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[参数“{0}”不能引用它自身。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8562,6 +8589,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除所有错误的正文块括号]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8595,6 +8625,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除块正文括号]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9969,12 +10002,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[由于属性“{1}”存在于多个要素中,但在某些要素中是专用属性,因此已将交集“{0}”缩减为“绝不”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[由于属性“{1}”在某些要素中具有存在冲突的类型,因此已将交集“{0}”缩减为“绝不”。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10167,6 +10206,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["delete" 运算符的操作数必须是可选的。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10291,7 +10339,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在此处定义了 "{0}" 的隐藏声明]]></Val>
<Val><![CDATA[在此处定义了“{0}”的阴影声明]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10515,6 +10563,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[这是正在扩充的声明。请考虑将扩充声明移到同一个文件中。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10738,7 +10795,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[类型 "{0}" 缺少类型 "{1}" 中的以下属性: {2}]]></Val>
<Val><![CDATA[类型“{0}”缺少类型“{1}”中的以下属性: {2}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10747,7 +10804,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[类型 "{0}" 缺少类型 "{1}" 的以下属性: {2} 及其他 {3} 项。]]></Val>
<Val><![CDATA[类型“{0}”缺少类型“{1}”的以下属性: {2} 及其他 {3} 项。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11086,7 +11143,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[此导入产生的类型。无法调用或构造命名空间样式的导入,这类导入将在运行时导致失败。请考虑改为使用默认导入或这里需要的导入。]]></Val>
<Val><![CDATA[此导入产生的类型。无法调用或构造命名空间样式的导入,这类导入将在运行时导致失败。请考虑改为使用默认导入或此处需要的导入。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11647,7 +11704,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[使用项目引用重定向 "{0}" 的编译器选项。]]></Val>
<Val><![CDATA[使用项目引用重定向“{0}”的编译器选项。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11799,6 +11856,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[用括号将所有对象文字括起来]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11814,6 +11874,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[用括号将以下应为对象文字的正文括起来]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1017,6 +1017,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[新增 return 陳述式]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1059,6 +1062,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[新增所有遺漏的 return 陳述式]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1174,7 +1180,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[新增 'export {}' 以將此檔案設為模組]]></Val>
<Val><![CDATA[新增 'export {}' 以將此檔案轉為模組]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1845,6 +1851,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[索引簽章結尾不可有逗號。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3184,7 +3193,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在下層發出私人識別碼時,編譯器會保留名稱 '{0}'。]]></Val>
<Val><![CDATA[降級發出私人識別碼時,編譯器會保留名稱 '{0}'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3633,6 +3642,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[宣告會增強另一個檔案中的宣告。無法將此情況序列化。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5823,15 +5841,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[參數 '{0}' 的初始設定式不得參考在其之後宣告的識別碼 '{1}'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -6009,18 +6018,27 @@
<Item ItemId=";Its_element_type_0_is_not_a_valid_JSX_element_2789" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Its element type '{0}' is not a valid JSX element.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[其元素類型 '{0}' 不是有效的 JSX 元素。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Its_instance_type_0_is_not_a_valid_JSX_element_2788" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Its instance type '{0}' is not a valid JSX element.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[其執行個體類型 '{0}' 不是有效的 JSX 元素。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Its_return_type_0_is_not_a_valid_JSX_element_2787" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Its return type '{0}' is not a valid JSX element.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[其傳回型別 '{0}' 不是有效的 JSX 元素。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -7170,6 +7188,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[只有數值列舉才可以有計算成員,但此運算式的類型為 '{0}'。若您不需要詳細檢查,請考慮改用物件常值。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7381,7 +7408,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} 的多載 {0},'{2}',發生下列錯誤。]]></Val>
<Val><![CDATA[多載 {0} (共 {1}),'{2}',發生下列錯誤。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7431,11 +7458,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[無法在參數 '{0}' 的初始設定式中參考此參數。]]></Val>
<Val><![CDATA[參數 '{0}' 不得參考在其本身之後宣告的識別碼 '{1}'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[參數 '{0}' 不得參考自己本身。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7804,7 +7840,7 @@
<Str Cat="Text">
<Val><![CDATA[Prefix with 'declare']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[在開頭放置 'declare']]></Val>
<Val><![CDATA[以 'declare' 開頭]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8052,15 +8088,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[屬性 '{0}' 有衝突的宣告,在類型 '{1}' 中無法存取。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has no initializer and is not definitely assigned in the constructor.]]></Val>
@@ -8562,6 +8589,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移除所有不正確的主體區塊大括弧]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8595,6 +8625,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[移除區塊主體大括弧]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9966,6 +9999,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[因為屬性 '{1}' 存在於多個部分,而且在某些部分為私人性質,所以交集 '{0}' 已縮減為 'never'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[因為屬性 '{1}' 在某些部分有衝突的類型,所以交集 '{0}' 已縮減為 'never'。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_last_overload_gave_the_following_error_2770" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The last overload gave the following error.]]></Val>
@@ -10155,6 +10206,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['delete' 運算子的運算元必須具有選擇性。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10279,7 +10339,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' 的陰影宣告定義於此處]]></Val>
<Val><![CDATA['{0}' 的隱蔽宣告定義於此處]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10503,6 +10563,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[此為正在增強中的宣告。請考慮將正在增強的宣告移至相同檔案中。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10726,7 +10795,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[類型 '{0}' 缺少類型 '{1}' 中的下列屬性: {2}]]></Val>
<Val><![CDATA[類型 '{0}' 在類型 '{1}' 中缺少下列屬性: {2}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10735,7 +10804,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[類型 '{0}' 缺少類型 '{1}' 中的下列屬性: {2},以及另外 {3} 個。]]></Val>
<Val><![CDATA[類型 '{0}' 在類型 '{1}' 中缺少下列屬性: {2},以及另外 {3} 個。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11074,7 +11143,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[類型源自此匯入。無法呼叫或建構命名空間樣式的匯入,而且可能會在執行階段導致失敗。請考慮改用預設匯入或此處要求的匯入。]]></Val>
<Val><![CDATA[類型源自此匯入。無法呼叫或建構命名空間樣式的匯入,而且可能會在執行階段導致失敗。請考慮改用預設匯入或於此處匯入 require。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11742,6 +11811,9 @@
<Item ItemId=";Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Visit https://aka.ms/tsconfig.json to read more about this file]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[瀏覽 https://aka.ms/tsconfig.json 以閱讀此檔案的詳細資訊]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11784,6 +11856,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[使用括弧括住所有物件常值]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11799,6 +11874,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[使用括弧括住下列必須是物件常值的主體]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11913,6 +11991,9 @@
<Item ItemId=";_0_cannot_be_used_as_a_JSX_component_2786" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{0}' cannot be used as a JSX component.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' 不能用作 JSX 元件。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1026,6 +1026,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přidat příkaz return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1068,6 +1071,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přidat všechny chybějící příkazy return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1854,6 +1860,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Signatura indexu nemůže mít na konci čárku.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3193,7 +3202,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kompilátor si rezervuje název {0} při generování nižší úrovně privátního identifikátoru.]]></Val>
<Val><![CDATA[Kompilátor si rezervuje název {0} při generování privátního identifikátoru pro nižší úroveň.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3642,6 +3651,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Deklarace rozšiřuje deklaraci v jiném souboru. Toto není možné serializovat.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5641,7 +5659,7 @@
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importovat výchozí {0} z modulu {1}]]></Val>
<Val><![CDATA[Importovat výchozí hodnotu {0} z modulu {1}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5832,15 +5850,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Inicializátor parametru {0} nemůže odkazovat na identifikátor {1} deklarovaný po něm.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7188,6 +7197,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Počítané členy můžou obsahovat jen číselné výčty, ale tento výraz je typu {0}. Pokud nepotřebujete kontroly úplnosti, zvažte místo něho použít objekt literálu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7449,11 +7467,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Parametr {0} se nedá odkazovat v jeho vlastním inicializátoru.]]></Val>
<Val><![CDATA[Parametr {0} nemůže odkazovat na identifikátor {1} deklarovaný za ním.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Parametr {0} nemůže odkazovat sám na sebe.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8070,15 +8097,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Vlastnost {0} má konfliktní deklarace a v typu {1} není přístupná.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has no initializer and is not definitely assigned in the constructor.]]></Val>
@@ -8580,6 +8598,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat všechny nesprávné závorky bloku kódu]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8613,6 +8634,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat všechny závorky bloku kódu]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9984,6 +10008,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Průnik {0} se omezil na never, protože vlastnost {1} existuje v několika konstituentech a v některých z nich je privátní.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Průnik {0} se omezil na never, protože vlastnost {1} má v některých konstituentech konfliktní typy.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_last_overload_gave_the_following_error_2770" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The last overload gave the following error.]]></Val>
@@ -10173,6 +10215,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Operand operátoru delete musí být nepovinný.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10297,7 +10348,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Překrývající se deklarace {0} je definovaná tady.]]></Val>
<Val><![CDATA[Překrývající deklarace {0} je definovaná tady.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10521,6 +10572,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Toto je deklarace, která se rozšiřuje. Zvažte možnost přesunout rozšiřující deklaraci do stejného souboru.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11092,7 +11152,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Typ pochází z tohoto importu. Import stylu oboru názvů není možné zavolat ani vytvořit a při běhu způsobí chybu. Zvažte možnost použít tady místo toho výchozí import nebo požadavek na import.]]></Val>
<Val><![CDATA[Typ pochází z tohoto importu. Import stylu oboru názvů není možné zavolat ani vytvořit a při běhu způsobí chybu. Zvažte možnost použít tady místo toho výchozí import nebo importovat require.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11653,7 +11713,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Používají se možnosti kompilátoru přesměrování odkazu projektu {0}.]]></Val>
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11805,6 +11865,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uzavřít všechny literály objektů do závorek]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11820,6 +11883,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uzavřít následující kód, který by měl být literál objektu, do závorek]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1014,6 +1014,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[return-Anweisung hinzufügen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1056,6 +1059,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Alle fehlenden return-Anweisungen hinzufügen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1171,7 +1177,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["export {}" hinzufügen, um diese Datei zu einem Modul zu machen]]></Val>
<Val><![CDATA["export {}" hinzufügen, um diese Datei in ein Modul umzuwandeln]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1842,6 +1848,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Eine Indexsignatur darf kein nachstehendes Komma aufweisen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3181,7 +3190,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Compiler reserviert den Namen "{0}", wenn er einen älteren privaten Bezeichner ausgibt.]]></Val>
<Val><![CDATA[Der Compiler reserviert den Namen "{0}", wenn er einen privaten Bezeichner für Vorgängerversionen ausgibt.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3630,6 +3639,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Deklaration erweitert die Deklaration in einer anderen Datei. Dieser Vorgang kann nicht serialisiert werden.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5629,7 +5647,7 @@
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Importstandard "{0}" aus Modul "{1}"]]></Val>
<Val><![CDATA[Standard "{0}" aus Modul "{1}" importieren]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5820,15 +5838,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Initialisierer des Parameters "{0}" darf nicht auf den anschließend deklarierten Bezeichner "{1}" verweisen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7176,6 +7185,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nur numerische Enumerationen können berechnete Member umfassen, aber dieser Ausdruck weist den Typ "{0}" auf. Wenn Sie keine Vollständigkeitsprüfung benötigen, erwägen Sie stattdessen die Verwendung eines Objektliterals.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7437,11 +7455,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Auf den Parameter "{0}" darf in diesem Initialisierer nicht verwiesen werden.]]></Val>
<Val><![CDATA[Der Parameter "{0}" darf nicht auf den anschließend deklarierten Bezeichner "{1}" verweisen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Parameter "{0}" kann nicht auf sich selbst verweisen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8556,6 +8583,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Alle falschen geschweiften Klammern aus Textblock entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8589,6 +8619,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Geschweifte Klammern aus Blocktextkörper entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9963,12 +9996,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Schnittmenge "{0}" wurde auf "niemals" reduziert, weil die Eigenschaft "{1}" in mehreren Bestandteilen vorhanden und in einigen davon privat ist.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Schnittmenge "{0}" wurde auf "niemals" reduziert, weil die Eigenschaft "{1}" in einigen Bestandteilen widersprüchliche Typen aufweist.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10161,6 +10200,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Operand eines delete-Operators muss optional sein.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10285,7 +10333,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Die Shadowing-Deklaration von "{0}" ist hier definiert.]]></Val>
<Val><![CDATA[Die verbergende Deklaration von "{0}" ist hier definiert.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10509,6 +10557,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dies ist die erweiterte Deklaration. Die erweiternde Deklaration sollte in dieselbe Datei verschoben werden.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10732,7 +10789,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Im Typ "{0}" fehlen die folgenden Eigenschaften von Typ "{1}": {2}]]></Val>
<Val><![CDATA[Im Typ "{0}" fehlen die folgenden Eigenschaften von Typ "{1}": "{2}".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10741,7 +10798,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Im Typ "{0}" fehlen die folgenden Eigenschaften von Typ "{1}": {2} und {3} weitere.]]></Val>
<Val><![CDATA[Im Typ "{0}" fehlen die folgenden Eigenschaften von Typ "{1}": "{2}" und {3} weitere.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11080,7 +11137,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Der Typ stammt aus diesem Import. Ein Import im Namespacestil kann nicht aufgerufen oder erstellt werden und verursacht zur Laufzeit einen Fehler. Erwägen Sie hier stattdessen die Verwendung eines Standardimports oder die Verwendung von "import require".]]></Val>
<Val><![CDATA[Der Typ stammt aus diesem Import. Ein Import im Namespacestil kann nicht aufgerufen oder erstellt werden und verursacht zur Laufzeit einen Fehler. Erwägen Sie hier stattdessen die Verwendung eines Standardimports oder die den Import über "require".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11793,6 +11850,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Gesamtes Objektliteral in Klammern einschließen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11808,6 +11868,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Schließen Sie den folgenden Text, der ein Objektliteral darstellt, in Klammern ein.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -445,7 +445,7 @@
<Str Cat="Text">
<Val><![CDATA['A label is not allowed here.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aquí no se permite una etiqueta.]]></Val>
<Val><![CDATA[No se permite una etiqueta aquí.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1026,6 +1026,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar una instrucción "return"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1068,6 +1071,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar todas las instrucciones "return" que faltan]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1183,7 +1189,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar "export {}" para convertir este archivo en un módulo]]></Val>
<Val><![CDATA[Agregar "export {}" para transformar este archivo en un módulo]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1857,6 +1863,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una signatura de índice no puede finalizar con una coma.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3196,7 +3205,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El compilador reserva el nombre "{0}" al emitir un identificador privado en el nivel inferior.]]></Val>
<Val><![CDATA[El compilador reserva el nombre "{0}" al emitir un identificador privado válido para versiones anteriores.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3645,6 +3654,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5835,15 +5850,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El inicializador del parámetro '{0}' no puede hacer referencia al identificador '{1}' declarado después.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7191,6 +7197,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Solo las enumeraciones numéricas pueden tener miembros calculados, pero esta expresión tiene el tipo "{0}". Si no requiere comprobaciones de exhaustividad, considere la posibilidad de usar un literal de objeto en su lugar.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7452,12 +7467,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[No se puede hacer referencia al parámetro '{0}' en su inicializador.]]></Val>
</Tgt>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8574,6 +8592,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar todas las llaves de cuerpo de bloque incorrectas]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8607,6 +8628,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar llaves de cuerpo del bloque]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9981,12 +10005,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La intersección "{0}" se redujo a "never" porque la propiedad "{1}" existe en varios constituyentes y es privada en algunos de ellos.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La intersección "{0}" se redujo a "never" porque la propiedad "{1}" tiene tipos en conflicto en algunos constituyentes.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10179,6 +10209,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El operando de un operador "delete" debe ser opcional.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10303,7 +10342,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La declaración de reemplazo de "{0}" se define aquí.]]></Val>
<Val><![CDATA[La declaración que ensombrece a "{0}" se define aquí.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10527,6 +10566,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11098,7 +11143,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El tipo se origina en esta importación. No se puede construir ni llamar a una importación de estilo de espacio de nombres y provocará un error en tiempo de ejecución. Considere la posibilidad de usar una importación predeterminada o requerir la importación aquí.]]></Val>
<Val><![CDATA[El tipo se origina en esta importación. No se puede construir ni llamar a una importación de estilo de espacio de nombres y provocará un error en tiempo de ejecución. Considere la posibilidad de usar una importación predeterminada o require aquí en su lugar.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11659,7 +11704,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El uso de las opciones del compilador de la referencia del proyecto redirige "{0}".]]></Val>
<Val><![CDATA[Uso de las opciones del compilador de redireccionamiento de la referencia del proyecto "{0}".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11811,6 +11856,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Encapsular todos los literales de objeto entre paréntesis]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11826,6 +11874,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Encapsular el cuerpo siguiente entre paréntesis, lo cual debe ser un literal de objeto]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -445,7 +445,7 @@
<Str Cat="Text">
<Val><![CDATA['A label is not allowed here.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['Étiquette non autorisée ici.]]></Val>
<Val><![CDATA[Étiquette non autorisée ici.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1026,6 +1026,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ajouter une instruction return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1068,6 +1071,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ajouter toutes les instructions return manquantes]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1857,6 +1863,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Une signature d'index ne peut pas avoir de virgule de fin.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3196,7 +3205,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le compilateur réserve le nom '{0}' quand il émet un identificateur privé de niveau inférieur.]]></Val>
<Val><![CDATA[Le compilateur réserve le nom '{0}' quand il émet un identificateur privé pour une version antérieure.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3645,6 +3654,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5835,15 +5850,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'initialiseur du paramètre '{0}' ne peut pas référencer l'identificateur '{1}' déclaré après lui.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7191,6 +7197,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Seules les enums numériques peuvent avoir des membres calculés, mais cette expression a le type '{0}'. Si vous n'avez pas besoin de contrôles d'exhaustivité, utilisez un littéral d'objet à la place.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7402,7 +7417,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La surcharge {0} de {1}, '{2}', a généré l'erreur suivante.]]></Val>
<Val><![CDATA[La surcharge {0} sur {1}, '{2}', a généré l'erreur suivante.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7452,12 +7467,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le paramètre '{0}' ne peut pas être référencé dans son initialiseur.]]></Val>
</Tgt>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8073,15 +8091,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La propriété '{0}' a des déclarations en conflit et est inaccessible dans le type '{1}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has no initializer and is not definitely assigned in the constructor.]]></Val>
@@ -8583,6 +8592,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer toutes les accolades de corps de bloc incorrectes]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8616,6 +8628,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Supprimer les accolades de corps de bloc]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9987,6 +10002,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'intersection '{0}' a été réduite à 'never', car la propriété '{1}' existe dans plusieurs constituants et est privée dans certains d'entre eux.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'intersection '{0}' a été réduite à 'never', car la propriété '{1}' a des types en conflit dans certains constituants.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_last_overload_gave_the_following_error_2770" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The last overload gave the following error.]]></Val>
@@ -10176,6 +10209,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10524,6 +10563,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11095,7 +11140,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le type provient de cette importation. Impossible d'appeler ou de construire une importation de style d'espace de noms, ce qui va entraîner un échec au moment de l'exécution. À la place, utilisez une importation par défaut ou une obligation d'importation ici.]]></Val>
<Val><![CDATA[Le type provient de cette importation. Impossible d'appeler ou de construire une importation de style d'espace de noms, ce qui va entraîner un échec au moment de l'exécution. À la place, utilisez ici une importation par défaut ou une importation avec require.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11808,6 +11853,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Placer tous les littéraux d'objet entre parenthèses]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11823,6 +11871,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Placer le corps suivant entre parenthèses pour indiquer qu'il s'agit d'un littéral d'objet]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1017,6 +1017,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere un'istruzione return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1059,6 +1062,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere tutte le istruzioni return mancanti]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1174,7 +1180,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere 'export {}' per creare questo file in un modulo]]></Val>
<Val><![CDATA[Aggiungere 'export {}' per trasformare questo file in un modulo]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1845,6 +1851,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Una firma dell'indice non può contenere una virgola finale.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3184,7 +3193,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Il compilatore riserva il nome '{0}' quando si crea l'identificatore provato di livello inferiore.]]></Val>
<Val><![CDATA[Il compilatore riserva il nome '{0}' quando si crea l'identificatore privato per browser meno recenti.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3633,6 +3642,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5823,15 +5838,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'inizializzatore del parametro '{0}' non può fare riferimento all'identificatore '{1}' dichiarato dopo di esso.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7179,6 +7185,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Solo le enumerazioni numeriche possono includere membri calcolati, ma il tipo di questa espressione è '{0}'. Se non sono necessari controlli di esaustività, provare a usare un valore letterale di oggetto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7440,12 +7455,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Non è possibile fare riferimento al parametro '{0}' nel relativo inizializzatore.]]></Val>
</Tgt>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
@@ -7813,7 +7831,7 @@
<Str Cat="Text">
<Val><![CDATA[Prefix with 'declare']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere 'declare' come prefisso]]></Val>
<Val><![CDATA[Aggiungere il prefisso 'declare']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8562,6 +8580,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere tutte le parentesi graffe errate presenti nel corpo del blocco]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8595,6 +8616,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere le parentesi graffe presenti nel corpo del blocco]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9969,12 +9993,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'intersezione '{0}' è stata ridotta a 'never' perché la proprietà '{1}' esiste in più costituenti ed è privata in alcuni.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[L'intersezione '{0}' è stata ridotta a 'never' perché in alcuni costituenti della proprietà '{1}' sono presenti tipi in conflitto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10167,6 +10197,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10291,7 +10327,7 @@
<Str Cat="Text">
<Val><![CDATA[The shadowing declaration of '{0}' is defined here]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La dichiarazione di shadowing di '{0}' viene definita in questo punto]]></Val>
<Val><![CDATA[La dichiarazione di oscuramento di '{0}' viene definita in questo punto]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -10515,6 +10551,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11086,7 +11128,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Il tipo è originato in corrispondenza di questa importazione. Non è possibile chiamare o costruire un'importazione di tipo spazio dei nomi e verrà restituito un errore in fase di esecuzione. Provare a usare un'importazione o un'importazione predefinita in questo punto.]]></Val>
<Val><![CDATA[Il tipo è originato in corrispondenza di questa importazione. Non è possibile chiamare o costruire un'importazione di tipo spazio dei nomi e verrà restituito un errore in fase di esecuzione. Provare a usare un'importazione predefinita o un'importazione di require in questo punto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11647,7 +11689,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Verranno usate le opzione del compilatore del progetto per fare riferimento al reindirizzamento '{0}'.]]></Val>
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11799,6 +11841,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Racchiudere tra parentesi tutti i valori letterali di oggetto]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11814,6 +11859,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Racchiudere tra parentesi il corpo seguente che deve essere un valore letterale di oggetto]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -436,7 +436,7 @@
<Str Cat="Text">
<Val><![CDATA['A label is not allowed here.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['A ラベルはここでは使用できません。]]></Val>
<Val><![CDATA[A ラベルはここでは使用できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1017,6 +1017,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[return ステートメントを追加する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1059,6 +1062,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[不足しているすべての return ステートメントを追加する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1174,7 +1180,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['export {}' を追加して、このファイルをモジュールに含める]]></Val>
<Val><![CDATA['export {}' を追加して、このファイルをモジュールにする]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1845,6 +1851,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[インデックス シグネチャの末尾にコンマを指定することはできません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3184,7 +3193,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[private 識別子を下位レベルで出力するときに、コンパイラは名前 '{0}' を予約します。]]></Val>
<Val><![CDATA[private 識別子を下位レベルに生成するときに、コンパイラは名前 '{0}' を予約します。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3633,6 +3642,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[宣言は別のファイル内の宣言を拡張します。これをシリアル化できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5823,15 +5841,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[パラメーター '{0}' の初期化子はその後で宣言された識別子 '{1}' を参照できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7179,6 +7188,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[計算されたメンバーを使用できるのは数値列挙型のみですが、この式には '{0}' 型があります。網羅性チェックが不要な場合は、代わりにオブジェクト リテラルを使用することをご検討ください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7390,7 +7408,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1}、'{2}' の {0} のオーバーロードにより、次のエラーが発生しました。]]></Val>
<Val><![CDATA[{1} 中 {0} のオーバーロード, '{2}' により、次のエラーが発生しました。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7440,11 +7458,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[パラメーター '{0}' はその初期化子内では参照できません。]]></Val>
<Val><![CDATA[パラメーター '{0}' はその後で宣言された識別子 '{1}' を参照できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[パラメーター '{0}' は、それ自体を参照できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8562,6 +8589,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[本体ブロックの中かっこで間違っているものをすべて削除する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8595,6 +8625,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[ブロック本体の中かっこを削除する]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9969,12 +10002,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[交差 '{0}' は 'なし' に縮小されました。プロパティ '{1}' が複数の構成要素に存在し、一部ではプライベートであるためです。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[交差 '{0}' は 'なし' に縮小されました。一部の構成要素でプロパティ '{1}' の型が競合しているためです。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10167,6 +10206,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10515,6 +10560,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[これは拡張されている宣言です。拡張宣言を同じファイルに移動することを検討してください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11086,7 +11140,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[型はこのインポートで生成されます。名前空間スタイルのインポートは、呼び出すこともコンストラクトすることもできず、実行時にエラーが発生します。代わりに、ここで既定のインポートまたはインポートの要求を使用することを検討してください。]]></Val>
<Val><![CDATA[型はこのインポートで生成されます。名前空間スタイルのインポートは、呼び出すこともコンストラクトすることもできず、実行時にエラーが発生します。代わりに、ここで既定のインポートまたはインポートの require を使用することを検討してください。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11647,7 +11701,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[プロジェクト参照リダイレクト '{0}' のコンパイラ オプションを使用します。]]></Val>
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11799,6 +11853,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[すべてのオブジェクト リテラルをかっこで囲みます]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11814,6 +11871,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[次の本体をかっこで囲みます。これはオブジェクト リテラルです]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -436,7 +436,7 @@
<Str Cat="Text">
<Val><![CDATA['A label is not allowed here.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['여기서는 레이블을 사용할 수 없습니다.]]></Val>
<Val><![CDATA[여기서는 레이블을 사용할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1017,6 +1017,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[return 문 추가]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1059,6 +1062,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[누락된 모든 return 문 추가]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1845,6 +1851,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[인덱스 시그니처에는 후행 쉼표를 사용할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3633,6 +3642,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[선언이 다른 파일의 선언을 확대합니다. 직렬화할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5823,15 +5841,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[매개 변수 '{0}'의 이니셜라이저는 그 다음에 선언된 식별자 '{1}'을(를) 참조할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7179,6 +7188,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[숫자 열거형에는 컴퓨팅된 구성원만 사용할 수 있는데 이 식에는 '{0}' 형식이 있습니다. 전체 검사가 필요하지 않은 경우에는 개체 리터럴을 대신 사용해 보세요.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7390,7 +7408,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1}, '{2}'의 오버로드 {0}에서 다음 오류가 발생했습니다.]]></Val>
<Val><![CDATA[오버로드 {0}/{1}('{2}')에서 다음 오류가 발생했습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7440,11 +7458,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[매개 변수 '{0}'은(는) 해당 이니셜라이저에서 참조할 수 없습니다.]]></Val>
<Val><![CDATA[매개 변수 '{0}'은(는) 이 매개 변수 뒤에 선언된 식별자 '{1}'을(를) 참조할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[매개 변수 '{0}'은(는) 자신을 참조할 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8562,6 +8589,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[잘못된 본문 블록 중괄호 모두 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8595,6 +8625,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[블록 본문 중괄호 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9969,12 +10002,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[속성 '{1}'이(가) 여러 구성원에 있고 일부 구성원에서는 프라이빗 상태이므로 교집합 '{0}'이(가) 'never'로 감소했습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[일부 구성원에 속성 '{1}'에 충돌하는 형식이 있으므로 교집합 '{0}'이(가) 'never'로 감소했습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10167,6 +10206,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['delete' 연산자의 피연산자는 선택 사항이어야 합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10515,6 +10563,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[확대되는 선언입니다. 확대하는 선언을 같은 파일로 이동하는 것이 좋습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10747,7 +10804,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' 형식에 '{1}' 형식의 {2}, {3} 속성 등이 없습니다.]]></Val>
<Val><![CDATA['{0}' 형식에 '{1}' 형식의 {2} 외 {3}개 속성이 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11086,7 +11143,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[형식이 이 가져오기에서 시작됩니다. 네임스페이스 스타일 가져오기는 호출하거나 생성할 수 없으며, 런타임에 오류를 초래합니다. 여기서는 대신 기본 가져오기 또는 가져오기 필요를 사용하는 것이 좋습니다.]]></Val>
<Val><![CDATA[형식이 이 가져오기에서 시작됩니다. 네임스페이스 스타일 가져오기는 호출하거나 생성할 수 없으며, 런타임에 오류를 초래합니다. 여기서는 대신 기본 가져오기 또는 가져오기 require를 사용하는 것이 좋습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11799,6 +11856,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[괄호를 사용하여 모든 개체 리터럴 래핑]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11814,6 +11874,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[괄호를 사용하여 개체 리터럴이어야 하는 다음 본문 래핑]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -429,7 +429,7 @@
<Str Cat="Text">
<Val><![CDATA['A label is not allowed here.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[„Etykieta nie jest dozwolona w tym miejscu.]]></Val>
<Val><![CDATA[Etykieta nie jest dozwolona w tym miejscu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1007,6 +1007,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj instrukcję return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1049,6 +1052,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj wszystkie brakujące instrukcje return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1835,6 +1841,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Sygnatura indeksu nie może być zakończona przecinkiem.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3174,7 +3183,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kompilator rezerwuje nazwę „{0}” podczas emitowania niższego poziomu identyfikatora prywatnego.]]></Val>
<Val><![CDATA[Kompilator rezerwuje nazwę „{0}” podczas emitowania identyfikatora prywatnego na niższy poziom.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3623,6 +3632,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Deklaracja rozszerza deklarację w innym pliku. Nie można przeprowadzić serializacji.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5813,15 +5831,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Inicjator parametru „{0}” nie może przywoływać identyfikatora „{1}” zadeklarowanego po nim.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7169,6 +7178,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tylko wyliczenia numeryczne mogą mieć składowe obliczane, ale to wyrażenie ma typ „{0}”. Jeśli nie potrzebujesz sprawdzeń kompletności, rozważ użycie literału obiektu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7380,7 +7398,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Przeciążenie {0} {1}, „{2}”, dało następujący błąd.]]></Val>
<Val><![CDATA[Przeciążenie {0} z {1}, „{2}”, zwróciło następujący błąd.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7430,11 +7448,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Parametr „{0}” nie może być przywoływany w swoim inicjatorze.]]></Val>
<Val><![CDATA[Parametr „{0}” nie może przywoływać identyfikatora „{1}” zadeklarowanego po nim.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Parametr „{0}” nie może odwoływać się do siebie samego.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8549,6 +8576,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń wszystkie niepoprawne nawiasy klamrowe bloku treści]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8582,6 +8612,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń nawiasy klamrowe treści bloku]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9956,12 +9989,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Przecięcie „{0}” zostało zredukowane do wartości „never”, ponieważ właściwość „{1}” istnieje w wielu elementach składowych i w części z nich jest prywatna.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Przecięcie „{0}” zostało zredukowane do wartości „never”, ponieważ właściwość „{1}” zawiera typy powodujące konflikt w niektórych elementach składowych.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10154,6 +10193,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Operand operatora „delete” musi być opcjonalny.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10502,6 +10550,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[To jest rozszerzana deklaracja. Rozważ przeniesienie deklaracji rozszerzenia do tego samego pliku.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10734,7 +10791,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[W typie „{0}” brakuje następujących właściwości typu „{1}”: {2} i {3} więcej.]]></Val>
<Val><![CDATA[W typie „{0}” brakuje następujących właściwości z typu „{1}”: {2} i jeszcze {3}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11634,7 +11691,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Używanie opcji kompilatora przekierowania odwołania do projektu „{0}”.]]></Val>
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11786,6 +11843,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Zawijaj wszystkie literały obiektu z nawiasami]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11801,6 +11861,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Zawijaj następującą treść z nawiasami, która powinna być literałem obiektu]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1007,6 +1007,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar uma instrução return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1049,6 +1052,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar todas as instruções return ausentes]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1838,6 +1844,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uma assinatura de índice não pode ter uma vírgula à direita.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3177,7 +3186,7 @@
<Str Cat="Text">
<Val><![CDATA[Compiler reserves name '{0}' when emitting private identifier downlevel.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O compilador reserva o nome '{0}' ao emitir um nível inferior de identificador privado.]]></Val>
<Val><![CDATA[O compilador reserva o nome '{0}' ao emitir um identificador privado para versões anteriores.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -3626,6 +3635,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A declaração aumenta a declaração em outro arquivo. Isso não pode ser serializado.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5816,15 +5834,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O inicializador do parâmetro '{0}' não pode referenciar o identificador '{1}' declarado depois dele.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7172,6 +7181,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Somente enumerações numéricas podem ter membros computados, mas esta expressão tem o tipo '{0}'. Se você não precisar de verificações de exaustão, considere o uso de um literal de objeto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7433,11 +7451,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O parâmetro '{0}' não pode ser referenciado em seu inicializador.]]></Val>
<Val><![CDATA[O parâmetro '{0}' não pode referenciar o identificador '{1}' declarado depois dele.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O parâmetro '{0}' não pode referenciar a si mesmo.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7803,7 +7830,7 @@
<Str Cat="Text">
<Val><![CDATA[Prefix with 'declare']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Prefixo com 'declare']]></Val>
<Val><![CDATA[Prefixar com 'declare']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8051,15 +8078,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A propriedade '{0}' tem declarações conflitantes e é inacessível no tipo '{1}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Property '{0}' has no initializer and is not definitely assigned in the constructor.]]></Val>
@@ -8561,6 +8579,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover todas as chaves incorretas do bloco de corpo]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8594,6 +8615,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover as chaves do corpo do bloco]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9965,6 +9989,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A interseção '{0}' foi reduzida para 'never' porque a propriedade '{1}' existe em vários constituintes e é privada em alguns.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[A interseção '{0}' foi reduzida para 'never' porque a propriedade '{1}' tem tipos conflitantes em alguns constituintes.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_last_overload_gave_the_following_error_2770" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The last overload gave the following error.]]></Val>
@@ -10154,6 +10196,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O operando de um operador 'delete' precisa ser opcional.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10502,6 +10553,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Esta é a declaração que está sendo aumentada. Considere mover a declaração em aumento para o mesmo arquivo.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11073,7 +11133,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O tipo se origina nessa importação. Uma importação de estilo de namespace não pode ser chamada nem construída e causará uma falha no runtime. Considere usar uma importação padrão ou solicite uma importação aqui.]]></Val>
<Val><![CDATA[O tipo se origina nessa importação. Uma importação de estilo de namespace não pode ser chamada nem construída e causará uma falha no runtime. Considere usar uma importação padrão ou importe require aqui.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11634,7 +11694,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usando opções de compilador de redirecionamento de referência de projeto '{0}'.]]></Val>
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11786,6 +11846,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Colocar todo o literal de objeto entre parênteses]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11801,6 +11864,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Colocar entre parênteses o corpo a seguir, que deve ser um literal de objeto]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1016,6 +1016,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавить оператор return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1058,6 +1061,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавить все отсутствующие операторы return]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1173,7 +1179,7 @@
<Str Cat="Text">
<Val><![CDATA[Add 'export {}' to make this file into a module]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Добавить "export {}", чтобы сделать этот файл модулем]]></Val>
<Val><![CDATA[Добавить "export {}", чтобы превратить этот файл в модуль]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -1844,6 +1850,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Сигнатура индекса не может заканчиваться запятой.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3632,6 +3641,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Объявление дополняет объявление в другом файле. Сериализация невозможна.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5631,7 +5649,7 @@
<Str Cat="Text">
<Val><![CDATA[Import default '{0}' from module "{1}"]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Импорт "{0}" по умолчанию из модуля "{1}"]]></Val>
<Val><![CDATA[Импортировать "{0}" по умолчанию из модуля "{1}"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -5822,15 +5840,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Инициализатор параметра "{0}" не может ссылаться на идентификатор "{1}", объявленный после него.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7178,6 +7187,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Только числовые перечисления могут иметь вычисляемые элементы, но это выражение имеет тип "{0}". Если вы не хотите проверять полноту, рекомендуется использовать вместо этого объектный литерал.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7439,11 +7457,20 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[На параметр "{0}" невозможно ссылаться в его инициализаторе.]]></Val>
<Val><![CDATA[Параметр "{0}" не может ссылаться на идентификатор "{1}", объявленный после него.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Параметр "{0}" не может ссылаться сам на себя.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -8561,6 +8588,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удалить все неправильные фигурные скобки вокруг тел блоков]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8594,6 +8624,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Удалить фигурные скобки вокруг тела блока]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9968,12 +10001,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Пересечение "{0}" было сокращено до "never", так как свойство "{1}" существует в нескольких составляющих и является частным в некоторых из них.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Пересечение "{0}" было сокращено до "never", так как свойство "{1}" имеет конфликтующие типы в некоторых составляющих.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10166,6 +10205,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Операнд оператора "delete" должен быть необязательным.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10514,6 +10562,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Это объявление дополняется другим объявлением. Попробуйте переместить дополняющее объявление в тот же файл.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -10737,7 +10794,7 @@
<Str Cat="Text">
<Val><![CDATA[Type '{0}' is missing the following properties from type '{1}': {2}]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[В типе "{0}" отсутствуют следующие свойства из типа "{1}": {2}.]]></Val>
<Val><![CDATA[В типе "{0}" отсутствуют следующие свойства из типа "{1}": {2}]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11085,7 +11142,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Тип происходит от этого импорта. Импорт стиля пространства имен не может быть вызван или создан и приведет к сбою во время выполнения. Вместо этого рекомендуется использовать импорт по умолчанию или импорт, указанный здесь.]]></Val>
<Val><![CDATA[Тип происходит от этого импорта. Импорт стиля пространства имен не может быть вызван или создан и приведет к сбою во время выполнения. Вместо этого рекомендуется использовать импорт по умолчанию или импортировать сюда "require".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11646,7 +11703,7 @@
<Str Cat="Text">
<Val><![CDATA[Using compiler options of project reference redirect '{0}'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Использование параметров компилятора перенаправления ссылки на проект "{0}".]]></Val>
<Val><![CDATA[Использование параметров компилятора для перенаправления ссылки на проект "{0}".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11798,6 +11855,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Заключить все литералы объектов в круглые скобки]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11813,6 +11873,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Заключить следующий текст в круглые скобки, которые должны быть литералом объекта]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1010,6 +1010,9 @@
<Item ItemId=";Add_a_return_statement_95111" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add a return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Return deyimi ekleyin]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1052,6 +1055,9 @@
<Item ItemId=";Add_all_missing_return_statement_95114" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add all missing return statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tüm eksik return deyimlerini ekleyin]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1838,6 +1844,9 @@
<Item ItemId=";An_index_signature_cannot_have_a_trailing_comma_1025" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[An index signature cannot have a trailing comma.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dizin imzasının sonunda virgül olamaz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -3626,6 +3635,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration augments declaration in another file. This cannot be serialized.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.]]></Val>
@@ -5816,15 +5831,6 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' parametresinin başlatıcısı, kendinden sonra bildirilen '{1}' tanımlayıcısına başvuramaz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Initializer provides no value for this binding element and the binding element has no default value.]]></Val>
@@ -7172,6 +7178,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Yalnızca sayısal sabit listelerinde hesaplanmış üyeler olabilir ancak bu ifadede '{0}' türü var. Kapsamlılık denetimleri gerekmiyorsa bunun yerine bir nesne sabit değeri kullanmayı düşünebilirsiniz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Only public and protected methods of the base class are accessible via the 'super' keyword.]]></Val>
@@ -7383,7 +7398,7 @@
<Str Cat="Text">
<Val><![CDATA[Overload {0} of {1}, '{2}', gave the following error.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{1} metodunun {0} aşırı yüklemesi ('{2}'), aşağıdaki hatayı verdi.]]></Val>
<Val><![CDATA[{0}/{1} aşırı yükleme '{2}' imzası, aşağıdaki hatayı verdi.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -7433,12 +7448,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_be_referenced_in_its_initializer_2372" ItemType="0" PsrId="306" Leaf="true">
<Item ItemId=";Parameter_0_cannot_reference_identifier_1_declared_after_it_2373" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot be referenced in its initializer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{0}' parametresine başlatıcısında başvurulamaz.]]></Val>
</Tgt>
<Val><![CDATA[Parameter '{0}' cannot reference identifier '{1}' declared after it.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Parameter_0_cannot_reference_itself_2372" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Parameter '{0}' cannot reference itself.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8555,6 +8573,9 @@
<Item ItemId=";Remove_all_incorrect_body_block_braces_95115" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all incorrect body block braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tüm yanlış gövde bloğu küme ayraçlarını kaldırın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -8588,6 +8609,9 @@
<Item ItemId=";Remove_block_body_braces_95112" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove block body braces]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Blok gövdesi küme ayraçlarını kaldırın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -9962,12 +9986,18 @@
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{1}' özelliği birden çok destekçide bulunduğundan ve bazılarında özel olduğundan, '{0}' kesişimi 'never' değerine düşürüldü.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{1}' özelliği bazı bileşenlerde çakışan türlere sahip olduğundan '{0}' kesişimi 'never' değerine düşürüldü.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -10160,6 +10190,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_a_delete_operator_must_be_optional_2790" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of a 'delete' operator must be optional.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['delete' operatörünün işleneni isteğe bağlı olmalıdır.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The operand of an increment or decrement operator may not be an optional property access.]]></Val>
@@ -10508,6 +10547,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This is the declaration being augmented. Consider moving the augmenting declaration into the same file.]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_may_be_converted_to_an_async_function_80006" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This may be converted to an async function.]]></Val>
@@ -11079,7 +11124,7 @@
<Str Cat="Text">
<Val><![CDATA[Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tür bu içeri aktarmadan kaynaklanıyor. Bir ad alanı stili içeri aktarma işlemi çağrılamaz ya da oluşturulamaz ve çalışma zamanında hataya neden olur. Bunun yerine varsayılan içeri aktarmayı kullanmayı veya içeri aktarmayı burada gerektirmeyi deneyin.]]></Val>
<Val><![CDATA[Tür bu içeri aktarmadan kaynaklanıyor. Ad alanı stili içeri aktarma işlemi çağrılamaz ya da oluşturulamaz ve çalışma zamanında hataya neden olur. Bunun yerine varsayılan içeri aktarmayı kullanabilir veya burada içeri aktarma gerektirebilirsiniz.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
@@ -11792,6 +11837,9 @@
<Item ItemId=";Wrap_all_object_literal_with_parentheses_95116" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap all object literal with parentheses]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tüm nesne sabit değerini parantez içine alın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -11807,6 +11855,9 @@
<Item ItemId=";Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Wrap the following body with parentheses which should be an object literal]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nesne sabit değeri olması gereken aşağıdaki gövdeyi parantez içine alın]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
+6 -2
View File
@@ -2784,7 +2784,7 @@ namespace ts.server.protocol {
/**
* Arguments for navto request message.
*/
export interface NavtoRequestArgs extends FileRequestArgs {
export interface NavtoRequestArgs {
/**
* Search term to navigate to from current location; term can
* be '.*' or an identifier prefix.
@@ -2794,6 +2794,10 @@ namespace ts.server.protocol {
* Optional limit on the number of items to return.
*/
maxResultCount?: number;
/**
* The file for the request (absolute pathname required).
*/
file?: string;
/**
* Optional flag to indicate we want results for just the current file
* or the entire project.
@@ -2809,7 +2813,7 @@ namespace ts.server.protocol {
* match the search term given in argument 'searchTerm'. The
* context for the search is given by the named file.
*/
export interface NavtoRequest extends FileRequest {
export interface NavtoRequest extends Request {
command: CommandTypes.Navto;
arguments: NavtoRequestArgs;
}
+40 -27
View File
@@ -304,7 +304,7 @@ namespace ts.server {
projects,
defaultProject,
/*initialLocation*/ undefined,
({ project }, tryAddToTodo) => {
(project, _, tryAddToTodo) => {
for (const output of action(project)) {
if (!contains(outputs, output, resultsEqual) && !tryAddToTodo(project, getLocation(output))) {
outputs.push(output);
@@ -329,7 +329,7 @@ namespace ts.server {
projects,
defaultProject,
initialLocation,
({ project, location }, tryAddToTodo) => {
(project, location, tryAddToTodo) => {
for (const output of project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, hostPreferences.providePrefixAndSuffixTextForRename) || emptyArray) {
if (!contains(outputs, output, documentSpansEqual) && !tryAddToTodo(project, documentSpanLocation(output))) {
outputs.push(output);
@@ -358,7 +358,7 @@ namespace ts.server {
projects,
defaultProject,
initialLocation,
({ project, location }, getMappedLocation) => {
(project, location, getMappedLocation) => {
for (const outputReferencedSymbol of project.getLanguageService().findReferences(location.fileName, location.pos) || emptyArray) {
const mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ?
@@ -408,7 +408,8 @@ namespace ts.server {
}
type CombineProjectOutputCallback<TLocation extends DocumentPosition | undefined> = (
where: ProjectAndLocation<TLocation>,
project: Project,
location: TLocation,
getMappedLocation: (project: Project, location: DocumentPosition) => DocumentPosition | undefined,
) => void;
@@ -422,9 +423,9 @@ namespace ts.server {
let toDo: ProjectAndLocation<TLocation>[] | undefined;
const seenProjects = createMap<true>();
forEachProjectInProjects(projects, initialLocation && initialLocation.fileName, (project, path) => {
// TLocation shoud be either `DocumentPosition` or `undefined`. Since `initialLocation` is `TLocation` this cast should be valid.
// TLocation should be either `DocumentPosition` or `undefined`. Since `initialLocation` is `TLocation` this cast should be valid.
const location = (initialLocation ? { fileName: path, pos: initialLocation.pos } : undefined) as TLocation;
toDo = callbackProjectAndLocation({ project, location }, projectService, toDo, seenProjects, cb);
toDo = callbackProjectAndLocation(project, location, projectService, toDo, seenProjects, cb);
});
// After initial references are collected, go over every other project and see if it has a reference for the symbol definition.
@@ -442,14 +443,16 @@ namespace ts.server {
if (!addToSeen(seenProjects, project)) return;
const definition = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);
if (definition) {
toDo = callbackProjectAndLocation<TLocation>({ project, location: definition as TLocation }, projectService, toDo, seenProjects, cb);
toDo = callbackProjectAndLocation<TLocation>(project, definition as TLocation, projectService, toDo, seenProjects, cb);
}
});
}
}
while (toDo && toDo.length) {
toDo = callbackProjectAndLocation(Debug.checkDefined(toDo.pop()), projectService, toDo, seenProjects, cb);
const next = toDo.pop();
Debug.assertIsDefined(next);
toDo = callbackProjectAndLocation(next.project, next.location, projectService, toDo, seenProjects, cb);
}
}
@@ -487,31 +490,33 @@ namespace ts.server {
}
function callbackProjectAndLocation<TLocation extends DocumentPosition | undefined>(
projectAndLocation: ProjectAndLocation<TLocation>,
project: Project,
location: TLocation,
projectService: ProjectService,
toDo: ProjectAndLocation<TLocation>[] | undefined,
seenProjects: Map<true>,
cb: CombineProjectOutputCallback<TLocation>,
): ProjectAndLocation<TLocation>[] | undefined {
const { project, location } = projectAndLocation;
if (project.getCancellationToken().isCancellationRequested()) return undefined; // Skip rest of toDo if cancelled
// If this is not the file we were actually looking, return rest of the toDo
if (isLocationProjectReferenceRedirect(project, location)) return toDo;
cb(projectAndLocation, (project, location) => {
addToSeen(seenProjects, projectAndLocation.project);
const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, location);
cb(project, location, (innerProject, location) => {
addToSeen(seenProjects, project);
const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(innerProject, location);
if (!originalLocation) return undefined;
const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName)!;
toDo = toDo || [];
for (const project of originalScriptInfo.containingProjects) {
addToTodo({ project, location: originalLocation as TLocation }, toDo, seenProjects);
addToTodo(project, originalLocation as TLocation, toDo, seenProjects);
}
const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);
if (symlinkedProjectsMap) {
symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => {
for (const symlinkedProject of symlinkedProjects) addToTodo({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } as TLocation }, toDo!, seenProjects);
for (const symlinkedProject of symlinkedProjects) {
addToTodo(symlinkedProject, { fileName: symlinkedPath, pos: originalLocation.pos } as TLocation, toDo!, seenProjects);
}
});
}
return originalLocation === location ? undefined : originalLocation;
@@ -519,8 +524,8 @@ namespace ts.server {
return toDo;
}
function addToTodo<TLocation extends DocumentPosition | undefined>(projectAndLocation: ProjectAndLocation<TLocation>, toDo: Push<ProjectAndLocation<TLocation>>, seenProjects: Map<true>): void {
if (addToSeen(seenProjects, projectAndLocation.project)) toDo.push(projectAndLocation);
function addToTodo<TLocation extends DocumentPosition | undefined>(project: Project, location: TLocation, toDo: Push<ProjectAndLocation<TLocation>>, seenProjects: Map<true>): void {
if (addToSeen(seenProjects, project)) toDo.push({ project, location });
}
function addToSeen(seenProjects: Map<true>, project: Project) {
@@ -1323,7 +1328,7 @@ namespace ts.server {
// filter handles case when 'projects' is undefined
projects = filter(projects, p => p.languageServiceEnabled && !p.isOrphan());
if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) {
this.projectService.logErrorForScriptInfoNotFound(args.file);
this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName);
return Errors.ThrowNoProject();
}
return symLinkedProjects ? { projects: projects!, symLinkedProjects } : projects!; // TODO: GH#18217
@@ -1335,6 +1340,9 @@ namespace ts.server {
if (project) {
return project;
}
if (!args.file) {
return Errors.ThrowNoProject();
}
}
const info = this.projectService.getScriptInfo(args.file)!;
return info.getDefaultProject();
@@ -1894,20 +1902,25 @@ namespace ts.server {
}
private getFullNavigateToItems(args: protocol.NavtoRequestArgs): readonly NavigateToItem[] {
const { currentFileOnly, searchValue, maxResultCount } = args;
const { currentFileOnly, searchValue, maxResultCount, projectFileName } = args;
if (currentFileOnly) {
const { file, project } = this.getFileAndProject(args);
Debug.assertDefined(args.file);
const { file, project } = this.getFileAndProject(args as protocol.FileRequestArgs);
return project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file);
}
else {
return combineProjectOutputWhileOpeningReferencedProjects<NavigateToItem>(
this.getProjects(args),
this.getDefaultProject(args),
project =>
project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*fileName*/ undefined, /*excludeDts*/ project.isNonTsProject()),
documentSpanLocation,
else if (!args.file && !projectFileName) {
return combineProjectOutputFromEveryProject(
this.projectService,
project => project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*filename*/ undefined, /*excludeDts*/ project.isNonTsProject()),
navigateToItemIsEqualTo);
}
const fileArgs = args as protocol.FileRequestArgs;
return combineProjectOutputWhileOpeningReferencedProjects<NavigateToItem>(
this.getProjects(fileArgs),
this.getDefaultProject(fileArgs),
project => project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*fileName*/ undefined, /*excludeDts*/ project.isNonTsProject()),
documentSpanLocation,
navigateToItemIsEqualTo);
function navigateToItemIsEqualTo(a: NavigateToItem, b: NavigateToItem): boolean {
if (a === b) {
@@ -16,6 +16,7 @@ namespace ts.codefix {
return undefined;
}
const newLineCharacter = sourceFile.checkJsDirective ? "" : getNewLineOrDefaultFromHost(host, formatContext.options);
const fixes: CodeFixAction[] = [
// fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file.
createCodeFixActionWithoutFixAll(
@@ -23,7 +24,7 @@ namespace ts.codefix {
[createFileTextChanges(sourceFile.fileName, [
createTextChange(sourceFile.checkJsDirective
? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
: createTextSpan(0, 0), `// @ts-nocheck${getNewLineOrDefaultFromHost(host, formatContext.options)}`),
: createTextSpan(0, 0), `// @ts-nocheck${newLineCharacter}`),
])],
Diagnostics.Disable_checking_for_this_file),
];
+9 -10
View File
@@ -21,7 +21,7 @@ namespace ts.codefix {
return [createCodeFixAction(fixName, changes, [Diagnostics.Add_missing_enum_member_0, token.text], fixId, Diagnostics.Add_all_missing_members)];
}
const { parentDeclaration, declSourceFile, inJs, makeStatic, token, call } = info;
const methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, context.preferences);
const methodCodeAction = call && getActionForMethodDeclaration(context, declSourceFile, parentDeclaration, token, call, makeStatic, inJs);
const addMember = inJs && !isInterfaceDeclaration(parentDeclaration) ?
singleElementArray(getActionsForAddMissingMemberInJavascriptFile(context, declSourceFile, parentDeclaration, token, makeStatic)) :
getActionsForAddMissingMemberInTypeScriptFile(context, declSourceFile, parentDeclaration, token, makeStatic);
@@ -29,7 +29,7 @@ namespace ts.codefix {
},
fixIds: [fixId],
getAllCodeActions: context => {
const { program, preferences } = context;
const { program } = context;
const checker = program.getTypeChecker();
const seen = createMap<true>();
@@ -66,7 +66,7 @@ namespace ts.codefix {
// Always prefer to add a method declaration if possible.
if (call && !isPrivateIdentifier(token)) {
addMethodDeclaration(context, changes, declSourceFile, parentDeclaration, token, call, makeStatic, inJs, preferences);
addMethodDeclaration(context, changes, declSourceFile, parentDeclaration, token, call, makeStatic, inJs);
}
else {
if (inJs && !isInterfaceDeclaration(parentDeclaration)) {
@@ -304,12 +304,11 @@ namespace ts.codefix {
token: Identifier | PrivateIdentifier,
callExpression: CallExpression,
makeStatic: boolean,
inJs: boolean,
preferences: UserPreferences,
inJs: boolean
): CodeFixAction | undefined {
// Private methods are not implemented yet.
if (isPrivateIdentifier(token)) { return undefined; }
const changes = textChanges.ChangeTracker.with(context, t => addMethodDeclaration(context, t, declSourceFile, classDeclaration, token, callExpression, makeStatic, inJs, preferences));
const changes = textChanges.ChangeTracker.with(context, t => addMethodDeclaration(context, t, declSourceFile, classDeclaration, token, callExpression, makeStatic, inJs));
return createCodeFixAction(fixName, changes, [makeStatic ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, token.text], fixId, Diagnostics.Add_all_missing_members);
}
@@ -321,18 +320,18 @@ namespace ts.codefix {
token: Identifier,
callExpression: CallExpression,
makeStatic: boolean,
inJs: boolean,
preferences: UserPreferences,
inJs: boolean
): void {
const methodDeclaration = createMethodFromCallExpression(context, callExpression, token.text, inJs, makeStatic, preferences, typeDecl);
const importAdder = createImportAdder(declSourceFile, context.program, context.preferences, context.host);
const methodDeclaration = createMethodFromCallExpression(context, callExpression, token.text, inJs, makeStatic, typeDecl, importAdder);
const containingMethodDeclaration = getAncestor(callExpression, SyntaxKind.MethodDeclaration);
if (containingMethodDeclaration && containingMethodDeclaration.parent === typeDecl) {
changeTracker.insertNodeAfter(declSourceFile, containingMethodDeclaration, methodDeclaration);
}
else {
changeTracker.insertNodeAtClassStart(declSourceFile, typeDecl, methodDeclaration);
}
importAdder.writeFixes(changeTracker);
}
function addEnumMemberDeclaration(changes: textChanges.ChangeTracker, checker: TypeChecker, token: Identifier, enumDeclaration: EnumDeclaration) {
@@ -154,6 +154,13 @@ namespace ts.codefix {
}
if (isIdentifier(token) && canPrefix(token)) {
changes.replaceNode(sourceFile, token, createIdentifier(`_${token.text}`));
if (isParameter(token.parent)) {
getJSDocParameterTags(token.parent).forEach((tag) => {
if (isIdentifier(tag.name)) {
changes.replaceNode(sourceFile, tag.name, createIdentifier(`_${tag.name.text}`));
}
});
}
}
}
+15 -5
View File
@@ -218,16 +218,26 @@ namespace ts.codefix {
methodName: string,
inJs: boolean,
makeStatic: boolean,
preferences: UserPreferences,
contextNode: Node,
importAdder: ImportAdder
): MethodDeclaration {
const body = !isInterfaceDeclaration(contextNode);
const { typeArguments, arguments: args, parent } = call;
const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions());
const checker = context.program.getTypeChecker();
const tracker = getNoopSymbolTrackerWithResolver(context);
const types = map(args, arg =>
// Widen the type so we don't emit nonsense annotations like "function fn(x: 3) {"
checker.typeToTypeNode(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(arg)), contextNode, /*flags*/ undefined, tracker));
const types = map(args, arg => {
const type = checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(arg));
const typeNode = checker.typeToTypeNode(type, contextNode, /*flags*/ undefined, tracker);
if (typeNode?.kind === SyntaxKind.ImportType) {
const importableReference = tryGetAutoImportableReferenceFromImportTypeNode(typeNode, type, scriptTarget);
if (importableReference) {
importSymbols(importAdder, importableReference.symbols);
return importableReference.typeReference;
}
}
return typeNode;
});
const names = map(args, arg =>
isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : undefined);
const contextualType = checker.getContextualType(call);
@@ -242,7 +252,7 @@ namespace ts.codefix {
createTypeParameterDeclaration(CharacterCodes.T + typeArguments!.length - 1 <= CharacterCodes.Z ? String.fromCharCode(CharacterCodes.T + i) : `T${i}`)),
/*parameters*/ createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, inJs),
/*type*/ returnType,
body ? createStubbedMethodBody(preferences) : undefined);
body ? createStubbedMethodBody(context.preferences) : undefined);
}
function createDummyParameters(argCount: number, names: (string | undefined)[] | undefined, types: (TypeNode | undefined)[] | undefined, minArgumentCount: number | undefined, inJs: boolean): ParameterDeclaration[] {
+21 -15
View File
@@ -45,7 +45,6 @@ namespace ts.codefix {
// Keys are import clause node IDs.
const addToExisting = createMap<{ readonly importClauseOrBindingPattern: ImportClause | ObjectBindingPattern, defaultImport: string | undefined; readonly namedImports: string[], canUseTypeOnlyImport: boolean }>();
const newImports = createMap<Mutable<ImportsCollection & { useRequire: boolean }>>();
let lastModuleSpecifier: string | undefined;
return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes };
function addImportFromDiagnostic(diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) {
@@ -97,7 +96,6 @@ namespace ts.codefix {
let entry = newImports.get(moduleSpecifier);
if (!entry) {
newImports.set(moduleSpecifier, entry = { namedImports: [], namespaceLikeImport: undefined, typeOnly, useRequire });
lastModuleSpecifier = moduleSpecifier;
}
else {
// An import clause can only be type-only if every import fix contributing to it can be type-only.
@@ -135,10 +133,15 @@ namespace ts.codefix {
addToExisting.forEach(({ importClauseOrBindingPattern, defaultImport, namedImports, canUseTypeOnlyImport }) => {
doAddExistingFix(changeTracker, sourceFile, importClauseOrBindingPattern, defaultImport, namedImports, canUseTypeOnlyImport);
});
let newDeclarations: Statement | readonly Statement[] | undefined;
newImports.forEach(({ useRequire, ...imports }, moduleSpecifier) => {
const addDeclarations = useRequire ? addNewRequires : addNewImports;
addDeclarations(changeTracker, sourceFile, moduleSpecifier, quotePreference, imports, /*blankLineBetween*/ lastModuleSpecifier === moduleSpecifier);
const getDeclarations = useRequire ? getNewRequires : getNewImports;
newDeclarations = combine(newDeclarations, getDeclarations(moduleSpecifier, quotePreference, imports));
});
if (newDeclarations) {
insertImports(changeTracker, sourceFile, newDeclarations, /*blankLineBetween*/ true);
}
}
}
@@ -631,11 +634,11 @@ namespace ts.codefix {
}
case ImportFixKind.AddNew: {
const { importKind, moduleSpecifier, typeOnly, useRequire } = fix;
const addDeclarations = useRequire ? addNewRequires : addNewImports;
const getDeclarations = useRequire ? getNewRequires : getNewImports;
const importsCollection = importKind === ImportKind.Default ? { defaultImport: symbolName, typeOnly } :
importKind === ImportKind.Named ? { namedImports: [symbolName], typeOnly } :
{ namespaceLikeImport: { importKind, name: symbolName }, typeOnly };
addDeclarations(changes, sourceFile, moduleSpecifier, quotePreference, importsCollection, /*blankLineBetween*/ true);
insertImports(changes, sourceFile, getDeclarations(moduleSpecifier, quotePreference, importsCollection), /*blankLineBetween*/ true);
return [importKind === ImportKind.Default ? Diagnostics.Import_default_0_from_module_1 : Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
}
default:
@@ -717,13 +720,13 @@ namespace ts.codefix {
readonly name: string;
};
}
function addNewImports(changes: textChanges.ChangeTracker, sourceFile: SourceFile, moduleSpecifier: string, quotePreference: QuotePreference, imports: ImportsCollection, blankLineBetween: boolean): void {
function getNewImports(moduleSpecifier: string, quotePreference: QuotePreference, imports: ImportsCollection): Statement | readonly Statement[] {
const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference);
let statements: Statement | readonly Statement[] | undefined;
if (imports.defaultImport !== undefined || imports.namedImports?.length) {
insertImport(changes, sourceFile,
makeImport(
imports.defaultImport === undefined ? undefined : createIdentifier(imports.defaultImport),
imports.namedImports?.map(n => createImportSpecifier(/*propertyName*/ undefined, createIdentifier(n))), moduleSpecifier, quotePreference, imports.typeOnly), /*blankLineBetween*/ blankLineBetween);
statements = combine(statements, makeImport(
imports.defaultImport === undefined ? undefined : createIdentifier(imports.defaultImport),
imports.namedImports?.map(n => createImportSpecifier(/*propertyName*/ undefined, createIdentifier(n))), moduleSpecifier, quotePreference, imports.typeOnly));
}
const { namespaceLikeImport, typeOnly } = imports;
if (namespaceLikeImport) {
@@ -741,12 +744,14 @@ namespace ts.codefix {
createNamespaceImport(createIdentifier(namespaceLikeImport.name)),
typeOnly),
quotedModuleSpecifier);
insertImport(changes, sourceFile, declaration, /*blankLineBetween*/ blankLineBetween);
statements = combine(statements, declaration);
}
return Debug.checkDefined(statements);
}
function addNewRequires(changes: textChanges.ChangeTracker, sourceFile: SourceFile, moduleSpecifier: string, quotePreference: QuotePreference, imports: ImportsCollection, blankLineBetween: boolean) {
function getNewRequires(moduleSpecifier: string, quotePreference: QuotePreference, imports: ImportsCollection): Statement | readonly Statement[] {
const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference);
let statements: Statement | readonly Statement[] | undefined;
// const { default: foo, bar, etc } = require('./mod');
if (imports.defaultImport || imports.namedImports?.length) {
const bindingElements = imports.namedImports?.map(name => createBindingElement(/*dotDotDotToken*/ undefined, /*propertyName*/ undefined, name)) || [];
@@ -754,13 +759,14 @@ namespace ts.codefix {
bindingElements.unshift(createBindingElement(/*dotDotDotToken*/ undefined, "default", imports.defaultImport));
}
const declaration = createConstEqualsRequireDeclaration(createObjectBindingPattern(bindingElements), quotedModuleSpecifier);
insertImport(changes, sourceFile, declaration, blankLineBetween);
statements = combine(statements, declaration);
}
// const foo = require('./mod');
if (imports.namespaceLikeImport) {
const declaration = createConstEqualsRequireDeclaration(imports.namespaceLikeImport.name, quotedModuleSpecifier);
insertImport(changes, sourceFile, declaration, blankLineBetween);
statements = combine(statements, declaration);
}
return Debug.checkDefined(statements);
}
function createConstEqualsRequireDeclaration(name: string | ObjectBindingPattern, quotedModuleSpecifier: StringLiteral): VariableStatement {
+6 -5
View File
@@ -603,7 +603,7 @@ namespace ts.codefix {
switch (node.parent.kind) {
case SyntaxKind.ExpressionStatement:
addCandidateType(usage, checker.getVoidType());
inferTypeFromExpressionStatement(node, usage);
break;
case SyntaxKind.PostfixUnaryExpression:
usage.isNumber = true;
@@ -661,6 +661,10 @@ namespace ts.codefix {
}
}
function inferTypeFromExpressionStatement(node: Expression, usage: Usage): void {
addCandidateType(usage, isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());
}
function inferTypeFromPrefixUnaryExpression(node: PrefixUnaryExpression, usage: Usage): void {
switch (node.operator) {
case SyntaxKind.PlusPlusToken:
@@ -960,10 +964,7 @@ namespace ts.codefix {
if (usage.numberIndex) {
types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));
}
if (usage.properties && usage.properties.size
|| usage.calls && usage.calls.length
|| usage.constructs && usage.constructs.length
|| usage.stringIndex) {
if (usage.properties?.size || usage.calls?.length || usage.constructs?.length || usage.stringIndex) {
types.push(inferStructuralType(usage));
}
+9 -2
View File
@@ -2427,7 +2427,8 @@ namespace ts.Completions {
return baseSymbols.filter(propertySymbol =>
!existingMemberNames.has(propertySymbol.escapedName) &&
!!propertySymbol.declarations &&
!(getDeclarationModifierFlagsFromSymbol(propertySymbol) & ModifierFlags.Private));
!(getDeclarationModifierFlagsFromSymbol(propertySymbol) & ModifierFlags.Private) &&
!isPrivateIdentifierPropertyDeclaration(propertySymbol.valueDeclaration));
}
/**
@@ -2684,10 +2685,16 @@ namespace ts.Completions {
return cls;
}
break;
case SyntaxKind.Identifier: // class c extends React.Component { a: () => 1\n compon| }
case SyntaxKind.Identifier: {
// class c { public prop = c| }
if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {
return undefined;
}
// class c extends React.Component { a: () => 1\n compon| }
if (isFromObjectTypeDeclaration(location)) {
return findAncestor(location, isObjectTypeDeclaration);
}
}
}
if (!contextToken) return undefined;
+2
View File
@@ -363,6 +363,8 @@ namespace ts.JsDoc {
// want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'.
return commentOwner.parent.kind === SyntaxKind.ModuleDeclaration ? undefined : { commentOwner };
case SyntaxKind.ExpressionStatement:
return getCommentOwnerInfoWorker((commentOwner as ExpressionStatement).expression);
case SyntaxKind.BinaryExpression: {
const be = commentOwner as BinaryExpression;
if (getAssignmentDeclarationKind(be) === AssignmentDeclarationKind.None) {
@@ -199,6 +199,7 @@ namespace ts.OutliningElementsCollector {
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.EnumDeclaration:
case SyntaxKind.CaseBlock:
case SyntaxKind.TypeLiteral:
return spanForNode(n);
case SyntaxKind.CaseClause:
case SyntaxKind.DefaultClause:
@@ -44,6 +44,7 @@ namespace ts.refactor.addOrRemoveBracesToArrowFunction {
const { expression, returnStatement, func } = info;
let body: ConciseBody;
if (actionName === addBracesActionName) {
const returnStatement = createReturn(expression);
body = createBlock([returnStatement], /* multiLine */ true);
@@ -54,13 +55,18 @@ namespace ts.refactor.addOrRemoveBracesToArrowFunction {
const actualExpression = expression || createVoidZero();
body = needsParentheses(actualExpression) ? createParen(actualExpression) : actualExpression;
suppressLeadingAndTrailingTrivia(body);
copyTrailingAsLeadingComments(returnStatement, body, file, SyntaxKind.MultiLineCommentTrivia, /* hasTrailingNewLine */ false);
copyLeadingComments(returnStatement, body, file, SyntaxKind.MultiLineCommentTrivia, /* hasTrailingNewLine */ false);
copyTrailingComments(returnStatement, body, file, SyntaxKind.MultiLineCommentTrivia, /* hasTrailingNewLine */ false);
}
else {
Debug.fail("invalid action");
}
const edits = textChanges.ChangeTracker.with(context, t => t.replaceNode(file, func.body, body));
const edits = textChanges.ChangeTracker.with(context, t => {
t.replaceNode(file, func.body, body);
});
return { renameFilename: undefined, renameLocation: undefined, edits };
}
+1 -1
View File
@@ -121,7 +121,7 @@ namespace ts.refactor {
const quotePreference = getQuotePreference(oldFile, preferences);
const importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, quotePreference);
if (importsFromNewFile) {
insertImport(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true);
insertImports(changes, oldFile, importsFromNewFile, /*blankLineBetween*/ true);
}
deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker);
+12 -1
View File
@@ -156,7 +156,18 @@ namespace ts {
}
function isPromiseHandler(node: Node): node is CallExpression {
return isCallExpression(node) && (hasPropertyAccessExpressionWithName(node, "then") || hasPropertyAccessExpressionWithName(node, "catch"));
return isCallExpression(node) && (
hasPropertyAccessExpressionWithName(node, "then") && hasSupportedNumberOfArguments(node) ||
hasPropertyAccessExpressionWithName(node, "catch"));
}
function hasSupportedNumberOfArguments(node: CallExpression) {
if (node.arguments.length > 2) return false;
if (node.arguments.length < 2) return true;
return some(node.arguments, arg => {
return arg.kind === SyntaxKind.NullKeyword ||
isIdentifier(arg) && arg.text === "undefined";
});
}
// should be kept up to date with getTransformationBody in convertToAsyncFunction.ts
+32 -7
View File
@@ -349,11 +349,25 @@ namespace ts.textChanges {
}
public insertNodeAtTopOfFile(sourceFile: SourceFile, newNode: Statement, blankLineBetween: boolean): void {
this.insertAtTopOfFile(sourceFile, newNode, blankLineBetween);
}
public insertNodesAtTopOfFile(sourceFile: SourceFile, newNodes: readonly Statement[], blankLineBetween: boolean): void {
this.insertAtTopOfFile(sourceFile, newNodes, blankLineBetween);
}
private insertAtTopOfFile(sourceFile: SourceFile, insert: Statement | readonly Statement[], blankLineBetween: boolean): void {
const pos = getInsertionPositionAtSourceFileTop(sourceFile);
this.insertNodeAt(sourceFile, pos, newNode, {
const options = {
prefix: pos === 0 ? undefined : this.newLineCharacter,
suffix: (isLineBreak(sourceFile.text.charCodeAt(pos)) ? "" : this.newLineCharacter) + (blankLineBetween ? this.newLineCharacter : ""),
});
};
if (isArray(insert)) {
this.insertNodesAt(sourceFile, pos, insert, options);
}
else {
this.insertNodeAt(sourceFile, pos, insert, options);
}
}
public insertFirstParameter(sourceFile: SourceFile, parameters: NodeArray<ParameterDeclaration>, newParam: ParameterDeclaration): void {
@@ -434,7 +448,7 @@ namespace ts.textChanges {
}
}
else {
endNode = node.kind !== SyntaxKind.VariableDeclaration && node.questionToken ? node.questionToken : node.name;
endNode = (node.kind === SyntaxKind.VariableDeclaration ? node.exclamationToken : node.questionToken) ?? node.name;
}
this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " });
@@ -873,7 +887,7 @@ namespace ts.textChanges {
namespace changesToText {
export function getTextChangesFromChanges(changes: readonly Change[], newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText | undefined): FileTextChanges[] {
return group(changes, c => c.sourceFile.path).map(changesInFile => {
return mapDefined(group(changes, c => c.sourceFile.path), changesInFile => {
const sourceFile = changesInFile[0].sourceFile;
// order changes by start position
// If the start position is the same, put the shorter range first, since an empty range (x, x) may precede (x, y) but not vice-versa.
@@ -883,9 +897,20 @@ namespace ts.textChanges {
Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", () =>
`${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`);
}
const textChanges = normalized.map(c =>
createTextChange(createTextSpanFromRange(c.range), computeNewText(c, sourceFile, newLineCharacter, formatContext, validate)));
return { fileName: sourceFile.fileName, textChanges };
const textChanges = mapDefined(normalized, c => {
const span = createTextSpanFromRange(c.range);
const newText = computeNewText(c, sourceFile, newLineCharacter, formatContext, validate);
// Filter out redundant changes.
if (span.length === newText.length && stringContainsAt(sourceFile.text, newText, span.start)) {
return undefined;
}
return createTextChange(span, newText);
});
return textChanges.length > 0 ? { fileName: sourceFile.fileName, textChanges } : undefined;
});
}
+42 -4
View File
@@ -1871,14 +1871,23 @@ namespace ts {
return node.modifiers && find(node.modifiers, m => m.kind === kind);
}
export function insertImport(changes: textChanges.ChangeTracker, sourceFile: SourceFile, importDecl: Statement, blankLineBetween: boolean): void {
const importKindPredicate = importDecl.kind === SyntaxKind.VariableStatement ? isRequireVariableDeclarationStatement : isAnyImportSyntax;
export function insertImports(changes: textChanges.ChangeTracker, sourceFile: SourceFile, imports: Statement | readonly Statement[], blankLineBetween: boolean): void {
const decl = isArray(imports) ? imports[0] : imports;
const importKindPredicate = decl.kind === SyntaxKind.VariableStatement ? isRequireVariableDeclarationStatement : isAnyImportSyntax;
const lastImportDeclaration = findLast(sourceFile.statements, statement => importKindPredicate(statement));
if (lastImportDeclaration) {
changes.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl);
if (isArray(imports)) {
changes.insertNodesAfter(sourceFile, lastImportDeclaration, imports);
}
else {
changes.insertNodeAfter(sourceFile, lastImportDeclaration, imports);
}
}
else if (isArray(imports)) {
changes.insertNodesAtTopOfFile(sourceFile, imports, blankLineBetween);
}
else {
changes.insertNodeAtTopOfFile(sourceFile, importDecl, blankLineBetween);
changes.insertNodeAtTopOfFile(sourceFile, imports, blankLineBetween);
}
}
@@ -2818,6 +2827,35 @@ namespace ts {
return symbol.name;
}
/**
* Useful to check whether a string contains another string at a specific index
* without allocating another string or traversing the entire contents of the outer string.
*
* This function is useful in place of either of the following:
*
* ```ts
* // Allocates
* haystack.substr(startIndex, needle.length) === needle
*
* // Full traversal
* haystack.indexOf(needle, startIndex) === startIndex
* ```
*
* @param haystack The string that potentially contains `needle`.
* @param needle The string whose content might sit within `haystack`.
* @param startIndex The index within `haystack` to start searching for `needle`.
*/
export function stringContainsAt(haystack: string, needle: string, startIndex: number) {
const needleLength = needle.length;
if (needleLength + startIndex > haystack.length) {
return false;
}
for (let i = 0; i < needleLength; i++) {
if (needle.charCodeAt(i) !== haystack.charCodeAt(i + startIndex)) return false;
}
return true;
}
export function startsWithUnderscore(name: string): boolean {
return name.charCodeAt(0) === CharacterCodes._;
}
@@ -558,13 +558,13 @@ function [#|f|]():void{
}
`
);
_testConvertToAsyncFunction("convertToAsyncFunction_Rej", `
_testConvertToAsyncFunctionFailed("convertToAsyncFunction_Rej", `
function [#|f|]():Promise<void> {
return fetch('https://typescriptlang.org').then(result => { console.log(result); }, rejection => { console.log("rejected:", rejection); });
}
`
);
_testConvertToAsyncFunction("convertToAsyncFunction_RejRef", `
_testConvertToAsyncFunctionFailed("convertToAsyncFunction_RejRef", `
function [#|f|]():Promise<void> {
return fetch('https://typescriptlang.org').then(res, rej);
}
@@ -576,7 +576,7 @@ function rej(err){
}
`
);
_testConvertToAsyncFunction("convertToAsyncFunction_RejNoBrackets", `
_testConvertToAsyncFunctionFailed("convertToAsyncFunction_RejNoBrackets", `
function [#|f|]():Promise<void> {
return fetch('https://typescriptlang.org').then(result => console.log(result), rejection => console.log("rejected:", rejection));
}
@@ -1238,7 +1238,7 @@ function [#|f|]() {
}
`);
_testConvertToAsyncFunction("convertToAsyncFunction_ResRejNoArgsArrow", `
_testConvertToAsyncFunctionFailed("convertToAsyncFunction_ResRejNoArgsArrow", `
function [#|f|]() {
return Promise.resolve().then(() => 1, () => "a");
}
@@ -1436,5 +1436,10 @@ function [#|get|]() {
.catch<APIResponse<{ email: string }>>(() => ({ success: false }));
}
`);
_testConvertToAsyncFunctionFailed("convertToAsyncFunction_threeArguments", `
function [#|f|]() {
return Promise.resolve().then(undefined, undefined, () => 1);
}`);
});
}
@@ -285,6 +285,7 @@ namespace ts {
});
});
describe("Baselines", () => {
const libFile = {
@@ -327,6 +328,16 @@ export const Other = 1;
assert.isEmpty(changes);
});
it("doesn't return any changes when the text would be identical", () => {
const testFile = {
path: "/a.ts",
content: `import { f } from 'foo';\nf();`
};
const languageService = makeLanguageService(testFile);
const changes = languageService.organizeImports({ type: "file", fileName: testFile.path }, testFormatSettings, emptyOptions);
assert.isEmpty(changes);
});
testOrganizeImports("Renamed_used",
{
path: "/test.ts",
@@ -366,6 +377,16 @@ D();
},
libFile);
it("doesn't return any changes when the text would be identical", () => {
const testFile = {
path: "/a.ts",
content: `import { f } from 'foo';\nf();`
};
const languageService = makeLanguageService(testFile);
const changes = languageService.organizeImports({ type: "file", fileName: testFile.path }, testFormatSettings, emptyOptions);
assert.isEmpty(changes);
});
testOrganizeImports("Unused_All",
{
path: "/test.ts",
@@ -377,14 +398,17 @@ import D from "lib";
},
libFile);
testOrganizeImports("Unused_Empty",
{
it("Unused_Empty", () => {
const testFile = {
path: "/test.ts",
content: `
import { } from "lib";
`,
},
libFile);
};
const languageService = makeLanguageService(testFile);
const changes = languageService.organizeImports({ type: "file", fileName: testFile.path }, testFormatSettings, emptyOptions);
assert.isEmpty(changes);
});
testOrganizeImports("Unused_false_positive_module_augmentation",
{
@@ -414,25 +438,33 @@ declare module 'caseless' {
test(name: KeyType): boolean;
}
}`
});
});
testOrganizeImports("Unused_false_positive_shorthand_assignment",
{
it("Unused_false_positive_shorthand_assignment", () => {
const testFile = {
path: "/test.ts",
content: `
import { x } from "a";
const o = { x };
`
});
};
const languageService = makeLanguageService(testFile);
const changes = languageService.organizeImports({ type: "file", fileName: testFile.path }, testFormatSettings, emptyOptions);
assert.isEmpty(changes);
});
testOrganizeImports("Unused_false_positive_export_shorthand",
{
it("Unused_false_positive_export_shorthand", () => {
const testFile = {
path: "/test.ts",
content: `
import { x } from "a";
export { x };
`
});
};
const languageService = makeLanguageService(testFile);
const changes = languageService.organizeImports({ type: "file", fileName: testFile.path }, testFormatSettings, emptyOptions);
assert.isEmpty(changes);
});
testOrganizeImports("MoveToTop",
{
@@ -63,7 +63,7 @@ namespace ts.projectSystem {
};
const aDts: File = {
path: "/a/bin/a.d.ts",
// Need to mangle the sourceMappingURL part or it breaks the build
// ${""} is needed to mangle the sourceMappingURL part or it breaks the build
content: `export declare function fnA(): void;\nexport interface IfaceA {\n}\nexport declare const instanceA: IfaceA;\n//# source${""}MappingURL=a.d.ts.map`,
};
@@ -86,7 +86,7 @@ namespace ts.projectSystem {
content: JSON.stringify(bDtsMapContent),
};
const bDts: File = {
// Need to mangle the sourceMappingURL part or it breaks the build
// ${""} is need to mangle the sourceMappingURL part so it doesn't break the build
path: "/b/bin/b.d.ts",
content: `export declare function fnB(): void;\n//# source${""}MappingURL=b.d.ts.map`,
};
@@ -114,7 +114,7 @@ namespace ts.projectSystem {
})
};
function makeSampleProjects(addUserTsConfig?: boolean) {
function makeSampleProjects(addUserTsConfig?: boolean, keepAllFiles?: boolean) {
const host = createServerHost([aTs, aTsconfig, aDtsMap, aDts, bTsconfig, bTs, bDtsMap, bDts, ...(addUserTsConfig ? [userTsForConfigProject, userTsconfig] : [userTs]), dummyFile]);
const session = createSession(host);
@@ -122,7 +122,9 @@ namespace ts.projectSystem {
checkDeclarationFiles(bTs, session, [bDtsMap, bDts]);
// Testing what happens if we delete the original sources.
host.deleteFile(bTs.path);
if (!keepAllFiles) {
host.deleteFile(bTs.path);
}
openFilesForSession([userTs], session);
const service = session.getProjectService();
@@ -322,6 +324,64 @@ namespace ts.projectSystem {
verifyATsConfigOriginalProject(session);
});
it("navigateToAll -- when neither file nor project is specified", () => {
const session = makeSampleProjects(/*addUserTsConfig*/ true, /*keepAllFiles*/ true);
const response = executeSessionRequest<protocol.NavtoRequest, protocol.NavtoResponse>(session, CommandNames.Navto, { file: undefined, searchValue: "fn" });
assert.deepEqual<readonly protocol.NavtoItem[] | undefined>(response, [
{
...protocolFileSpanFromSubstring({
file: bTs,
text: "export function fnB() {}"
}),
name: "fnB",
matchKind: "prefix",
isCaseSensitive: true,
kind: ScriptElementKind.functionElement,
kindModifiers: "export",
},
{
...protocolFileSpanFromSubstring({
file: aTs,
text: "export function fnA() {}"
}),
name: "fnA",
matchKind: "prefix",
isCaseSensitive: true,
kind: ScriptElementKind.functionElement,
kindModifiers: "export",
},
{
...protocolFileSpanFromSubstring({
file: userTs,
text: "export function fnUser() { a.fnA(); b.fnB(); a.instanceA; }"
}),
name: "fnUser",
matchKind: "prefix",
isCaseSensitive: true,
kind: ScriptElementKind.functionElement,
kindModifiers: "export",
}
]);
});
it("navigateToAll -- when file is not specified but project is", () => {
const session = makeSampleProjects(/*addUserTsConfig*/ true, /*keepAllFiles*/ true);
const response = executeSessionRequest<protocol.NavtoRequest, protocol.NavtoResponse>(session, CommandNames.Navto, { projectFileName: bTsconfig.path, file: undefined, searchValue: "fn" });
assert.deepEqual<readonly protocol.NavtoItem[] | undefined>(response, [
{
...protocolFileSpanFromSubstring({
file: bTs,
text: "export function fnB() {}"
}),
name: "fnB",
matchKind: "prefix",
isCaseSensitive: true,
kind: ScriptElementKind.functionElement,
kindModifiers: "export",
}
]);
});
const referenceATs = (aTs: File): protocol.ReferencesResponseItem => makeReferenceItem({
file: aTs,
isDefinition: true,
+6 -3
View File
@@ -122,7 +122,8 @@ namespace ts.server.typingsInstaller {
// store error info to report it later when it is known that server is already listening to events from typings installer
this.delayedInitializationError = {
kind: "event::initializationFailed",
message: (<Error>e).message
message: (<Error>e).message,
stack: (<Error>e).stack,
};
}
@@ -246,7 +247,9 @@ namespace ts.server.typingsInstaller {
const installer = new NodeTypingsInstaller(globalTypingsCacheLocation!, typingSafeListLocation!, typesMapLocation!, npmLocation, validateDefaultNpmLocation, /*throttleLimit*/5, log); // TODO: GH#18217
installer.listen();
function indent(newline: string, str: string): string {
return `${newline} ` + str.replace(/\r?\n/, `${newline} `);
function indent(newline: string, str: string | undefined): string {
return str && str.length
? `${newline} ` + str.replace(/\r?\n/, `${newline} `)
: "";
}
}
@@ -1,8 +1,8 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'yield' cannot be referenced in its initializer.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'yield' cannot reference itself.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts (1 errors) ====
function f(yield = yield) {
~~~~~
!!! error TS2372: Parameter 'yield' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'yield' cannot reference itself.
}
@@ -2,10 +2,11 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(4,24): error TS2715: Abstr
tests/cases/compiler/abstractPropertyInConstructor.ts(7,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor.
tests/cases/compiler/abstractPropertyInConstructor.ts(9,14): error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor.
tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor.
tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2729: Property 'prop' is used before its initialization.
tests/cases/compiler/abstractPropertyInConstructor.ts(39,22): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor.
==== tests/cases/compiler/abstractPropertyInConstructor.ts (5 errors) ====
==== tests/cases/compiler/abstractPropertyInConstructor.ts (6 errors) ====
abstract class AbstractClass {
constructor(str: string, other: AbstractClass) {
this.method(parseInt(str));
@@ -39,6 +40,9 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(39,22): error TS2715: Abst
other = this.prop;
~~~~
!!! error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor.
~~~~
!!! error TS2729: Property 'prop' is used before its initialization.
!!! related TS2728 tests/cases/compiler/abstractPropertyInConstructor.ts:20:14: 'prop' is declared here.
fn = () => this.prop;
method2() {
@@ -38,7 +38,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
exports.__esModule = true;
__exportStar(require("jquery"), exports);
+12 -5
View File
@@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
const versionMajorMinor = "3.9";
const versionMajorMinor = "4.0";
/** The version of the TypeScript compiler release */
const version: string;
/**
@@ -3227,6 +3227,7 @@ declare namespace ts {
NoInterveningComments = 262144,
NoSpaceIfEmpty = 524288,
SingleElement = 1048576,
SpaceAfterList = 2097152,
Modifiers = 262656,
HeritageClauses = 512,
SingleLineTypeLiteralMembers = 768,
@@ -3258,7 +3259,7 @@ declare namespace ts {
CaseOrDefaultClauseStatements = 163969,
HeritageClauseTypes = 528,
SourceFileStatements = 131073,
Decorators = 49153,
Decorators = 2146305,
TypeArguments = 53776,
TypeParameters = 53776,
Parameters = 2576,
@@ -4459,7 +4460,8 @@ declare namespace ts {
* Starts a new lexical environment and visits a parameter list, suspending the lexical
* environment upon completion.
*/
function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): NodeArray<ParameterDeclaration>;
function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T>): NodeArray<ParameterDeclaration>;
function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T> | undefined): NodeArray<ParameterDeclaration> | undefined;
/**
* Resumes a suspended lexical environment and visits a function body, ending the lexical
* environment and merging hoisted declarations upon completion.
@@ -4958,6 +4960,7 @@ declare namespace ts.server {
interface InitializationFailedResponse extends TypingInstallerResponse {
readonly kind: EventInitializationFailed;
readonly message: string;
readonly stack?: string;
}
interface ProjectResponse extends TypingInstallerResponse {
readonly projectName: string;
@@ -8318,7 +8321,7 @@ declare namespace ts.server.protocol {
/**
* Arguments for navto request message.
*/
interface NavtoRequestArgs extends FileRequestArgs {
interface NavtoRequestArgs {
/**
* Search term to navigate to from current location; term can
* be '.*' or an identifier prefix.
@@ -8328,6 +8331,10 @@ declare namespace ts.server.protocol {
* Optional limit on the number of items to return.
*/
maxResultCount?: number;
/**
* The file for the request (absolute pathname required).
*/
file?: string;
/**
* Optional flag to indicate we want results for just the current file
* or the entire project.
@@ -8341,7 +8348,7 @@ declare namespace ts.server.protocol {
* match the search term given in argument 'searchTerm'. The
* context for the search is given by the named file.
*/
interface NavtoRequest extends FileRequest {
interface NavtoRequest extends Request {
command: CommandTypes.Navto;
arguments: NavtoRequestArgs;
}
+6 -3
View File
@@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
const versionMajorMinor = "3.9";
const versionMajorMinor = "4.0";
/** The version of the TypeScript compiler release */
const version: string;
/**
@@ -3227,6 +3227,7 @@ declare namespace ts {
NoInterveningComments = 262144,
NoSpaceIfEmpty = 524288,
SingleElement = 1048576,
SpaceAfterList = 2097152,
Modifiers = 262656,
HeritageClauses = 512,
SingleLineTypeLiteralMembers = 768,
@@ -3258,7 +3259,7 @@ declare namespace ts {
CaseOrDefaultClauseStatements = 163969,
HeritageClauseTypes = 528,
SourceFileStatements = 131073,
Decorators = 49153,
Decorators = 2146305,
TypeArguments = 53776,
TypeParameters = 53776,
Parameters = 2576,
@@ -4459,7 +4460,8 @@ declare namespace ts {
* Starts a new lexical environment and visits a parameter list, suspending the lexical
* environment upon completion.
*/
function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): NodeArray<ParameterDeclaration>;
function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T>): NodeArray<ParameterDeclaration>;
function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T> | undefined): NodeArray<ParameterDeclaration> | undefined;
/**
* Resumes a suspended lexical environment and visits a function body, ending the lexical
* environment and merging hoisted declarations upon completion.
@@ -4958,6 +4960,7 @@ declare namespace ts.server {
interface InitializationFailedResponse extends TypingInstallerResponse {
readonly kind: EventInitializationFailed;
readonly message: string;
readonly stack?: string;
}
interface ProjectResponse extends TypingInstallerResponse {
readonly projectName: string;
+2 -2
View File
@@ -4,9 +4,9 @@ var arr: string[] | number[];
arr.splice(1, 1);
>arr.splice(1, 1) : string[] | number[]
>arr.splice : { (start: number, deleteCount: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; } | { (start: number, deleteCount: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }
>arr.splice : { (start: number, deleteCount?: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; } | { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }
>arr : string[] | number[]
>splice : { (start: number, deleteCount: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; } | { (start: number, deleteCount: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }
>splice : { (start: number, deleteCount?: number): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; } | { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }
>1 : 1
>1 : 1
@@ -1,8 +1,8 @@
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS2322: Type '() => number' is not assignable to type 'E'.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS2322: Type '() => number' is not assignable to type 'E'.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead.
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location.
@@ -40,7 +40,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
enum E {
x = () => 4, // Error expected
~~~~~~~
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
!!! error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead.
y = (() => this).length // error, can't use this in enum
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
@@ -87,7 +87,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
enum E {
x = () => 4, // Error expected
~~~~~~~
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
!!! error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead.
y = (() => this).length
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
@@ -1,10 +1,11 @@
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(2,16): error TS2729: Property 'bar' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(3,16): error TS2729: Property 'foo' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(9,17): error TS2729: Property 'baz' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(10,16): error TS2729: Property 'foo' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(6,19): error TS2729: Property 'm3' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(12,17): error TS2729: Property 'baz' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(13,16): error TS2729: Property 'foo' is used before its initialization.
==== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts (4 errors) ====
==== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts (5 errors) ====
class C {
qux = this.bar // should error
~~~
@@ -13,20 +14,26 @@ tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterProper
bar = this.foo // should error
~~~
!!! error TS2729: Property 'foo' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:8:17: 'foo' is declared here.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here.
quiz = this.bar // ok
quench = this.m1() // ok
quanch = this.m3() // should error
~~
!!! error TS2729: Property 'm3' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:10:5: 'm3' is declared here.
m1() {
this.foo // ok
}
m3 = function() { }
constructor(public foo: string) {}
quim = this.baz // should error
~~~
!!! error TS2729: Property 'baz' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:10:5: 'baz' is declared here.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:13:5: 'baz' is declared here.
baz = this.foo; // should error
~~~
!!! error TS2729: Property 'foo' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:8:17: 'foo' is declared here.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here.
quid = this.baz // ok
m2() {
this.foo // ok
@@ -3,9 +3,12 @@ class C {
qux = this.bar // should error
bar = this.foo // should error
quiz = this.bar // ok
quench = this.m1() // ok
quanch = this.m3() // should error
m1() {
this.foo // ok
}
m3 = function() { }
constructor(public foo: string) {}
quim = this.baz // should error
baz = this.foo; // should error
@@ -45,9 +48,12 @@ class C {
qux = this.bar; // should error
bar = this.foo; // should error
quiz = this.bar; // ok
quench = this.m1(); // ok
quanch = this.m3(); // should error
m1() {
this.foo; // ok
}
m3 = function () { };
constructor(foo) {
this.foo = foo;
}
@@ -10,9 +10,9 @@ class C {
bar = this.foo // should error
>bar : Symbol(C.bar, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 1, 18))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
quiz = this.bar // ok
>quiz : Symbol(C.quiz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 2, 18))
@@ -20,105 +20,120 @@ class C {
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>bar : Symbol(C.bar, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 1, 18))
quench = this.m1() // ok
>quench : Symbol(C.quench, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 3, 19))
>this.m1 : Symbol(C.m1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 5, 22))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>m1 : Symbol(C.m1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 5, 22))
quanch = this.m3() // should error
>quanch : Symbol(C.quanch, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 4, 22))
>this.m3 : Symbol(C.m3, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 5))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>m3 : Symbol(C.m3, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 5))
m1() {
>m1 : Symbol(C.m1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 3, 19))
>m1 : Symbol(C.m1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 5, 22))
this.foo // ok
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
}
m3 = function() { }
>m3 : Symbol(C.m3, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 5))
constructor(public foo: string) {}
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
quim = this.baz // should error
>quim : Symbol(C.quim, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 38))
>this.baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 19))
>quim : Symbol(C.quim, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 38))
>this.baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 11, 19))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 19))
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 11, 19))
baz = this.foo; // should error
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 19))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 11, 19))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
quid = this.baz // ok
>quid : Symbol(C.quid, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 9, 19))
>this.baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 19))
>quid : Symbol(C.quid, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 12, 19))
>this.baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 11, 19))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 8, 19))
>baz : Symbol(C.baz, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 11, 19))
m2() {
>m2 : Symbol(C.m2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 19))
>m2 : Symbol(C.m2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 13, 19))
this.foo // ok
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
>this : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
}
}
class D extends C {
>D : Symbol(D, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 14, 1))
>D : Symbol(D, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 17, 1))
>C : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0))
quill = this.foo // ok
>quill : Symbol(D.quill, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 16, 19))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>this : Symbol(D, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 14, 1))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 7, 16))
>quill : Symbol(D.quill, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 19, 19))
>this.foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
>this : Symbol(D, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 17, 1))
>foo : Symbol(C.foo, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 10, 16))
}
class E {
>E : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 18, 1))
>E : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 1))
bar = () => this.foo1 + this.foo2; // both ok
>bar : Symbol(E.bar, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 20, 9))
>this.foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 38))
>this : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 18, 1))
>foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 38))
>this.foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 23, 16))
>this : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 18, 1))
>foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 23, 16))
>bar : Symbol(E.bar, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 23, 9))
>this.foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 24, 38))
>this : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 1))
>foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 24, 38))
>this.foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 26, 16))
>this : Symbol(E, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 1))
>foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 26, 16))
foo1 = '';
>foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 21, 38))
>foo1 : Symbol(E.foo1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 24, 38))
constructor(public foo2: string) {}
>foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 23, 16))
>foo2 : Symbol(E.foo2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 26, 16))
}
class F {
>F : Symbol(F, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 24, 1))
>F : Symbol(F, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 27, 1))
Inner = class extends F {
>Inner : Symbol(F.Inner, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 26, 9))
>F : Symbol(F, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 24, 1))
>Inner : Symbol(F.Inner, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 29, 9))
>F : Symbol(F, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 27, 1))
p2 = this.p1
>p2 : Symbol((Anonymous class).p2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 27, 29))
>this.p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 29, 5))
>this : Symbol((Anonymous class), Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 27, 11))
>p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 29, 5))
>p2 : Symbol((Anonymous class).p2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 30, 29))
>this.p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 32, 5))
>this : Symbol((Anonymous class), Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 30, 11))
>p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 32, 5))
}
p1 = 0
>p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 29, 5))
>p1 : Symbol(F.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 32, 5))
}
class G {
>G : Symbol(G, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 31, 1))
>G : Symbol(G, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 34, 1))
Inner = class extends G {
>Inner : Symbol(G.Inner, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 32, 9))
>G : Symbol(G, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 31, 1))
>Inner : Symbol(G.Inner, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 35, 9))
>G : Symbol(G, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 34, 1))
p2 = this.p1
>p2 : Symbol((Anonymous class).p2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 33, 29))
>this.p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 36, 16))
>this : Symbol((Anonymous class), Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 33, 11))
>p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 36, 16))
>p2 : Symbol((Anonymous class).p2, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 36, 29))
>this.p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 39, 16))
>this : Symbol((Anonymous class), Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 36, 11))
>p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 39, 16))
}
constructor(public p1: number) {}
>p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 36, 16))
>p1 : Symbol(G.p1, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 39, 16))
}
@@ -20,6 +20,20 @@ class C {
>this : this
>bar : string
quench = this.m1() // ok
>quench : void
>this.m1() : void
>this.m1 : () => void
>this : this
>m1 : () => void
quanch = this.m3() // should error
>quanch : void
>this.m3() : void
>this.m3 : () => void
>this : this
>m3 : () => void
m1() {
>m1 : () => void
@@ -28,6 +42,10 @@ class C {
>this : this
>foo : string
}
m3 = function() { }
>m3 : () => void
>function() { } : () => void
constructor(public foo: string) {}
>foo : string
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -1,11 +1,13 @@
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(3,17): error TS2322: Type '0' is not assignable to type 'string'.
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(6,24): error TS1064: The return type of an async function or method must be the global Promise<T> type.
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(7,23): error TS2322: Type '0' is not assignable to type 'string'.
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(10,24): error TS1064: The return type of an async function or method must be the global Promise<T> type.
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(12,2): error TS2322: Type '0' is not assignable to type 'string'.
tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(19,3): error TS2345: Argument of type '() => Promise<number>' is not assignable to parameter of type '() => string'.
Type 'Promise<number>' is not assignable to type 'string'.
==== tests/cases/conformance/async/es2017/asyncArrowFunction/file.js (4 errors) ====
==== tests/cases/conformance/async/es2017/asyncArrowFunction/file.js (6 errors) ====
// Error (good)
/** @type {function(): string} */
const a = () => 0
@@ -14,12 +16,16 @@ tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(19,3): error TS2
// Error (good)
/** @type {function(): string} */
~~~~~~
!!! error TS1064: The return type of an async function or method must be the global Promise<T> type.
const b = async () => 0
~
!!! error TS2322: Type '0' is not assignable to type 'string'.
// No error (bad)
/** @type {function(): string} */
~~~~~~
!!! error TS1064: The return type of an async function or method must be the global Promise<T> type.
const c = async () => {
return 0
~~~~~~~~
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -1,8 +1,8 @@
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer.
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts (1 errors) ====
function f(await = await) {
~~~~~
!!! error TS2372: Parameter 'await' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'await' cannot reference itself.
}
@@ -0,0 +1,13 @@
//// [bigintMissingES2019.ts]
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// no error when bigint is used even when ES2020 lib is not present
//// [bigintMissingES2019.js]
test();
test();
// no error when bigint is used even when ES2020 lib is not present
@@ -0,0 +1,17 @@
=== tests/cases/conformance/es2020/bigintMissingES2019.ts ===
declare function test<A, B extends A>(): void;
>test : Symbol(test, Decl(bigintMissingES2019.ts, 0, 0))
>A : Symbol(A, Decl(bigintMissingES2019.ts, 0, 22))
>B : Symbol(B, Decl(bigintMissingES2019.ts, 0, 24))
>A : Symbol(A, Decl(bigintMissingES2019.ts, 0, 22))
test<{t?: string}, object>();
>test : Symbol(test, Decl(bigintMissingES2019.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingES2019.ts, 2, 6))
test<{t?: string}, bigint>();
>test : Symbol(test, Decl(bigintMissingES2019.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingES2019.ts, 3, 6))
// no error when bigint is used even when ES2020 lib is not present
@@ -0,0 +1,16 @@
=== tests/cases/conformance/es2020/bigintMissingES2019.ts ===
declare function test<A, B extends A>(): void;
>test : <A, B extends A>() => void
test<{t?: string}, object>();
>test<{t?: string}, object>() : void
>test : <A, B extends A>() => void
>t : string
test<{t?: string}, bigint>();
>test<{t?: string}, bigint>() : void
>test : <A, B extends A>() => void
>t : string
// no error when bigint is used even when ES2020 lib is not present
@@ -0,0 +1,12 @@
error TS2318: Cannot find global type 'BigInt'.
!!! error TS2318: Cannot find global type 'BigInt'.
==== tests/cases/conformance/es2020/bigintMissingES2020.ts (0 errors) ====
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,13 @@
//// [bigintMissingES2020.ts]
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// should have global error when bigint is used but ES2020 lib is not present
//// [bigintMissingES2020.js]
test();
test();
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,17 @@
=== tests/cases/conformance/es2020/bigintMissingES2020.ts ===
declare function test<A, B extends A>(): void;
>test : Symbol(test, Decl(bigintMissingES2020.ts, 0, 0))
>A : Symbol(A, Decl(bigintMissingES2020.ts, 0, 22))
>B : Symbol(B, Decl(bigintMissingES2020.ts, 0, 24))
>A : Symbol(A, Decl(bigintMissingES2020.ts, 0, 22))
test<{t?: string}, object>();
>test : Symbol(test, Decl(bigintMissingES2020.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingES2020.ts, 2, 6))
test<{t?: string}, bigint>();
>test : Symbol(test, Decl(bigintMissingES2020.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingES2020.ts, 3, 6))
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,16 @@
=== tests/cases/conformance/es2020/bigintMissingES2020.ts ===
declare function test<A, B extends A>(): void;
>test : <A, B extends A>() => void
test<{t?: string}, object>();
>test<{t?: string}, object>() : void
>test : <A, B extends A>() => void
>t : string
test<{t?: string}, bigint>();
>test<{t?: string}, bigint>() : void
>test : <A, B extends A>() => void
>t : string
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,12 @@
error TS2318: Cannot find global type 'BigInt'.
!!! error TS2318: Cannot find global type 'BigInt'.
==== tests/cases/conformance/es2020/bigintMissingESNext.ts (0 errors) ====
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,13 @@
//// [bigintMissingESNext.ts]
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// should have global error when bigint is used but ES2020 lib is not present
//// [bigintMissingESNext.js]
test();
test();
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,17 @@
=== tests/cases/conformance/es2020/bigintMissingESNext.ts ===
declare function test<A, B extends A>(): void;
>test : Symbol(test, Decl(bigintMissingESNext.ts, 0, 0))
>A : Symbol(A, Decl(bigintMissingESNext.ts, 0, 22))
>B : Symbol(B, Decl(bigintMissingESNext.ts, 0, 24))
>A : Symbol(A, Decl(bigintMissingESNext.ts, 0, 22))
test<{t?: string}, object>();
>test : Symbol(test, Decl(bigintMissingESNext.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingESNext.ts, 2, 6))
test<{t?: string}, bigint>();
>test : Symbol(test, Decl(bigintMissingESNext.ts, 0, 0))
>t : Symbol(t, Decl(bigintMissingESNext.ts, 3, 6))
// should have global error when bigint is used but ES2020 lib is not present
@@ -0,0 +1,16 @@
=== tests/cases/conformance/es2020/bigintMissingESNext.ts ===
declare function test<A, B extends A>(): void;
>test : <A, B extends A>() => void
test<{t?: string}, object>();
>test<{t?: string}, object>() : void
>test : <A, B extends A>() => void
>t : string
test<{t?: string}, bigint>();
>test<{t?: string}, bigint>() : void
>test : <A, B extends A>() => void
>t : string
// should have global error when bigint is used but ES2020 lib is not present
@@ -1,6 +1,6 @@
tests/cases/compiler/capturedParametersInInitializers1.ts(18,20): error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers1.ts(22,26): error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers1.ts(38,21): error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
==== tests/cases/compiler/capturedParametersInInitializers1.ts (3 errors) ====
@@ -23,13 +23,13 @@ tests/cases/compiler/capturedParametersInInitializers1.ts(38,21): error TS2373:
// error - used before declaration
function foo4(y = {z}, z = 1) {
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
}
// error - used before declaration, IIFEs are inlined
function foo5(y = (() => z)(), z = 1) {
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
}
// ok - IIFE inside another function
@@ -47,6 +47,6 @@ tests/cases/compiler/capturedParametersInInitializers1.ts(38,21): error TS2373:
// error - used as computed name of method
function foo9(y = {[z]() { return z; }}, z = 1) {
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
}
@@ -1,8 +1,8 @@
tests/cases/compiler/capturedParametersInInitializers2.ts(3,20): error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(4,14): error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(6,10): error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(13,26): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/capturedParametersInInitializers2.ts(13,27): error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
==== tests/cases/compiler/capturedParametersInInitializers2.ts (5 errors) ====
@@ -10,14 +10,14 @@ tests/cases/compiler/capturedParametersInInitializers2.ts(13,27): error TS2373:
y = class {
static c = x;
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
get [x]() {return x;}
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
constructor() { x; }
[z]() { return z; }
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'z' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
},
x = 1,
z = 2
@@ -28,5 +28,5 @@ tests/cases/compiler/capturedParametersInInitializers2.ts(13,27): error TS2373:
~~~
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
!!! error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
}
@@ -16,6 +16,7 @@ function foo2(y = class {[x] = x}, x = 1) {
//// [capturedParametersInInitializers2.js]
function foo(y, x, z) {
var _a;
if (y === void 0) { y = (_a = /** @class */ (function () {
function class_1() {
x;
@@ -32,10 +33,10 @@ function foo(y, x, z) {
_a); }
if (x === void 0) { x = 1; }
if (z === void 0) { z = 2; }
var _a;
y.c;
}
function foo2(y, x) {
var _a, _b;
if (y === void 0) { y = (_b = /** @class */ (function () {
function class_2() {
this[_a] = x;
@@ -45,5 +46,4 @@ function foo2(y, x) {
_a = x,
_b); }
if (x === void 0) { x = 1; }
var _a, _b;
}
@@ -105,9 +105,9 @@ function Person(name) {
this.name = name;
>this.name = name : string
>this.name : string
>this.name : any
>this : this
>name : string
>name : any
>name : string
}
Person.prototype.describe = function () {
@@ -23,9 +23,9 @@ someFunction(function(BaseClass) {
this.foo = "bar";
>this.foo = "bar" : "bar"
>this.foo : string
>this.foo : any
>this : this
>foo : string
>foo : any
>"bar" : "bar"
}
_render(error) {
@@ -25,9 +25,9 @@ class B extends A {
this.foo = () => 3;
>this.foo = () => 3 : () => number
>this.foo : () => number
>this.foo : any
>this : this
>foo : () => number
>foo : any
>() => 3 : () => number
>3 : 3
}
@@ -12,9 +12,9 @@ class Derived {
this.x = 10;
>this.x = 10 : 10
>this.x : number
>this.x : any
>this : this
>x : number
>x : any
>10 : 10
var that = this;
@@ -1,11 +1,11 @@
tests/cases/compiler/circularOptionalityRemoval.ts(2,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2372: Parameter 'x' cannot be referenced in its initializer.
tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2372: Parameter 'x' cannot reference itself.
tests/cases/compiler/circularOptionalityRemoval.ts(2,38): error TS2532: Object is possibly 'undefined'.
tests/cases/compiler/circularOptionalityRemoval.ts(2,46): error TS2372: Parameter 'x' cannot be referenced in its initializer.
tests/cases/compiler/circularOptionalityRemoval.ts(2,46): error TS2372: Parameter 'x' cannot reference itself.
tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS1015: Parameter cannot have question mark and initializer.
tests/cases/compiler/circularOptionalityRemoval.ts(5,14): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/compiler/circularOptionalityRemoval.ts(5,27): error TS2304: Cannot find name 'someCondition'.
tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Parameter 'x' cannot be referenced in its initializer.
tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Parameter 'x' cannot reference itself.
==== tests/cases/compiler/circularOptionalityRemoval.ts (8 errors) ====
@@ -14,11 +14,11 @@ tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Paramete
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
~
!!! error TS2372: Parameter 'x' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'x' cannot reference itself.
~
!!! error TS2532: Object is possibly 'undefined'.
~
!!! error TS2372: Parameter 'x' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'x' cannot reference itself.
// Report from user
function fn2(x?: string = someCondition ? 'value1' : x) { }
@@ -29,4 +29,4 @@ tests/cases/compiler/circularOptionalityRemoval.ts(5,54): error TS2372: Paramete
~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'someCondition'.
~
!!! error TS2372: Parameter 'x' cannot be referenced in its initializer.
!!! error TS2372: Parameter 'x' cannot reference itself.
@@ -9,9 +9,9 @@ function Wagon(numberOxen) {
this.numberOxen = numberOxen
>this.numberOxen = numberOxen : number
>this.numberOxen : number
>this.numberOxen : any
>this : this
>numberOxen : number
>numberOxen : any
>numberOxen : number
}
/** @param {Wagon[]=} wagons */
@@ -91,9 +91,9 @@ class Sql extends Wagon {
this.foonly = 12
>this.foonly = 12 : 12
>this.foonly : number
>this.foonly : any
>this : this
>foonly : number
>foonly : any
>12 : 12
}
/**
@@ -67,9 +67,9 @@ class B extends Err {
this.wat = 12
>this.wat = 12 : 12
>this.wat : number
>this.wat : any
>this : this
>wat : number
>wat : any
>12 : 12
}
f() {
@@ -0,0 +1,10 @@
//// [classWithStaticFieldInParameterBindingPattern.ts]
// https://github.com/microsoft/TypeScript/issues/36295
(({ [class { static x = 1 }.x]: b = "" }) => {})();
//// [classWithStaticFieldInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
((_a) => { var _b; var { [(_b = class {
},
_b.x = 1,
_b).x]: b = "" } = _a; })();
@@ -0,0 +1,16 @@
//// [classWithStaticFieldInParameterBindingPattern.ts]
// https://github.com/microsoft/TypeScript/issues/36295
(({ [class { static x = 1 }.x]: b = "" }) => {})();
//// [classWithStaticFieldInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
(function (_a) {
var _b;
var _c = (_b = /** @class */ (function () {
function class_1() {
}
return class_1;
}()),
_b.x = 1,
_b).x, _d = _a[_c], b = _d === void 0 ? "" : _d;
})();
Loaded 100 of 506 files, more files were not shown because too many files have changed in this diff. Show more