Merge branch 'main' into server-vfs-support

This commit is contained in:
Nathan Shively-Sanders
2022-05-16 09:57:38 -07:00
87 changed files with 1971 additions and 172 deletions
+26 -18
View File
@@ -224,7 +224,7 @@
"@gulp-sourcemaps/map-sources": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz",
"integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=",
"integrity": "sha512-o/EatdaGt8+x2qpb0vFLC/2Gug/xYPRXb6a+ET1wGYKozKN3krDWC/zZFZAtrzxJHuDL12mwdfEFKcKMNvc55A==",
"dev": true,
"requires": {
"normalize-path": "^2.0.1",
@@ -638,9 +638,9 @@
"dev": true
},
"@types/node": {
"version": "17.0.32",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.32.tgz",
"integrity": "sha512-eAIcfAvhf/BkHcf4pkLJ7ECpBAhh9kcxRBpip9cTiO+hf+aJrsxYxBeS6OXvOd9WqNAJmavXVpZvY1rBjNsXmw==",
"version": "17.0.33",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.33.tgz",
"integrity": "sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==",
"dev": true
},
"@types/node-fetch": {
@@ -951,7 +951,7 @@
"ansi-cyan": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
"integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=",
"integrity": "sha512-eCjan3AVo/SxZ0/MyIYRtkpxIu/H3xZN7URr1vXVrISxeyz8fUFz0FJziamK4sS8I+t35y4rHg1b2PklyBe/7A==",
"dev": true,
"requires": {
"ansi-wrap": "0.1.0"
@@ -969,7 +969,7 @@
"ansi-red": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
"integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
"integrity": "sha512-ewaIr5y+9CUTGFwZfpECUbFlGcC0GCw1oqR9RI6h1gQCd9Aj2GxSckCnPsVJnmfMZbwFYE+leZGASgkWl06Jow==",
"dev": true,
"requires": {
"ansi-wrap": "0.1.0"
@@ -3151,17 +3151,16 @@
"dev": true
},
"glob": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.0.1.tgz",
"integrity": "sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow==",
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz",
"integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
"once": "^1.3.0"
},
"dependencies": {
"brace-expansion": {
@@ -3447,18 +3446,27 @@
},
"dependencies": {
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
}
}
},
@@ -5162,7 +5170,7 @@
"arr-diff": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
"integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
"integrity": "sha512-OQwDZUqYaQwyyhDJHThmzId8daf4/RFNLaeh3AevmSeZ5Y7ug4Ga/yKc6l6kTZOBW781rCj103ZuTh8GAsB3+Q==",
"dev": true,
"requires": {
"arr-flatten": "^1.0.1",
@@ -5172,13 +5180,13 @@
"arr-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
"integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=",
"integrity": "sha512-t5db90jq+qdgk8aFnxEkjqta0B/GHrM1pxzuuZz2zWsOXc5nKu3t+76s/PQBA8FTcM/ipspIH9jWG4OxCBc2eA==",
"dev": true
},
"array-slice": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
"integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
"integrity": "sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==",
"dev": true
},
"extend-shallow": {
+27 -14
View File
@@ -4110,8 +4110,10 @@ namespace ts {
return getMergedSymbol(symbol && (symbol.flags & SymbolFlags.ExportValue) !== 0 && symbol.exportSymbol || symbol);
}
function symbolIsValue(symbol: Symbol): boolean {
return !!(symbol.flags & SymbolFlags.Value || symbol.flags & SymbolFlags.Alias && resolveAlias(symbol).flags & SymbolFlags.Value && !getTypeOnlyAliasDeclaration(symbol));
function symbolIsValue(symbol: Symbol, includeTypeOnlyMembers?: boolean): boolean {
return !!(
symbol.flags & SymbolFlags.Value ||
symbol.flags & SymbolFlags.Alias && resolveAlias(symbol).flags & SymbolFlags.Value && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
}
function findConstructorDeclaration(node: ClassLikeDeclaration): ConstructorDeclaration | undefined {
@@ -12296,9 +12298,9 @@ namespace ts {
t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t as IntersectionType) :
t.flags & TypeFlags.StringLike ? globalStringType :
t.flags & TypeFlags.NumberLike ? globalNumberType :
t.flags & TypeFlags.BigIntLike ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= ScriptTarget.ES2020) :
t.flags & TypeFlags.BigIntLike ? getGlobalBigIntType() :
t.flags & TypeFlags.BooleanLike ? globalBooleanType :
t.flags & TypeFlags.ESSymbolLike ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= ScriptTarget.ES2015) :
t.flags & TypeFlags.ESSymbolLike ? getGlobalESSymbolType() :
t.flags & TypeFlags.NonPrimitive ? emptyObjectType :
t.flags & TypeFlags.Index ? keyofConstraintType :
t.flags & TypeFlags.Unknown && !strictNullChecks ? emptyObjectType :
@@ -12575,12 +12577,12 @@ namespace ts {
* @param type a type to look up property from
* @param name a name of property to look up in a given type
*/
function getPropertyOfType(type: Type, name: __String, skipObjectFunctionPropertyAugment?: boolean): Symbol | undefined {
function getPropertyOfType(type: Type, name: __String, skipObjectFunctionPropertyAugment?: boolean, includeTypeOnlyMembers?: boolean): Symbol | undefined {
type = getReducedApparentType(type);
if (type.flags & TypeFlags.Object) {
const resolved = resolveStructuredTypeMembers(type as ObjectType);
const symbol = resolved.members.get(name);
if (symbol && symbolIsValue(symbol)) {
if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
return symbol;
}
if (skipObjectFunctionPropertyAugment) return undefined;
@@ -14024,8 +14026,8 @@ namespace ts {
return deferredGlobalESSymbolConstructorTypeSymbol ||= getGlobalTypeSymbol("SymbolConstructor" as __String, reportErrors);
}
function getGlobalESSymbolType(reportErrors: boolean) {
return (deferredGlobalESSymbolType ||= getGlobalType("Symbol" as __String, /*arity*/ 0, reportErrors)) || emptyObjectType;
function getGlobalESSymbolType() {
return (deferredGlobalESSymbolType ||= getGlobalType("Symbol" as __String, /*arity*/ 0, /*reportErrors*/ false)) || emptyObjectType;
}
function getGlobalPromiseType(reportErrors: boolean) {
@@ -14107,8 +14109,8 @@ namespace ts {
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
}
function getGlobalBigIntType(reportErrors: boolean) {
return (deferredGlobalBigIntType ||= getGlobalType("BigInt" as __String, /*arity*/ 0, reportErrors)) || emptyObjectType;
function getGlobalBigIntType() {
return (deferredGlobalBigIntType ||= getGlobalType("BigInt" as __String, /*arity*/ 0, /*reportErrors*/ false)) || emptyObjectType;
}
/**
@@ -16208,7 +16210,7 @@ namespace ts {
// the `exports` lookup process that only looks up namespace members which is used for most type references
const mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
const next = node.isTypeOf
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ true)
: getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
if (!next) {
error(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current));
@@ -18551,7 +18553,7 @@ namespace ts {
if ((globalStringType === source && stringType === target) ||
(globalNumberType === source && numberType === target) ||
(globalBooleanType === source && booleanType === target) ||
(getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) {
(getGlobalESSymbolType() === source && esSymbolType === target)) {
reportError(Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
}
}
@@ -28995,9 +28997,9 @@ namespace ts {
if (isIdentifier(left) && parentSymbol) {
markAliasReferenced(parentSymbol, node);
}
return isErrorType(apparentType) ? errorType : apparentType;;
return isErrorType(apparentType) ? errorType : apparentType;
}
prop = getPropertyOfType(apparentType, right.escapedText);
prop = getPropertyOfType(apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ node.kind === SyntaxKind.QualifiedName);
}
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
@@ -33975,6 +33977,10 @@ namespace ts {
case SyntaxKind.ExclamationEqualsToken:
case SyntaxKind.EqualsEqualsEqualsToken:
case SyntaxKind.ExclamationEqualsEqualsToken:
if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) {
const eqType = operator === SyntaxKind.EqualsEqualsToken || operator === SyntaxKind.EqualsEqualsEqualsToken;
error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
}
reportOperatorErrorUnless((left, right) => isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left));
return booleanType;
@@ -35383,6 +35389,10 @@ namespace ts {
// Grammar checking
if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name);
if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === "constructor") {
error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator);
}
// Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration
checkFunctionOrMethodDeclaration(node);
@@ -35535,6 +35545,9 @@ namespace ts {
}
function checkAccessorDeclaration(node: AccessorDeclaration) {
if (isIdentifier(node.name) && idText(node.name) === "constructor") {
error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor);
}
addLazyDiagnostic(checkAccessorDeclarationDiagnostics);
checkSourceElement(node.body);
setNodeLinksForPrivateIdentifierScope(node);
+16
View File
@@ -435,6 +435,10 @@
"category": "Error",
"code": 1144
},
"'{' or JSX element expected.": {
"category": "Error",
"code": 1145
},
"Declaration expected.": {
"category": "Error",
"code": 1146
@@ -1016,6 +1020,10 @@
"category": "Error",
"code": 1340
},
"Class constructor may not be an accessor.": {
"category": "Error",
"code": 1341
},
"Type arguments cannot be used here.": {
"category": "Error",
"code": 1342
@@ -1088,6 +1096,10 @@
"category": "Error",
"code": 1359
},
"Class constructor may not be a generator.": {
"category": "Error",
"code": 1360
},
"'{0}' cannot be used as a value because it was imported using 'import type'.": {
"category": "Error",
"code": 1361
@@ -3455,6 +3467,10 @@
"category": "Error",
"code": 2838
},
"This condition will always return '{0}' since JavaScript compares objects by reference, not value.": {
"category": "Error",
"code": 2839
},
"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",
+2 -2
View File
@@ -4964,7 +4964,7 @@ namespace ts {
}
// @api
function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined) {
function createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined) {
const node = createBaseNode<JsxAttribute>(SyntaxKind.JsxAttribute);
node.name = name;
node.initializer = initializer;
@@ -4976,7 +4976,7 @@ namespace ts {
}
// @api
function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) {
function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) {
return node.name !== name
|| node.initializer !== initializer
? update(createJsxAttribute(name, initializer), node)
+17 -9
View File
@@ -5454,15 +5454,23 @@ namespace ts {
scanJsxIdentifier();
const pos = getNodePos();
return finishNode(
factory.createJsxAttribute(
parseIdentifierName(),
token() !== SyntaxKind.EqualsToken ? undefined :
scanJsxAttributeValue() === SyntaxKind.StringLiteral ? parseLiteralNode() as StringLiteral :
parseJsxExpression(/*inExpressionContext*/ true)
),
pos
);
return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
}
function parseJsxAttributeValue(): JsxAttributeValue | undefined {
if (token() === SyntaxKind.EqualsToken) {
if (scanJsxAttributeValue() === SyntaxKind.StringLiteral) {
return parseLiteralNode() as StringLiteral;
}
if (token() === SyntaxKind.OpenBraceToken) {
return parseJsxExpression(/*inExpressionContext*/ true);
}
if (token() === SyntaxKind.LessThanToken) {
return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true);
}
parseErrorAtCurrentToken(Diagnostics.or_JSX_element_expected);
}
return undefined;
}
function parseJsxSpreadAttribute(): JsxSpreadAttribute {
+2
View File
@@ -966,6 +966,8 @@ namespace ts {
Diagnostics.extends_clause_already_seen.code,
Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code,
Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,
Diagnostics.Class_constructor_may_not_be_a_generator.code,
Diagnostics.Class_constructor_may_not_be_an_accessor.code,
]);
/**
+12 -5
View File
@@ -400,26 +400,33 @@ namespace ts {
return factory.createPropertyAssignment(name, expression);
}
function transformJsxAttributeInitializer(node: StringLiteral | JsxExpression | undefined): Expression {
function transformJsxAttributeInitializer(node: JsxAttributeValue | undefined): Expression {
if (node === undefined) {
return factory.createTrue();
}
else if (node.kind === SyntaxKind.StringLiteral) {
if (node.kind === SyntaxKind.StringLiteral) {
// Always recreate the literal to escape any escape sequences or newlines which may be in the original jsx string and which
// Need to be escaped to be handled correctly in a normal string
const singleQuote = node.singleQuote !== undefined ? node.singleQuote : !isStringDoubleQuoted(node, currentSourceFile);
const literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
return setTextRange(literal, node);
}
else if (node.kind === SyntaxKind.JsxExpression) {
if (node.kind === SyntaxKind.JsxExpression) {
if (node.expression === undefined) {
return factory.createTrue();
}
return visitNode(node.expression, visitor, isExpression);
}
else {
return Debug.failBadSyntaxKind(node);
if (isJsxElement(node)) {
return visitJsxElement(node, /*isChild*/ false);
}
if (isJsxSelfClosingElement(node)) {
return visitJsxSelfClosingElement(node, /*isChild*/ false);
}
if (isJsxFragment(node)) {
return visitJsxFragment(node, /*isChild*/ false);
}
return Debug.failBadSyntaxKind(node);
}
function visitJsxText(node: JsxText): StringLiteral | undefined {
+10 -3
View File
@@ -2612,9 +2612,16 @@ namespace ts {
readonly parent: JsxAttributes;
readonly name: Identifier;
/// JSX attribute initializers are optional; <X y /> is sugar for <X y={true} />
readonly initializer?: StringLiteral | JsxExpression;
readonly initializer?: JsxAttributeValue;
}
export type JsxAttributeValue =
| StringLiteral
| JsxExpression
| JsxElement
| JsxSelfClosingElement
| JsxFragment;
export interface JsxSpreadAttribute extends ObjectLiteralElement {
readonly kind: SyntaxKind.JsxSpreadAttribute;
readonly parent: JsxAttributes;
@@ -7680,8 +7687,8 @@ namespace ts {
createJsxOpeningFragment(): JsxOpeningFragment;
createJsxJsxClosingFragment(): JsxClosingFragment;
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+13
View File
@@ -1114,6 +1114,19 @@ namespace ts {
return isLiteralKind(node.kind);
}
/** @internal */
export function isLiteralExpressionOfObject(node: Node) {
switch (node.kind) {
case SyntaxKind.ObjectLiteralExpression:
case SyntaxKind.ArrayLiteralExpression:
case SyntaxKind.RegularExpressionLiteral:
case SyntaxKind.FunctionExpression:
case SyntaxKind.ClassExpression:
return true;
}
return false;
}
// Pseudo-literals
/* @internal */
+16
View File
@@ -513,6 +513,13 @@ namespace ts {
ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
PackageJson: "package.json file",
ClosedScriptInfo: "Closed Script info",
ConfigFileForInferredRoot: "Config file for the inferred project root",
NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
MissingSourceMapFile: "Missing source map file",
NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
MissingGeneratedFile: "Missing generated file",
NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
};
export interface WatchTypeRegistry {
@@ -527,6 +534,15 @@ namespace ts {
ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
PackageJson: "package.json file",
// Additional tsserver specific watch information
ClosedScriptInfo: "Closed Script info",
ConfigFileForInferredRoot: "Config file for the inferred project root",
NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
MissingSourceMapFile: "Missing source map file",
NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
MissingGeneratedFile: "Missing generated file",
NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
}
interface WatchFactory<X, Y = undefined> extends ts.WatchFactory<X, Y> {
@@ -3519,6 +3519,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[类构造函数可能不是生成器。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[类构造函数可能不是访问器。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8325,6 +8343,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[默认情况下匹配包括模式 “**/*”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -11115,6 +11142,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[解决模式断言不稳定。使用夜间 TypeScript 消除此错误。请尝试使用 “npm install -D typescript@next” 进行更新。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`.]]></Val>
@@ -13470,6 +13506,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[此条件将始终返回“{0}”,因为 JavaScript 按引用而不是值比较对象。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16404,6 +16449,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[应为 “{” 或 JSX 元素。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -8325,6 +8325,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[依預設比對包含模式 '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -11115,6 +11124,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[解析模式宣告不穩定。使用夜間 TypeScript 將此錯誤設為靜音。請嘗試使用 'npm install -D typescript@next' 更新。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`.]]></Val>
@@ -16404,6 +16422,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[必須是 '{' 或 JSX 元素。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3528,6 +3528,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Konstruktor třídy nemůže být generátor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Konstruktor třídy nemůže být přístupový objekt.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8334,6 +8352,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Porovnává se ve výchozím nastavení se vzorem zahrnutí **/*.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13488,6 +13515,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tato podmínka vždy vrátí „{0}“, protože JavaScript porovnává objekty pomocí odkazu, nikoli hodnoty.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16422,6 +16458,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Očekával se element { nebo JSX.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -8322,6 +8322,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Standardmäßig zugeordnetes Includemuster „**/*“]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -16407,6 +16416,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' oder JSX-Element erwartet.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3531,6 +3531,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El constructor de clase no puede ser un generador.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[El constructor de clase no puede ser un descriptor de acceso.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8337,6 +8355,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[La coincidencia de forma predeterminada incluye el patrón '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13491,6 +13518,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Esta condición siempre devolverá "{0}", ya que JavaScript compara objetos por referencia, no por valor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16425,6 +16461,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se esperaba "{" o un elemento JSX.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3531,6 +3531,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le constructeur de classe ne peut pas être un générateur.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Le constructeur de la classe ne peut pas être un accesseur.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8337,6 +8355,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Mise en correspondance par défaut du modèle include '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -11127,6 +11154,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Les assertions du mode de résolution sont instables. Utilisez le TypeScript nocturne pour désactiver cette erreur. Essayez de mettre à jour à l’aide de « npm install -D typescript@next ».]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`.]]></Val>
@@ -13482,6 +13518,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Cette condition retourne toujours '{0}', car JavaScript compare les objets par référence, et non par valeur.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16416,6 +16461,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' ou élément JSX attendu.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -8325,6 +8325,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Corrispondente per impostazione predefinita al criterio di inclusione '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -16413,6 +16422,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Previsto elemento '{' o JSX.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3519,6 +3519,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[クラス コンストラクターをジェネレーターにすることはできません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[クラス コンストラクターをアクセサーにすることはできません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8325,6 +8343,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[既定で一致するインクルード パターン '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13479,6 +13506,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[JavaScript が値ではなく参照でオブジェクトを比較するため、この条件は常に '{0}' を返します。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16413,6 +16449,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' または JSX 要素が必要です。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3519,6 +3519,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[클래스 생성자는 생성기가 아닐 수 있습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[클래스 생성자는 접근자가 아닐 수 있습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8325,6 +8343,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[기본적으로 일치되는 포함 패턴 '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13479,6 +13506,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[JavaScript는 값이 아닌 참조로 개체를 비교하므로 이 조건은 항상 '{0}'을(를) 반환합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16413,6 +16449,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' 또는 JSX 요소가 필요합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -8315,6 +8315,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dopasowywane domyślnie do wzorca dołączania „**/*”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -16400,6 +16409,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Oczekiwano elementu „{” lub JSX.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3512,6 +3512,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O construtor de classe não pode ser um gerador.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[O construtor de classe não pode ser um acessador.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8318,6 +8336,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Correspondido por padrão de inclusão padrão '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13469,6 +13496,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Essa condição sempre retornará '{0}', pois o JavaScript compara objetos por referência, não por valor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16403,6 +16439,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' ou elemento JSX esperado.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -3518,6 +3518,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_a_generator_1360" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be a generator.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Конструктор класса не может быть генератором.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_constructor_may_not_be_an_accessor_1341" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class constructor may not be an accessor.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Конструктор класса не может быть методом доступа.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Class_declaration_cannot_implement_overload_list_for_0_2813" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Class declaration cannot implement overload list for '{0}'.]]></Val>
@@ -8324,6 +8342,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Сопоставление по умолчанию включает шаблон '**/*']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -13478,6 +13505,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since JavaScript compares objects by reference, not value.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Это условие всегда будет возвращать ''{0}'', так как JavaScript сравнивает объекты по ссылке, а не по значению.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.]]></Val>
@@ -16412,6 +16448,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ожидался элемент JSX или "{".]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
@@ -8318,6 +8318,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by default include pattern '**/*']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Varsayılan '**/*' ekleme deseniyle eşleşti]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Matched_by_include_pattern_0_in_1_1407" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Matched by include pattern '{0}' in '{1}']]></Val>
@@ -11108,6 +11117,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Çözme modu onaylamaları kararlı değil. Bu hatayı sessize almak için gecelik TypeScript kullanın. 'npm install -D typescript@next' ile güncelleştirmeyi deneyin.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`.]]></Val>
@@ -16397,6 +16415,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_JSX_element_expected_1145" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or JSX element expected.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['{' veya JSX öğesi bekleniyor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";or_expected_1144" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA['{' or ';' expected.]]></Val>
-1
View File
@@ -18,7 +18,6 @@
"types.ts",
"utilitiesPublic.ts",
"utilities.ts",
"watchType.ts",
"protocol.ts",
"scriptInfo.ts",
"typingsCache.ts",
-19
View File
@@ -1,19 +0,0 @@
/* @internal */
namespace ts {
// Additional tsserver specific watch information
export interface WatchTypeRegistry {
ClosedScriptInfo: "Closed Script info",
ConfigFileForInferredRoot: "Config file for the inferred project root",
NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
MissingSourceMapFile: "Missing source map file",
NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
MissingGeneratedFile: "Missing generated file",
NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
}
WatchType.ClosedScriptInfo = "Closed Script info";
WatchType.ConfigFileForInferredRoot = "Config file for the inferred project root";
WatchType.NodeModules = "node_modules for closed script infos and package.jsons affecting module specifier cache";
WatchType.MissingSourceMapFile = "Missing source map file";
WatchType.NoopConfigFileForInferredRoot = "Noop Config file for the inferred project root";
WatchType.MissingGeneratedFile = "Missing generated file";
}
+1 -1
View File
@@ -2880,7 +2880,7 @@ namespace ts {
export function getDefaultLibFilePath(options: CompilerOptions): string {
// Check __dirname is defined and that we are on a node.js system.
if (typeof __dirname !== "undefined") {
return __dirname + directorySeparator + getDefaultLibFileName(options);
return combinePaths(__dirname, getDefaultLibFileName(options));
}
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
+6 -5
View File
@@ -1388,8 +1388,9 @@ declare namespace ts {
readonly kind: SyntaxKind.JsxAttribute;
readonly parent: JsxAttributes;
readonly name: Identifier;
readonly initializer?: StringLiteral | JsxExpression;
readonly initializer?: JsxAttributeValue;
}
export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
export interface JsxSpreadAttribute extends ObjectLiteralElement {
readonly kind: SyntaxKind.JsxSpreadAttribute;
readonly parent: JsxAttributes;
@@ -3746,8 +3747,8 @@ declare namespace ts {
createJsxOpeningFragment(): JsxOpeningFragment;
createJsxJsxClosingFragment(): JsxClosingFragment;
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
@@ -11370,9 +11371,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
/** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
/** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
/** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
/** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
+6 -5
View File
@@ -1388,8 +1388,9 @@ declare namespace ts {
readonly kind: SyntaxKind.JsxAttribute;
readonly parent: JsxAttributes;
readonly name: Identifier;
readonly initializer?: StringLiteral | JsxExpression;
readonly initializer?: JsxAttributeValue;
}
export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
export interface JsxSpreadAttribute extends ObjectLiteralElement {
readonly kind: SyntaxKind.JsxSpreadAttribute;
readonly parent: JsxAttributes;
@@ -3746,8 +3747,8 @@ declare namespace ts {
createJsxOpeningFragment(): JsxOpeningFragment;
createJsxJsxClosingFragment(): JsxClosingFragment;
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
@@ -7481,9 +7482,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
/** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
/** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
/** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
/** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
@@ -1,12 +0,0 @@
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
@@ -4,10 +4,10 @@ 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
// no error when bigint is used even when ES2020 lib is not present
//// [bigintMissingES2020.js]
test();
test();
// should have global error when bigint is used but ES2020 lib is not present
// no error when bigint is used even when ES2020 lib is not present
@@ -13,5 +13,5 @@ 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
// no error when bigint is used even when ES2020 lib is not present
@@ -12,5 +12,5 @@ test<{t?: string}, bigint>();
>test : <A, B extends A>() => void
>t : string
// should have global error when bigint is used but ES2020 lib is not present
// no error when bigint is used even when ES2020 lib is not present
@@ -1,12 +0,0 @@
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
@@ -4,10 +4,10 @@ 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
// no error when bigint is used even when ES2020 lib is not present
//// [bigintMissingESNext.js]
test();
test();
// should have global error when bigint is used but ES2020 lib is not present
// no error when bigint is used even when ES2020 lib is not present
@@ -13,5 +13,5 @@ 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
// no error when bigint is used even when ES2020 lib is not present
@@ -12,5 +12,5 @@ test<{t?: string}, bigint>();
>test : <A, B extends A>() => void
>t : string
// should have global error when bigint is used but ES2020 lib is not present
// no error when bigint is used even when ES2020 lib is not present
@@ -0,0 +1,130 @@
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(4,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(6,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(8,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(10,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(12,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(14,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(17,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(19,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(21,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(23,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(25,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(27,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(30,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(32,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(34,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(36,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(38,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(40,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(43,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(45,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(47,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(49,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(51,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts(53,5): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
==== tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts (24 errors) ====
const a = { a: 1 }
const b = [1]
if ({ a: 1 } === { a: 1 }) {
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ([1] === [1]) {
~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if (a === { a: 1 }) {
~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if (b === [1]) {
~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } === a) {
~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ([1] === b) {
~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } !== { a: 1 }) {
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ([1] !== [1]) {
~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if (a !== { a: 1 }) {
~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if (b !== [1]) {
~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } !== a) {
~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ([1] !== b) {
~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } == { a: 1 }) {
~~~~~~~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ([1] == [1]) {
~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if (a == { a: 1 }) {
~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if (b == [1]) {
~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } == a) {
~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ([1] == b) {
~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } != { a: 1 }) {
~~~~~~~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ([1] != [1]) {
~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if (a != { a: 1 }) {
~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if (b != [1]) {
~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ({ a: 1 } != a) {
~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
if ([1] != b) {
~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
}
@@ -0,0 +1,108 @@
//// [conditionalEqualityOnLiteralObjects.ts]
const a = { a: 1 }
const b = [1]
if ({ a: 1 } === { a: 1 }) {
}
if ([1] === [1]) {
}
if (a === { a: 1 }) {
}
if (b === [1]) {
}
if ({ a: 1 } === a) {
}
if ([1] === b) {
}
if ({ a: 1 } !== { a: 1 }) {
}
if ([1] !== [1]) {
}
if (a !== { a: 1 }) {
}
if (b !== [1]) {
}
if ({ a: 1 } !== a) {
}
if ([1] !== b) {
}
if ({ a: 1 } == { a: 1 }) {
}
if ([1] == [1]) {
}
if (a == { a: 1 }) {
}
if (b == [1]) {
}
if ({ a: 1 } == a) {
}
if ([1] == b) {
}
if ({ a: 1 } != { a: 1 }) {
}
if ([1] != [1]) {
}
if (a != { a: 1 }) {
}
if (b != [1]) {
}
if ({ a: 1 } != a) {
}
if ([1] != b) {
}
//// [conditionalEqualityOnLiteralObjects.js]
var a = { a: 1 };
var b = [1];
if ({ a: 1 } === { a: 1 }) {
}
if ([1] === [1]) {
}
if (a === { a: 1 }) {
}
if (b === [1]) {
}
if ({ a: 1 } === a) {
}
if ([1] === b) {
}
if ({ a: 1 } !== { a: 1 }) {
}
if ([1] !== [1]) {
}
if (a !== { a: 1 }) {
}
if (b !== [1]) {
}
if ({ a: 1 } !== a) {
}
if ([1] !== b) {
}
if ({ a: 1 } == { a: 1 }) {
}
if ([1] == [1]) {
}
if (a == { a: 1 }) {
}
if (b == [1]) {
}
if ({ a: 1 } == a) {
}
if ([1] == b) {
}
if ({ a: 1 } != { a: 1 }) {
}
if ([1] != [1]) {
}
if (a != { a: 1 }) {
}
if (b != [1]) {
}
if ({ a: 1 } != a) {
}
if ([1] != b) {
}
@@ -0,0 +1,92 @@
=== tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts ===
const a = { a: 1 }
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 11))
const b = [1]
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
if ({ a: 1 } === { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 3, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 3, 18))
}
if ([1] === [1]) {
}
if (a === { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 7, 11))
}
if (b === [1]) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } === a) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 11, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
}
if ([1] === b) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } !== { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 16, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 16, 18))
}
if ([1] !== [1]) {
}
if (a !== { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 20, 11))
}
if (b !== [1]) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } !== a) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 24, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
}
if ([1] !== b) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } == { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 29, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 29, 17))
}
if ([1] == [1]) {
}
if (a == { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 33, 10))
}
if (b == [1]) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } == a) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 37, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
}
if ([1] == b) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } != { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 42, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 42, 17))
}
if ([1] != [1]) {
}
if (a != { a: 1 }) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 46, 10))
}
if (b != [1]) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
if ({ a: 1 } != a) {
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 50, 5))
>a : Symbol(a, Decl(conditionalEqualityOnLiteralObjects.ts, 0, 5))
}
if ([1] != b) {
>b : Symbol(b, Decl(conditionalEqualityOnLiteralObjects.ts, 1, 5))
}
@@ -0,0 +1,184 @@
=== tests/cases/compiler/conditionalEqualityOnLiteralObjects.ts ===
const a = { a: 1 }
>a : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
const b = [1]
>b : number[]
>[1] : number[]
>1 : 1
if ({ a: 1 } === { a: 1 }) {
>{ a: 1 } === { a: 1 } : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if ([1] === [1]) {
>[1] === [1] : boolean
>[1] : number[]
>1 : 1
>[1] : number[]
>1 : 1
}
if (a === { a: 1 }) {
>a === { a: 1 } : boolean
>a : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if (b === [1]) {
>b === [1] : boolean
>b : number[]
>[1] : number[]
>1 : 1
}
if ({ a: 1 } === a) {
>{ a: 1 } === a : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>a : { a: number; }
}
if ([1] === b) {
>[1] === b : boolean
>[1] : number[]
>1 : 1
>b : number[]
}
if ({ a: 1 } !== { a: 1 }) {
>{ a: 1 } !== { a: 1 } : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if ([1] !== [1]) {
>[1] !== [1] : boolean
>[1] : number[]
>1 : 1
>[1] : number[]
>1 : 1
}
if (a !== { a: 1 }) {
>a !== { a: 1 } : boolean
>a : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if (b !== [1]) {
>b !== [1] : boolean
>b : number[]
>[1] : number[]
>1 : 1
}
if ({ a: 1 } !== a) {
>{ a: 1 } !== a : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>a : { a: number; }
}
if ([1] !== b) {
>[1] !== b : boolean
>[1] : number[]
>1 : 1
>b : number[]
}
if ({ a: 1 } == { a: 1 }) {
>{ a: 1 } == { a: 1 } : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if ([1] == [1]) {
>[1] == [1] : boolean
>[1] : number[]
>1 : 1
>[1] : number[]
>1 : 1
}
if (a == { a: 1 }) {
>a == { a: 1 } : boolean
>a : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if (b == [1]) {
>b == [1] : boolean
>b : number[]
>[1] : number[]
>1 : 1
}
if ({ a: 1 } == a) {
>{ a: 1 } == a : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>a : { a: number; }
}
if ([1] == b) {
>[1] == b : boolean
>[1] : number[]
>1 : 1
>b : number[]
}
if ({ a: 1 } != { a: 1 }) {
>{ a: 1 } != { a: 1 } : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if ([1] != [1]) {
>[1] != [1] : boolean
>[1] : number[]
>1 : 1
>[1] : number[]
>1 : 1
}
if (a != { a: 1 }) {
>a != { a: 1 } : boolean
>a : { a: number; }
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
}
if (b != [1]) {
>b != [1] : boolean
>b : number[]
>[1] : number[]
>1 : 1
}
if ({ a: 1 } != a) {
>{ a: 1 } != a : boolean
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
>a : { a: number; }
}
if ([1] != b) {
>[1] != b : boolean
>[1] : number[]
>1 : 1
>b : number[]
}
@@ -0,0 +1,14 @@
tests/cases/conformance/salsa/constructorNameInAccessor.ts(2,9): error TS1341: Class constructor may not be an accessor.
tests/cases/conformance/salsa/constructorNameInAccessor.ts(3,9): error TS1341: Class constructor may not be an accessor.
==== tests/cases/conformance/salsa/constructorNameInAccessor.ts (2 errors) ====
class C1 {
get constructor() { return }
~~~~~~~~~~~
!!! error TS1341: Class constructor may not be an accessor.
set constructor(value) {}
~~~~~~~~~~~
!!! error TS1341: Class constructor may not be an accessor.
}
@@ -0,0 +1,12 @@
//// [constructorNameInAccessor.ts]
class C1 {
get constructor() { return }
set constructor(value) {}
}
//// [constructorNameInAccessor.js]
class C1 {
get constructor() { return; }
set constructor(value) { }
}
@@ -0,0 +1,12 @@
=== tests/cases/conformance/salsa/constructorNameInAccessor.ts ===
class C1 {
>C1 : Symbol(C1, Decl(constructorNameInAccessor.ts, 0, 0))
get constructor() { return }
>constructor : Symbol(C1.constructor, Decl(constructorNameInAccessor.ts, 0, 10), Decl(constructorNameInAccessor.ts, 1, 32))
set constructor(value) {}
>constructor : Symbol(C1.constructor, Decl(constructorNameInAccessor.ts, 0, 10), Decl(constructorNameInAccessor.ts, 1, 32))
>value : Symbol(value, Decl(constructorNameInAccessor.ts, 2, 20))
}
@@ -0,0 +1,12 @@
=== tests/cases/conformance/salsa/constructorNameInAccessor.ts ===
class C1 {
>C1 : C1
get constructor() { return }
>constructor : void
set constructor(value) {}
>constructor : void
>value : void
}
@@ -0,0 +1,10 @@
tests/cases/conformance/salsa/constructorNameInGenerator.ts(2,6): error TS1360: Class constructor may not be a generator.
==== tests/cases/conformance/salsa/constructorNameInGenerator.ts (1 errors) ====
class C2 {
*constructor() {}
~~~~~~~~~~~
!!! error TS1360: Class constructor may not be a generator.
}
@@ -0,0 +1,10 @@
//// [constructorNameInGenerator.ts]
class C2 {
*constructor() {}
}
//// [constructorNameInGenerator.js]
class C2 {
*constructor() { }
}
@@ -0,0 +1,8 @@
=== tests/cases/conformance/salsa/constructorNameInGenerator.ts ===
class C2 {
>C2 : Symbol(C2, Decl(constructorNameInGenerator.ts, 0, 0))
*constructor() {}
>constructor : Symbol(C2.constructor, Decl(constructorNameInGenerator.ts, 0, 10))
}
@@ -0,0 +1,8 @@
=== tests/cases/conformance/salsa/constructorNameInGenerator.ts ===
class C2 {
>C2 : C2
*constructor() {}
>constructor : () => Generator<never, void, unknown>
}
@@ -0,0 +1,13 @@
//// [contextualSignatureInObjectFreeze.ts]
// #49101
Object.freeze({
f: function () { }
})
//// [contextualSignatureInObjectFreeze.js]
// #49101
Object.freeze({
f: function () { }
});
@@ -0,0 +1,13 @@
=== tests/cases/compiler/contextualSignatureInObjectFreeze.ts ===
// #49101
Object.freeze({
>Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
f: function () { }
>f : Symbol(f, Decl(contextualSignatureInObjectFreeze.ts, 2, 15))
})
@@ -0,0 +1,16 @@
=== tests/cases/compiler/contextualSignatureInObjectFreeze.ts ===
// #49101
Object.freeze({
>Object.freeze({ f: function () { }}) : Readonly<{ f: () => void; }>
>Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T extends { [idx: string]: object | U; }, U extends string | number | bigint | boolean | symbol>(o: T): Readonly<T>; <T>(o: T): Readonly<T>; }
>Object : ObjectConstructor
>freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T extends { [idx: string]: object | U; }, U extends string | number | bigint | boolean | symbol>(o: T): Readonly<T>; <T>(o: T): Readonly<T>; }
>{ f: function () { }} : { f: () => void; }
f: function () { }
>f : () => void
>function () { } : () => void
})
@@ -1,9 +1,10 @@
tests/cases/conformance/functions/functionImplementationErrors.ts(25,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
tests/cases/conformance/functions/functionImplementationErrors.ts(30,17): error TS2373: Parameter 'n' cannot reference identifier 'm' declared after it.
tests/cases/conformance/functions/functionImplementationErrors.ts(35,17): error TS2373: Parameter 'n' cannot reference identifier 'm' declared after it.
tests/cases/conformance/functions/functionImplementationErrors.ts(40,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
==== tests/cases/conformance/functions/functionImplementationErrors.ts (3 errors) ====
==== tests/cases/conformance/functions/functionImplementationErrors.ts (4 errors) ====
// FunctionExpression with no return type annotation with multiple return statements with unrelated types
var f1 = function () {
return '';
@@ -50,9 +51,14 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(35,17): error
// FunctionExpression with non -void return type annotation with a throw, no return, and other code
// Should be error but isn't
undefined === function (): number {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
throw undefined;
~~~~~~~~~~~~~~~~~~~~
var x = 4;
~~~~~~~~~~~~~~
};
~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
class Base { private x; }
class AnotherClass { private y; }
@@ -0,0 +1,164 @@
tests/cases/conformance/functions/functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
==== tests/cases/conformance/functions/functionImplementations.ts (1 errors) ====
// FunctionExpression with no return type annotation and no return statement returns void
var v: void = function () { } ();
// FunctionExpression f with no return type annotation and directly references f in its body returns any
var a: any = function f() {
return f;
};
var a: any = function f() {
return f();
};
// FunctionExpression f with no return type annotation and indirectly references f in its body returns any
var a: any = function f() {
var x = f;
return x;
};
// Two mutually recursive function implementations with no return type annotations
function rec1() {
return rec2();
}
function rec2() {
return rec1();
}
var a = rec1();
var a = rec2();
// Two mutually recursive function implementations with return type annotation in one
function rec3(): number {
return rec4();
}
function rec4() {
return rec3();
}
var n: number;
var n = rec3();
var n = rec4();
// FunctionExpression with no return type annotation and returns a number
var n = function () {
return 3;
} ();
// FunctionExpression with no return type annotation and returns null
var nu = null;
var nu = function () {
return null;
} ();
// FunctionExpression with no return type annotation and returns undefined
var un = undefined;
var un = function () {
return undefined;
} ();
// FunctionExpression with no return type annotation and returns a type parameter type
var n = function <T>(x: T) {
return x;
} (4);
// FunctionExpression with no return type annotation and returns a constrained type parameter type
var n = function <T extends {}>(x: T) {
return x;
} (4);
// FunctionExpression with no return type annotation with multiple return statements with identical types
var n = function () {
return 3;
return 5;
}();
// Otherwise, the inferred return type is the first of the types of the return statement expressions
// in the function body that is a supertype of each of the others,
// ignoring return statements with no expressions.
// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others.
// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns
class Base { private m; }
class Derived extends Base { private q; }
var b: Base;
var b = function () {
return new Base(); return new Derived();
} ();
// FunctionExpression with no return type annotation with multiple return statements with one a recursive call
var a = function f() {
return new Base(); return new Derived(); return f(); // ?
} ();
// FunctionExpression with non -void return type annotation with a single throw statement
undefined === function (): number {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
throw undefined;
~~~~~~~~~~~~~~~~~~~~
};
~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
// Type of 'this' in function implementation is 'any'
function thisFunc() {
var x = this;
var x: any;
}
// Function signature with optional parameter, no type annotation and initializer has initializer's type
function opt1(n = 4) {
var m = n;
var m: number;
}
// Function signature with optional parameter, no type annotation and initializer has initializer's widened type
function opt2(n = { x: null, y: undefined }) {
var m = n;
var m: { x: any; y: any };
}
// Function signature with initializer referencing other parameter to the left
function opt3(n: number, m = n) {
var y = m;
var y: number;
}
// Function signature with optional parameter has correct codegen
// (tested above)
// FunctionExpression with non -void return type annotation return with no expression
function f6(): number {
return;
}
class Derived2 extends Base { private r: string; }
class AnotherClass { private x }
// if f is a contextually typed function expression, the inferred return type is the union type
// of the types of the return statement expressions in the function body,
// ignoring return statements with no expressions.
var f7: (x: number) => string | number = x => { // should be (x: number) => number | string
if (x < 0) { return x; }
return x.toString();
}
var f8: (x: number) => any = x => { // should be (x: number) => Base
return new Base();
return new Derived2();
}
var f9: (x: number) => any = x => { // should be (x: number) => Base
return new Base();
return new Derived();
return new Derived2();
}
var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1
return new Derived();
return new Derived2();
}
var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass
return new Base();
return new AnotherClass();
}
var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass
return new Base();
return; // should be ignored
return new AnotherClass();
}
@@ -0,0 +1,15 @@
tests/cases/conformance/jsx/a.tsx(7,16): error TS1145: '{' or JSX element expected.
==== tests/cases/conformance/jsx/a.tsx (1 errors) ====
declare var React: any;
<div>
<div attr=<div /> />
<div attr=<div>foo</div> />
<div attr=<><div>foo</div></> />
<div attr= />
~
!!! error TS1145: '{' or JSX element expected.
</div>
@@ -0,0 +1,18 @@
//// [a.tsx]
declare var React: any;
<div>
<div attr=<div /> />
<div attr=<div>foo</div> />
<div attr=<><div>foo</div></> />
<div attr= />
</div>
//// [a.jsx]
<div>
<div attr=<div />/>
<div attr=<div>foo</div>/>
<div attr=<><div>foo</div></>/>
<div attr/>
</div>;
@@ -0,0 +1,19 @@
=== tests/cases/conformance/jsx/a.tsx ===
declare var React: any;
>React : Symbol(React, Decl(a.tsx, 0, 11))
<div>
<div attr=<div /> />
>attr : Symbol(attr, Decl(a.tsx, 3, 8))
<div attr=<div>foo</div> />
>attr : Symbol(attr, Decl(a.tsx, 4, 8))
<div attr=<><div>foo</div></> />
>attr : Symbol(attr, Decl(a.tsx, 5, 8))
<div attr= />
>attr : Symbol(attr, Decl(a.tsx, 6, 8))
</div>
@@ -0,0 +1,40 @@
=== tests/cases/conformance/jsx/a.tsx ===
declare var React: any;
>React : any
<div>
><div> <div attr=<div /> /> <div attr=<div>foo</div> /> <div attr=<><div>foo</div></> /> <div attr= /></div> : any
>div : any
<div attr=<div /> />
><div attr=<div /> /> : any
>div : any
>attr : any
><div /> : any
>div : any
<div attr=<div>foo</div> />
><div attr=<div>foo</div> /> : any
>div : any
>attr : any
><div>foo</div> : any
>div : any
>div : any
<div attr=<><div>foo</div></> />
><div attr=<><div>foo</div></> /> : any
>div : any
>attr : any
><><div>foo</div></> : any
><div>foo</div> : any
>div : any
>div : any
<div attr= />
><div attr= /> : any
>div : any
>attr : true
</div>
>div : any
@@ -0,0 +1,15 @@
tests/cases/conformance/jsx/a.tsx(7,16): error TS1145: '{' or JSX element expected.
==== tests/cases/conformance/jsx/a.tsx (1 errors) ====
declare var React: any;
<div>
<div attr=<div /> />
<div attr=<div>foo</div> />
<div attr=<><div>foo</div></> />
<div attr= />
~
!!! error TS1145: '{' or JSX element expected.
</div>
@@ -0,0 +1,18 @@
//// [a.tsx]
declare var React: any;
<div>
<div attr=<div /> />
<div attr=<div>foo</div> />
<div attr=<><div>foo</div></> />
<div attr= />
</div>
//// [a.js]
React.createElement("div", null,
React.createElement("div", { attr: React.createElement("div", null) }),
React.createElement("div", { attr: React.createElement("div", null, "foo") }),
React.createElement("div", { attr: React.createElement(React.Fragment, null,
React.createElement("div", null, "foo")) }),
React.createElement("div", { attr: true }));
@@ -0,0 +1,19 @@
=== tests/cases/conformance/jsx/a.tsx ===
declare var React: any;
>React : Symbol(React, Decl(a.tsx, 0, 11))
<div>
<div attr=<div /> />
>attr : Symbol(attr, Decl(a.tsx, 3, 8))
<div attr=<div>foo</div> />
>attr : Symbol(attr, Decl(a.tsx, 4, 8))
<div attr=<><div>foo</div></> />
>attr : Symbol(attr, Decl(a.tsx, 5, 8))
<div attr= />
>attr : Symbol(attr, Decl(a.tsx, 6, 8))
</div>
@@ -0,0 +1,40 @@
=== tests/cases/conformance/jsx/a.tsx ===
declare var React: any;
>React : any
<div>
><div> <div attr=<div /> /> <div attr=<div>foo</div> /> <div attr=<><div>foo</div></> /> <div attr= /></div> : any
>div : any
<div attr=<div /> />
><div attr=<div /> /> : any
>div : any
>attr : any
><div /> : any
>div : any
<div attr=<div>foo</div> />
><div attr=<div>foo</div> /> : any
>div : any
>attr : any
><div>foo</div> : any
>div : any
>div : any
<div attr=<><div>foo</div></> />
><div attr=<><div>foo</div></> /> : any
>div : any
>attr : any
><><div>foo</div></> : any
><div>foo</div> : any
>div : any
>div : any
<div attr= />
><div attr= /> : any
>div : any
>attr : true
</div>
>div : any
@@ -1,9 +1,9 @@
tests/cases/compiler/jsxAttributeMissingInitializer.tsx(1,21): error TS1005: '{' expected.
tests/cases/compiler/jsxAttributeMissingInitializer.tsx(1,21): error TS1145: '{' or JSX element expected.
==== tests/cases/compiler/jsxAttributeMissingInitializer.tsx (1 errors) ====
const x = <div foo= ></div>;
~
!!! error TS1005: '{' expected.
!!! error TS1145: '{' or JSX element expected.
const y = 0;
@@ -1,13 +1,7 @@
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,1): error TS2657: JSX expressions must have one parent element.
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,17): error TS1005: '{' expected.
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,23): error TS1005: ';' expected.
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,23): error TS2304: Cannot find name 'right'.
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,41): error TS1382: Unexpected token. Did you mean `{'>'}` or `&gt;`?
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,57): error TS1109: Expression expected.
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,58): error TS1109: Expression expected.
==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (7 errors) ====
==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (1 errors) ====
declare var React: any;
declare var 日本語;
declare var AbC_def;
@@ -48,20 +42,8 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(40,58): error TS1109: Expr
<div><br />7x invalid-js-identifier</div>;
<LeftRight left=<a /> right=<b>monkeys /> gorillas</b> />;
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2657: JSX expressions must have one parent element.
~
!!! error TS1005: '{' expected.
~~~~~
!!! error TS1005: ';' expected.
~~~~~
!!! error TS2304: Cannot find name 'right'.
~
!!! error TS1382: Unexpected token. Did you mean `{'>'}` or `&gt;`?
~
!!! error TS1109: Expression expected.
~
!!! error TS1109: Expression expected.
<a.b></a.b>;
@@ -72,8 +72,7 @@ baz
<a>{/* this is a comment */}</a>;
<div>@test content</div>;
<div><br />7x invalid-js-identifier</div>;
<LeftRight left/>, <a />;
right = <b>monkeys /> gorillas</b> / > ;
<LeftRight left=<a /> right=<b>monkeys /> gorillas</b>/>;
<a.b></a.b>;
<a.b.c></a.b.c>;
(<div />) < x;
@@ -77,6 +77,7 @@ baz
<LeftRight left=<a /> right=<b>monkeys /> gorillas</b> />;
>LeftRight : Symbol(LeftRight, Decl(jsxEsprimaFbTestSuite.tsx, 3, 11))
>left : Symbol(left, Decl(jsxEsprimaFbTestSuite.tsx, 39, 10))
>right : Symbol(right, Decl(jsxEsprimaFbTestSuite.tsx, 39, 21))
<a.b></a.b>;
>a : Symbol(a, Decl(jsxEsprimaFbTestSuite.tsx, 5, 11))
@@ -118,21 +118,15 @@ baz
>div : any
<LeftRight left=<a /> right=<b>monkeys /> gorillas</b> />;
><LeftRight left=<a /> : any
><LeftRight left= : any
><LeftRight left=<a /> right=<b>monkeys /> gorillas</b> /> : any
>LeftRight : any
>left : true
>left : any
><a /> : any
>a : any
>right=<b>monkeys /> gorillas</b> /> : boolean
>right : any
><b>monkeys /> gorillas</b> /> : boolean
><b>monkeys /> gorillas</b> / : number
><b>monkeys /> gorillas</b> : any
>b : any
>b : any
> : any
> : any
<a.b></a.b>;
><a.b></a.b> : any
@@ -57,10 +57,8 @@ tests/cases/conformance/jsx/25.tsx(1,39): error TS1109: Expression expected.
tests/cases/conformance/jsx/26.tsx(1,4): error TS1382: Unexpected token. Did you mean `{'>'}` or `&gt;`?
tests/cases/conformance/jsx/27.tsx(1,5): error TS1382: Unexpected token. Did you mean `{'>'}` or `&gt;`?
tests/cases/conformance/jsx/28.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag.
tests/cases/conformance/jsx/28.tsx(1,6): error TS1005: '{' expected.
tests/cases/conformance/jsx/28.tsx(1,6): error TS1145: '{' or JSX element expected.
tests/cases/conformance/jsx/28.tsx(2,1): error TS1005: '</' expected.
tests/cases/conformance/jsx/29.tsx(1,1): error TS2657: JSX expressions must have one parent element.
tests/cases/conformance/jsx/29.tsx(1,6): error TS1005: '{' expected.
tests/cases/conformance/jsx/29.tsx(1,7): error TS1003: Identifier expected.
tests/cases/conformance/jsx/29.tsx(2,1): error TS1005: '</' expected.
tests/cases/conformance/jsx/3.tsx(1,1): error TS1109: Expression expected.
@@ -70,7 +68,7 @@ tests/cases/conformance/jsx/3.tsx(1,6): error TS1109: Expression expected.
tests/cases/conformance/jsx/3.tsx(1,7): error TS1109: Expression expected.
tests/cases/conformance/jsx/30.tsx(1,4): error TS1381: Unexpected token. Did you mean `{'}'}` or `&rbrace;`?
tests/cases/conformance/jsx/31.tsx(1,4): error TS1003: Identifier expected.
tests/cases/conformance/jsx/4.tsx(1,6): error TS1005: '{' expected.
tests/cases/conformance/jsx/4.tsx(1,6): error TS1145: '{' or JSX element expected.
tests/cases/conformance/jsx/5.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag.
tests/cases/conformance/jsx/5.tsx(1,5): error TS1005: '</' expected.
tests/cases/conformance/jsx/6.tsx(1,6): error TS17002: Expected corresponding JSX closing tag for 'a'.
@@ -110,7 +108,7 @@ tests/cases/conformance/jsx/9.tsx(1,10): error TS2304: Cannot find name 'a:b'.
==== tests/cases/conformance/jsx/4.tsx (1 errors) ====
<a b=d />;
~
!!! error TS1005: '{' expected.
!!! error TS1145: '{' or JSX element expected.
==== tests/cases/conformance/jsx/5.tsx (2 errors) ====
<a>;
~
@@ -292,21 +290,16 @@ tests/cases/conformance/jsx/9.tsx(1,10): error TS2304: Cannot find name 'a:b'.
~
!!! error TS17008: JSX element 'a' has no corresponding closing tag.
~
!!! error TS1005: '{' expected.
!!! error TS1145: '{' or JSX element expected.
!!! error TS1005: '</' expected.
==== tests/cases/conformance/jsx/29.tsx (4 errors) ====
==== tests/cases/conformance/jsx/29.tsx (2 errors) ====
<a b=<}>;
~~~~~~~~~
~
!!! error TS1005: '{' expected.
~
!!! error TS1003: Identifier expected.
!!! error TS2657: JSX expressions must have one parent element.
!!! error TS1005: '</' expected.
==== tests/cases/conformance/jsx/30.tsx (1 errors) ====
<a>}</a>;
@@ -150,8 +150,8 @@ var x = <div>one</div> /* intervening comment */, /* intervening comment */ <div
<a b>;
</>;
//// [29.jsx]
<a b/>, <>;
</>;
<a b=<>;
</>/>;
//// [30.jsx]
<a>}</a>;
//// [31.jsx]
@@ -250,9 +250,8 @@ var x = <div>one</div> /* intervening comment */ <div>two</div>;;
=== tests/cases/conformance/jsx/29.tsx ===
<a b=<}>;
><a b=<}>; : any
><a b= : any
>a : any
>b : true
>b : any
><}>; : any
> : any
@@ -1,4 +1,5 @@
/b.ts(2,21): error TS2339: Property 'A' does not exist on type 'typeof import("/a")'.
/b.ts(8,3): error TS2322: Type '{ A: any; B: any; }' is not assignable to type 'typeof import("/a")'.
Object literal may only specify known properties, and 'A' does not exist in type 'typeof import("/a")'.
==== /a.ts (0 errors) ====
@@ -9,7 +10,15 @@
==== /b.ts (1 errors) ====
import * as types from './a';
let A: typeof types.A;
~
!!! error TS2339: Property 'A' does not exist on type 'typeof import("/a")'.
let B: typeof types.B;
let t: typeof types = {
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ A: any; B: any; }' is not assignable to type 'typeof import("/a")'.
!!! error TS2322: Object literal may only specify known properties, and 'A' does not exist in type 'typeof import("/a")'.
B: undefined as any,
}
@@ -9,6 +9,13 @@ export class B {};
import * as types from './a';
let A: typeof types.A;
let B: typeof types.B;
let t: typeof types = {
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
B: undefined as any,
}
//// [a.js]
@@ -32,3 +39,9 @@ exports.B = B;
exports.__esModule = true;
var A;
var B;
var t = {
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined,
B: undefined
};
@@ -14,7 +14,9 @@ import * as types from './a';
let A: typeof types.A;
>A : Symbol(A, Decl(b.ts, 1, 3))
>types.A : Symbol(types.A, Decl(a.ts, 1, 13))
>types : Symbol(types, Decl(b.ts, 0, 6))
>A : Symbol(types.A, Decl(a.ts, 1, 13))
let B: typeof types.B;
>B : Symbol(B, Decl(b.ts, 2, 3))
@@ -22,3 +24,18 @@ let B: typeof types.B;
>types : Symbol(types, Decl(b.ts, 0, 6))
>B : Symbol(types.B, Decl(a.ts, 1, 18))
let t: typeof types = {
>t : Symbol(t, Decl(b.ts, 4, 3))
>types : Symbol(types, Decl(b.ts, 0, 6))
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
>A : Symbol(A, Decl(b.ts, 4, 23))
>undefined : Symbol(undefined)
B: undefined as any,
>B : Symbol(B, Decl(b.ts, 7, 22))
>undefined : Symbol(undefined)
}
@@ -13,10 +13,10 @@ import * as types from './a';
>types : typeof types
let A: typeof types.A;
>A : any
>types.A : any
>A : typeof types.A
>types.A : typeof types.A
>types : typeof types
>A : any
>A : typeof types.A
let B: typeof types.B;
>B : typeof types.B
@@ -24,3 +24,21 @@ let B: typeof types.B;
>types : typeof types
>B : typeof types.B
let t: typeof types = {
>t : typeof types
>types : typeof types
>{ // error: while you can ask for `typeof types.A`, // `typeof types` does not include `A` A: undefined as any, B: undefined as any,} : { A: any; B: any; }
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
>A : any
>undefined as any : any
>undefined : undefined
B: undefined as any,
>B : any
>undefined as any : any
>undefined : undefined
}
@@ -1,10 +1,11 @@
tests/cases/compiler/narrowByEquality.ts(41,5): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
tests/cases/compiler/narrowByEquality.ts(54,15): error TS2322: Type 'string | number' is not assignable to type 'number'.
Type 'string' is not assignable to type 'number'.
tests/cases/compiler/narrowByEquality.ts(55,9): error TS2322: Type 'string | number' is not assignable to type 'number'.
Type 'string' is not assignable to type 'number'.
==== tests/cases/compiler/narrowByEquality.ts (2 errors) ====
==== tests/cases/compiler/narrowByEquality.ts (3 errors) ====
declare let x: number | string | boolean
declare let n: number;
declare let s: string;
@@ -46,6 +47,8 @@ tests/cases/compiler/narrowByEquality.ts(55,9): error TS2322: Type 'string | num
declare let xAndObj: number | string | boolean | object
if (xAndObj == {}) {
~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
xAndObj;
}
@@ -265,6 +265,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(704,34): error T
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(710,69): error TS2304: Cannot find name 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(710,93): error TS2304: Cannot find name 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(710,136): error TS2304: Cannot find name 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(722,17): error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(724,22): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(724,83): error TS2304: Cannot find name 'FncFlags'.
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(729,44): error TS2304: Cannot find name 'SymbolKind'.
@@ -303,7 +304,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(827,34): error T
tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error TS2304: Cannot find name 'popTypeCollectionScope'.
==== tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts (303 errors) ====
==== tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts (304 errors) ====
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.
@@ -1562,6 +1563,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T
fgSym.type &&
fgSym.type.construct &&
fgSym.type.construct.signatures != [] &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.
(fgSym.type.construct.signatures[0].declAST == null ||
!hasFlag(fgSym.type.construct.signatures[0].declAST.fncFlags, FncFlags.Ambient)) &&
~~~~~~~
@@ -0,0 +1,58 @@
//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] ////
//// [button.ts]
import {classMap} from './lit.js';
export const c = classMap();
//// [lit.ts]
class ClassMapDirective {}
export type {ClassMapDirective};
export const directive =
<C>(class_: C) =>
() => ({
directive: class_,
});
export const classMap = directive(ClassMapDirective);
//// [lit.js]
"use strict";
exports.__esModule = true;
exports.classMap = exports.directive = void 0;
var ClassMapDirective = /** @class */ (function () {
function ClassMapDirective() {
}
return ClassMapDirective;
}());
var directive = function (class_) {
return function () { return ({
directive: class_
}); };
};
exports.directive = directive;
exports.classMap = (0, exports.directive)(ClassMapDirective);
//// [button.js]
"use strict";
exports.__esModule = true;
exports.c = void 0;
var lit_js_1 = require("./lit.js");
exports.c = (0, lit_js_1.classMap)();
//// [lit.d.ts]
declare class ClassMapDirective {
}
export type { ClassMapDirective };
export declare const directive: <C>(class_: C) => () => {
directive: C;
};
export declare const classMap: () => {
directive: typeof ClassMapDirective;
};
//// [button.d.ts]
export declare const c: {
directive: typeof import("./lit.js").ClassMapDirective;
};
@@ -0,0 +1,35 @@
=== tests/cases/conformance/declarationEmit/button.ts ===
import {classMap} from './lit.js';
>classMap : Symbol(classMap, Decl(button.ts, 0, 8))
export const c = classMap();
>c : Symbol(c, Decl(button.ts, 1, 12))
>classMap : Symbol(classMap, Decl(button.ts, 0, 8))
=== tests/cases/conformance/declarationEmit/lit.ts ===
class ClassMapDirective {}
>ClassMapDirective : Symbol(ClassMapDirective, Decl(lit.ts, 0, 0))
export type {ClassMapDirective};
>ClassMapDirective : Symbol(ClassMapDirective, Decl(lit.ts, 2, 13))
export const directive =
>directive : Symbol(directive, Decl(lit.ts, 4, 12))
<C>(class_: C) =>
>C : Symbol(C, Decl(lit.ts, 5, 3))
>class_ : Symbol(class_, Decl(lit.ts, 5, 6))
>C : Symbol(C, Decl(lit.ts, 5, 3))
() => ({
directive: class_,
>directive : Symbol(directive, Decl(lit.ts, 6, 10))
>class_ : Symbol(class_, Decl(lit.ts, 5, 6))
});
export const classMap = directive(ClassMapDirective);
>classMap : Symbol(classMap, Decl(lit.ts, 10, 12))
>directive : Symbol(directive, Decl(lit.ts, 4, 12))
>ClassMapDirective : Symbol(ClassMapDirective, Decl(lit.ts, 0, 0))
@@ -0,0 +1,40 @@
=== tests/cases/conformance/declarationEmit/button.ts ===
import {classMap} from './lit.js';
>classMap : () => { directive: typeof import("tests/cases/conformance/declarationEmit/lit").ClassMapDirective; }
export const c = classMap();
>c : { directive: typeof import("tests/cases/conformance/declarationEmit/lit").ClassMapDirective; }
>classMap() : { directive: typeof import("tests/cases/conformance/declarationEmit/lit").ClassMapDirective; }
>classMap : () => { directive: typeof import("tests/cases/conformance/declarationEmit/lit").ClassMapDirective; }
=== tests/cases/conformance/declarationEmit/lit.ts ===
class ClassMapDirective {}
>ClassMapDirective : ClassMapDirective
export type {ClassMapDirective};
>ClassMapDirective : ClassMapDirective
export const directive =
>directive : <C>(class_: C) => () => { directive: C; }
<C>(class_: C) =>
><C>(class_: C) => () => ({ directive: class_, }) : <C>(class_: C) => () => { directive: C; }
>class_ : C
() => ({
>() => ({ directive: class_, }) : () => { directive: C; }
>({ directive: class_, }) : { directive: C; }
>{ directive: class_, } : { directive: C; }
directive: class_,
>directive : C
>class_ : C
});
export const classMap = directive(ClassMapDirective);
>classMap : () => { directive: typeof ClassMapDirective; }
>directive(ClassMapDirective) : () => { directive: typeof ClassMapDirective; }
>directive : <C>(class_: C) => () => { directive: C; }
>ClassMapDirective : typeof ClassMapDirective
@@ -0,0 +1,54 @@
const a = { a: 1 }
const b = [1]
if ({ a: 1 } === { a: 1 }) {
}
if ([1] === [1]) {
}
if (a === { a: 1 }) {
}
if (b === [1]) {
}
if ({ a: 1 } === a) {
}
if ([1] === b) {
}
if ({ a: 1 } !== { a: 1 }) {
}
if ([1] !== [1]) {
}
if (a !== { a: 1 }) {
}
if (b !== [1]) {
}
if ({ a: 1 } !== a) {
}
if ([1] !== b) {
}
if ({ a: 1 } == { a: 1 }) {
}
if ([1] == [1]) {
}
if (a == { a: 1 }) {
}
if (b == [1]) {
}
if ({ a: 1 } == a) {
}
if ([1] == b) {
}
if ({ a: 1 } != { a: 1 }) {
}
if ([1] != [1]) {
}
if (a != { a: 1 }) {
}
if (b != [1]) {
}
if ({ a: 1 } != a) {
}
if ([1] != b) {
}
@@ -0,0 +1,7 @@
// #49101
// @target: es2020
// @lib: es2019
Object.freeze({
f: function () { }
})
@@ -0,0 +1,18 @@
// @declaration: true
// @Filename: button.ts
import {classMap} from './lit.js';
export const c = classMap();
// @Filename: lit.ts
class ClassMapDirective {}
export type {ClassMapDirective};
export const directive =
<C>(class_: C) =>
() => ({
directive: class_,
});
export const classMap = directive(ClassMapDirective);
@@ -5,4 +5,4 @@ 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
// no error when bigint is used even when ES2020 lib is not present
@@ -5,4 +5,4 @@ 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
// no error when bigint is used even when ES2020 lib is not present
@@ -7,3 +7,10 @@ export class B {};
import * as types from './a';
let A: typeof types.A;
let B: typeof types.B;
let t: typeof types = {
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
B: undefined as any,
}
@@ -0,0 +1,10 @@
// @jsx: preserve, react
// @filename: a.tsx
declare var React: any;
<div>
<div attr=<div /> />
<div attr=<div>foo</div> />
<div attr=<><div>foo</div></> />
<div attr= />
</div>
@@ -0,0 +1,5 @@
// @target: esnext
class C1 {
get constructor() { return }
set constructor(value) {}
}
@@ -0,0 +1,4 @@
// @target: esnext
class C2 {
*constructor() {}
}