mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'main' into staleErrors
This commit is contained in:
commit
88e62d2ae7
600 files changed
+23477
-3385
No files matched your search
@@ -97,6 +97,14 @@ TypeScript is currently accepting contributions in the form of bug fixes. A bug
|
||||
|
||||
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
|
||||
|
||||
## Issue claiming
|
||||
|
||||
If you intend to work on an issue, please avoid leaving comments like "I'm going to work on this". There are a few reasons for this. These comments tend to [discourage anyone from working in the area](https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843), yet many issues are much more difficult than they first appear, and you might find yourself trying to fix several issues before finding one that can be completed. Many issues have a long trail of people indicating that they're going to try to fix it, but no PR.
|
||||
|
||||
Conversely, you do not need to ask anyone's permission before starting work on an issue marked as "help wanted". It's always fine to try! We ask that you choose issues tagged in the "Backlog" milestone as these are issues that we've identified as needing fixes / implementations.
|
||||
|
||||
The sheer quantity of open issues, combined with their general difficulty, makes it extremely unlikely that you and another contributor are a) working on the same issue and b) both going to find a solution.
|
||||
|
||||
## Legal
|
||||
|
||||
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. Upon submitting a pull request, you will automatically be given instructions on how to sign the CLA.
|
||||
@@ -114,6 +122,10 @@ Your pull request should:
|
||||
* Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
|
||||
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
|
||||
|
||||
## Force-pushing
|
||||
|
||||
Avoid force-pushing your changes, especially when updating your PR based on review feedback. Force-pushed changes are not easily viewable on GitHub, and not at all viewable if a force-push also rebases against main. TypeScript PRs are squash merged, so the specific commits on your PR branch do not matter, only the PR title itself. Don't worry about having a perfect commit history; instead focus on making your changes as easy to review and merge as possible.
|
||||
|
||||
## Contributing `lib.d.ts` fixes
|
||||
|
||||
There are three relevant locations to be aware of when it comes to TypeScript's library declaration files:
|
||||
|
||||
Generated
+31
-23
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typescript",
|
||||
"version": "4.7.0",
|
||||
"version": "4.8.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -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.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz",
|
||||
"integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==",
|
||||
"version": "17.0.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.35.tgz",
|
||||
"integrity": "sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg==",
|
||||
"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"
|
||||
@@ -1479,7 +1479,7 @@
|
||||
"check-error": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
||||
"integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==",
|
||||
"dev": true
|
||||
},
|
||||
"chokidar": {
|
||||
@@ -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": {
|
||||
@@ -3174,9 +3173,9 @@
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
|
||||
"integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
|
||||
"integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
@@ -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": {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "4.7.0",
|
||||
"version": "4.8.0",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
|
||||
+115
-29
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -15796,7 +15798,7 @@ namespace ts {
|
||||
function substituteIndexedMappedType(objectType: MappedType, index: Type) {
|
||||
const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
||||
const templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
||||
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
||||
return instantiateType(getTemplateTypeFromMappedType(objectType.target as MappedType || objectType), templateMapper);
|
||||
}
|
||||
|
||||
function getIndexedAccessType(objectType: Type, indexType: Type, accessFlags = AccessFlags.None, accessNode?: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[]): Type {
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -19347,6 +19349,20 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (relation === comparableRelation && sourceFlags & TypeFlags.TypeParameter) {
|
||||
// This is a carve-out in comparability to essentially forbid comparing a type parameter
|
||||
// with another type parameter unless one extends the other. (Remember: comparability is mostly bidirectional!)
|
||||
let constraint = getConstraintOfTypeParameter(source);
|
||||
if (constraint && hasNonCircularBaseConstraint(source)) {
|
||||
while (constraint && constraint.flags & TypeFlags.TypeParameter) {
|
||||
if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false)) {
|
||||
return result;
|
||||
}
|
||||
constraint = getConstraintOfTypeParameter(constraint);
|
||||
}
|
||||
}
|
||||
return Ternary.False;
|
||||
}
|
||||
}
|
||||
else if (targetFlags & TypeFlags.Index) {
|
||||
const targetType = (target as IndexType).type;
|
||||
@@ -19558,8 +19574,8 @@ namespace ts {
|
||||
if (sourceFlags & TypeFlags.TypeVariable) {
|
||||
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
||||
if (!(sourceFlags & TypeFlags.IndexedAccess && targetFlags & TypeFlags.IndexedAccess)) {
|
||||
const constraint = getConstraintOfType(source as TypeVariable);
|
||||
if (!constraint || (sourceFlags & TypeFlags.TypeParameter && constraint.flags & TypeFlags.Any)) {
|
||||
const constraint = getConstraintOfType(source as TypeVariable) || unknownType;
|
||||
if (!getConstraintOfType(source as TypeVariable) || (sourceFlags & TypeFlags.TypeParameter && constraint.flags & TypeFlags.Any)) {
|
||||
// A type variable with no constraint is not related to the non-primitive object type.
|
||||
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~TypeFlags.NonPrimitive), RecursionFlags.Both)) {
|
||||
resetErrorInfo(saveErrorInfo);
|
||||
@@ -19567,12 +19583,12 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
||||
else if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
||||
if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
||||
resetErrorInfo(saveErrorInfo);
|
||||
return result;
|
||||
}
|
||||
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
||||
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, RecursionFlags.Source, reportErrors && !(targetFlags & sourceFlags & TypeFlags.TypeParameter), /*headMessage*/ undefined, intersectionState)) {
|
||||
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, RecursionFlags.Source, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & TypeFlags.TypeParameter), /*headMessage*/ undefined, intersectionState)) {
|
||||
resetErrorInfo(saveErrorInfo);
|
||||
return result;
|
||||
}
|
||||
@@ -26805,7 +26821,27 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getTypeOfPropertyOfContextualType(type: Type, name: __String, nameType?: Type) {
|
||||
return mapType(type, t => {
|
||||
return mapType(type, (t): Type | undefined => {
|
||||
if (t.flags & TypeFlags.Intersection) {
|
||||
const intersection = t as IntersectionType;
|
||||
let newTypes = mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
|
||||
if (newTypes.length > 0) {
|
||||
return getIntersectionType(newTypes);
|
||||
}
|
||||
newTypes = mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
|
||||
if (newTypes.length > 0) {
|
||||
return getIntersectionType(newTypes);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
const concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
|
||||
if (concretePropertyType) {
|
||||
return concretePropertyType;
|
||||
}
|
||||
return getTypeOfApplicableIndexInfoOfContextualType(t);
|
||||
}, /*noReductions*/ true);
|
||||
|
||||
function getTypeOfConcretePropertyOfContextualType(t: Type) {
|
||||
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
||||
const constraint = getConstraintTypeFromMappedType(t);
|
||||
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
||||
@@ -26813,8 +26849,9 @@ namespace ts {
|
||||
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
||||
return substituteIndexedMappedType(t, propertyNameType);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
else if (t.flags & TypeFlags.StructuredType) {
|
||||
if (t.flags & TypeFlags.StructuredType) {
|
||||
const prop = getPropertyOfType(t, name);
|
||||
if (prop) {
|
||||
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
|
||||
@@ -26825,10 +26862,15 @@ namespace ts {
|
||||
return restType;
|
||||
}
|
||||
}
|
||||
return findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))?.type;
|
||||
}
|
||||
return undefined;
|
||||
}, /*noReductions*/ true);
|
||||
}
|
||||
function getTypeOfApplicableIndexInfoOfContextualType(t: Type) {
|
||||
if (!(t.flags & TypeFlags.StructuredType)) {
|
||||
return undefined;
|
||||
}
|
||||
return findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))?.type;
|
||||
}
|
||||
}
|
||||
|
||||
// In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
|
||||
@@ -28955,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
|
||||
@@ -33935,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;
|
||||
|
||||
@@ -35343,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);
|
||||
|
||||
@@ -35495,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);
|
||||
@@ -36256,7 +36309,7 @@ namespace ts {
|
||||
* @param type The type of the promise.
|
||||
* @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
|
||||
*/
|
||||
function getPromisedTypeOfPromise(type: Type, errorNode?: Node): Type | undefined {
|
||||
function getPromisedTypeOfPromise(type: Type, errorNode?: Node, thisTypeForErrorOut?: { value?: Type }): Type | undefined {
|
||||
//
|
||||
// { // type
|
||||
// then( // thenFunction
|
||||
@@ -36298,7 +36351,30 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(thenSignatures, getTypeOfFirstParameterOfSignature)), TypeFacts.NEUndefinedOrNull);
|
||||
let thisTypeForError: Type | undefined;
|
||||
let candidates: Signature[] | undefined;
|
||||
for (const thenSignature of thenSignatures) {
|
||||
const thisType = getThisTypeOfSignature(thenSignature);
|
||||
if (thisType && thisType !== voidType && !isTypeRelatedTo(type, thisType, subtypeRelation)) {
|
||||
thisTypeForError = thisType;
|
||||
}
|
||||
else {
|
||||
candidates = append(candidates, thenSignature);
|
||||
}
|
||||
}
|
||||
|
||||
if (!candidates) {
|
||||
Debug.assertIsDefined(thisTypeForError);
|
||||
if (thisTypeForErrorOut) {
|
||||
thisTypeForErrorOut.value = thisTypeForError;
|
||||
}
|
||||
if (errorNode) {
|
||||
error(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(candidates, getTypeOfFirstParameterOfSignature)), TypeFacts.NEUndefinedOrNull);
|
||||
if (isTypeAny(onfulfilledParameterType)) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -36445,7 +36521,8 @@ namespace ts {
|
||||
return typeAsAwaitable.awaitedTypeOfType = mapType(type, mapper);
|
||||
}
|
||||
|
||||
const promisedType = getPromisedTypeOfPromise(type);
|
||||
const thisTypeForErrorOut: { value: Type | undefined } = { value: undefined };
|
||||
const promisedType = getPromisedTypeOfPromise(type, /*errorNode*/ undefined, thisTypeForErrorOut);
|
||||
if (promisedType) {
|
||||
if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) {
|
||||
// Verify that we don't have a bad actor in the form of a promise whose
|
||||
@@ -36518,7 +36595,12 @@ namespace ts {
|
||||
if (isThenableType(type)) {
|
||||
if (errorNode) {
|
||||
Debug.assertIsDefined(diagnosticMessage);
|
||||
error(errorNode, diagnosticMessage, arg0);
|
||||
let chain: DiagnosticMessageChain | undefined;
|
||||
if (thisTypeForErrorOut.value) {
|
||||
chain = chainDiagnosticMessages(chain, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForErrorOut.value));
|
||||
}
|
||||
chain = chainDiagnosticMessages(chain, diagnosticMessage, arg0);
|
||||
diagnostics.add(createDiagnosticForNodeFromMessageChain(errorNode, chain));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@@ -37919,7 +38001,7 @@ namespace ts {
|
||||
const childSymbol = getSymbolAtLocation(childNode);
|
||||
if (childSymbol && childSymbol === testedSymbol) {
|
||||
// If the test was a simple identifier, the above check is sufficient
|
||||
if (isIdentifier(expr)) {
|
||||
if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) {
|
||||
return true;
|
||||
}
|
||||
// Otherwise we need to ensure the symbol is called on the same target
|
||||
@@ -40718,6 +40800,10 @@ namespace ts {
|
||||
const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration);
|
||||
const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
||||
if (validForTypeAssertions && override) {
|
||||
if (!isNightly()) {
|
||||
grammarErrorOnNode(declaration.assertClause, Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
|
||||
}
|
||||
|
||||
if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) {
|
||||
return grammarErrorOnNode(declaration.assertClause, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
||||
}
|
||||
@@ -42198,7 +42284,7 @@ namespace ts {
|
||||
if (isDeclaration(node)) {
|
||||
// In this case, we call getSymbolOfNode instead of getSymbolAtLocation because it is a declaration
|
||||
const symbol = getSymbolOfNode(node);
|
||||
return getTypeOfSymbol(symbol);
|
||||
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
||||
}
|
||||
|
||||
if (isDeclarationNameOrImportPropertyName(node)) {
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace ts {
|
||||
["es2021.intl", "lib.es2021.intl.d.ts"],
|
||||
["es2022.array", "lib.es2022.array.d.ts"],
|
||||
["es2022.error", "lib.es2022.error.d.ts"],
|
||||
["es2022.intl", "lib.es2022.intl.d.ts"],
|
||||
["es2022.object", "lib.es2022.object.d.ts"],
|
||||
["es2022.string", "lib.es2022.string.d.ts"],
|
||||
["esnext.array", "lib.es2022.array.d.ts"],
|
||||
@@ -2325,7 +2326,7 @@ namespace ts {
|
||||
function filterSameAsDefaultInclude(specs: readonly string[] | undefined) {
|
||||
if (!length(specs)) return undefined;
|
||||
if (length(specs) !== 1) return specs;
|
||||
if (specs![0] === "**/*") return undefined;
|
||||
if (specs![0] === defaultIncludeSpec) return undefined;
|
||||
return specs;
|
||||
}
|
||||
|
||||
@@ -2626,6 +2627,9 @@ namespace ts {
|
||||
return getDirectoryPath(getNormalizedAbsolutePath(fileName, basePath));
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export const defaultIncludeSpec = "**/*";
|
||||
|
||||
/**
|
||||
* Parse the contents of a config file from json or json source file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
@@ -2704,6 +2708,7 @@ namespace ts {
|
||||
let includeSpecs = toPropValue(getSpecsFromRaw("include"));
|
||||
|
||||
const excludeOfRaw = getSpecsFromRaw("exclude");
|
||||
let isDefaultIncludeSpec = false;
|
||||
let excludeSpecs = toPropValue(excludeOfRaw);
|
||||
if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
|
||||
const outDir = raw.compilerOptions.outDir;
|
||||
@@ -2715,7 +2720,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (filesSpecs === undefined && includeSpecs === undefined) {
|
||||
includeSpecs = ["**/*"];
|
||||
includeSpecs = [defaultIncludeSpec];
|
||||
isDefaultIncludeSpec = true;
|
||||
}
|
||||
let validatedIncludeSpecs: readonly string[] | undefined, validatedExcludeSpecs: readonly string[] | undefined;
|
||||
|
||||
@@ -2739,6 +2745,7 @@ namespace ts {
|
||||
validatedIncludeSpecs,
|
||||
validatedExcludeSpecs,
|
||||
pathPatterns: undefined, // Initialized on first use
|
||||
isDefaultIncludeSpec,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2299,7 +2299,7 @@ namespace ts {
|
||||
return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : undefined;
|
||||
}
|
||||
|
||||
function isPatternMatch({ prefix, suffix }: Pattern, candidate: string) {
|
||||
export function isPatternMatch({ prefix, suffix }: Pattern, candidate: string) {
|
||||
return candidate.length >= prefix.length + suffix.length &&
|
||||
startsWith(candidate, prefix) &&
|
||||
endsWith(candidate, suffix);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace ts {
|
||||
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
||||
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
||||
export const versionMajorMinor = "4.7";
|
||||
export const versionMajorMinor = "4.8";
|
||||
// The following is baselined as a literal template type without intervention
|
||||
/** The version of the TypeScript compiler release */
|
||||
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
||||
|
||||
@@ -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
|
||||
@@ -1444,6 +1456,10 @@
|
||||
"category": "Error",
|
||||
"code": 1456
|
||||
},
|
||||
"Matched by default include pattern '**/*'": {
|
||||
"category": "Message",
|
||||
"code": 1457
|
||||
},
|
||||
|
||||
"The 'import.meta' meta-property is not allowed in files which will build into CommonJS output.": {
|
||||
"category": "Error",
|
||||
@@ -1511,6 +1527,15 @@
|
||||
"code": 2207
|
||||
},
|
||||
|
||||
"The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.": {
|
||||
"category": "Error",
|
||||
"code": 2209
|
||||
},
|
||||
"The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.": {
|
||||
"category": "Error",
|
||||
"code": 2210
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2300
|
||||
@@ -3442,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",
|
||||
@@ -3871,6 +3900,10 @@
|
||||
"category": "Error",
|
||||
"code": 4124
|
||||
},
|
||||
"Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.": {
|
||||
"category": "Error",
|
||||
"code": 4125
|
||||
},
|
||||
|
||||
"The current host does not support the '{0}' option.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -86,14 +86,15 @@ namespace ts {
|
||||
return { fileName: resolved.path, packageId: resolved.packageId };
|
||||
}
|
||||
|
||||
function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean | undefined, failedLookupLocations: string[], resultFromCache: ResolvedModuleWithFailedLookupLocations | undefined): ResolvedModuleWithFailedLookupLocations {
|
||||
function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean | undefined, failedLookupLocations: string[], diagnostics: Diagnostic[], resultFromCache: ResolvedModuleWithFailedLookupLocations | undefined): ResolvedModuleWithFailedLookupLocations {
|
||||
if (resultFromCache) {
|
||||
resultFromCache.failedLookupLocations.push(...failedLookupLocations);
|
||||
return resultFromCache;
|
||||
}
|
||||
return {
|
||||
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId },
|
||||
failedLookupLocations
|
||||
failedLookupLocations,
|
||||
resolutionDiagnostics: diagnostics
|
||||
};
|
||||
}
|
||||
|
||||
@@ -107,6 +108,8 @@ namespace ts {
|
||||
packageJsonInfoCache: PackageJsonInfoCache | undefined;
|
||||
features: NodeResolutionFeatures;
|
||||
conditions: string[];
|
||||
requestContainingDirectory: string | undefined;
|
||||
reportDiagnostic: DiagnosticReporter;
|
||||
}
|
||||
|
||||
/** Just the fields that we use for module resolution. */
|
||||
@@ -354,7 +357,18 @@ namespace ts {
|
||||
features |= NodeResolutionFeatures.EsmMode;
|
||||
}
|
||||
const conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
|
||||
const moduleResolutionState: ModuleResolutionState = { compilerOptions: options, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features, conditions };
|
||||
const diagnostics: Diagnostic[] = [];
|
||||
const moduleResolutionState: ModuleResolutionState = {
|
||||
compilerOptions: options,
|
||||
host,
|
||||
traceEnabled,
|
||||
failedLookupLocations,
|
||||
packageJsonInfoCache: cache,
|
||||
features,
|
||||
conditions,
|
||||
requestContainingDirectory: containingDirectory,
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
};
|
||||
let resolved = primaryLookup();
|
||||
let primary = true;
|
||||
if (!resolved) {
|
||||
@@ -374,7 +388,7 @@ namespace ts {
|
||||
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
||||
};
|
||||
}
|
||||
result = { resolvedTypeReferenceDirective, failedLookupLocations };
|
||||
result = { resolvedTypeReferenceDirective, failedLookupLocations, resolutionDiagnostics: diagnostics };
|
||||
perFolderCache?.set(typeReferenceDirectiveName, /*mode*/ resolutionMode, result);
|
||||
if (traceEnabled) traceResult(result);
|
||||
return result;
|
||||
@@ -468,6 +482,8 @@ namespace ts {
|
||||
packageJsonInfoCache: cache?.getPackageJsonInfoCache(),
|
||||
conditions: emptyArray,
|
||||
features: NodeResolutionFeatures.None,
|
||||
requestContainingDirectory: containingDirectory,
|
||||
reportDiagnostic: noop
|
||||
};
|
||||
|
||||
return forEachAncestorDirectory(containingDirectory, ancestorDirectory => {
|
||||
@@ -1317,6 +1333,7 @@ namespace ts {
|
||||
conditions.pop();
|
||||
}
|
||||
|
||||
const diagnostics: Diagnostic[] = [];
|
||||
const state: ModuleResolutionState = {
|
||||
compilerOptions,
|
||||
host,
|
||||
@@ -1325,10 +1342,12 @@ namespace ts {
|
||||
packageJsonInfoCache: cache,
|
||||
features,
|
||||
conditions,
|
||||
requestContainingDirectory: containingDirectory,
|
||||
reportDiagnostic: diag => void diagnostics.push(diag),
|
||||
};
|
||||
|
||||
const result = forEach(extensions, ext => tryResolve(ext));
|
||||
return createResolvedModuleWithFailedLookupLocations(result?.value?.resolved, result?.value?.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
||||
return createResolvedModuleWithFailedLookupLocations(result?.value?.resolved, result?.value?.isExternalLibraryImport, failedLookupLocations, diagnostics, state.resultFromCache);
|
||||
|
||||
function tryResolve(extensions: Extensions): SearchResult<{ resolved: Resolved, isExternalLibraryImport: boolean }> {
|
||||
const loader: ResolutionKindSpecificLoader = (extensions, candidate, onlyRecordFailures, state) => nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, /*considerPackageJson*/ true);
|
||||
@@ -1516,9 +1535,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function loadJSOrExactTSFileName(extensions: Extensions, candidate: string, onlyRecordFailures: boolean, state: ModuleResolutionState): PathAndExtension | undefined {
|
||||
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && isDeclarationFileName(candidate)) {
|
||||
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && fileExtensionIsOneOf(candidate, supportedTSExtensionsFlat)) {
|
||||
const result = tryFile(candidate, onlyRecordFailures, state);
|
||||
return result !== undefined ? { path: candidate, ext: forEach(supportedDeclarationExtensions, e => fileExtensionIs(candidate, e) ? e : undefined)! } : undefined;
|
||||
return result !== undefined ? { path: candidate, ext: tryExtractTSExtension(candidate) as Extension } : undefined;
|
||||
}
|
||||
|
||||
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
||||
@@ -1655,6 +1674,8 @@ namespace ts {
|
||||
packageJsonInfoCache: cache?.getPackageJsonInfoCache(),
|
||||
conditions: ["node", "require", "types"],
|
||||
features,
|
||||
requestContainingDirectory: packageJsonInfo.packageDirectory,
|
||||
reportDiagnostic: noop
|
||||
};
|
||||
const requireResolution = loadNodeModuleFromDirectoryWorker(
|
||||
extensions,
|
||||
@@ -1764,6 +1785,8 @@ namespace ts {
|
||||
packageJsonInfoCache: PackageJsonInfoCache | undefined;
|
||||
features: number;
|
||||
conditions: never[];
|
||||
requestContainingDirectory: string | undefined;
|
||||
reportDiagnostic: DiagnosticReporter
|
||||
} = {
|
||||
host,
|
||||
compilerOptions: options,
|
||||
@@ -1772,6 +1795,8 @@ namespace ts {
|
||||
packageJsonInfoCache,
|
||||
features: 0,
|
||||
conditions: [],
|
||||
requestContainingDirectory: undefined,
|
||||
reportDiagnostic: noop
|
||||
};
|
||||
const parts = getPathComponents(fileName);
|
||||
parts.pop();
|
||||
@@ -2112,8 +2137,9 @@ namespace ts {
|
||||
}
|
||||
return toSearchResult(/*value*/ undefined);
|
||||
}
|
||||
const finalPath = getNormalizedAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath, state.host.getCurrentDirectory?.());
|
||||
|
||||
const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
||||
const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports);
|
||||
if (inputLink) return inputLink;
|
||||
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, /*onlyRecordFailures*/ false, state)));
|
||||
}
|
||||
else if (typeof target === "object" && target !== null) { // eslint-disable-line no-null/no-null
|
||||
@@ -2154,6 +2180,134 @@ namespace ts {
|
||||
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
||||
}
|
||||
return toSearchResult(/*value*/ undefined);
|
||||
|
||||
function toAbsolutePath(path: string): string;
|
||||
function toAbsolutePath(path: string | undefined): string | undefined;
|
||||
function toAbsolutePath(path: string | undefined): string | undefined {
|
||||
if (path === undefined) return path;
|
||||
return hostGetCanonicalFileName({ useCaseSensitiveFileNames })(getNormalizedAbsolutePath(path, state.host.getCurrentDirectory?.()));
|
||||
}
|
||||
|
||||
function combineDirectoryPath(root: string, dir: string) {
|
||||
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
||||
}
|
||||
|
||||
function useCaseSensitiveFileNames() {
|
||||
return !state.host.useCaseSensitiveFileNames ? true :
|
||||
typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames :
|
||||
state.host.useCaseSensitiveFileNames();
|
||||
}
|
||||
|
||||
function tryLoadInputFileForPath(finalPath: string, entry: string, packagePath: string, isImports: boolean) {
|
||||
// Replace any references to outputs for files in the program with the input files to support package self-names used with outDir
|
||||
// PROBLEM: We don't know how to calculate the output paths yet, because the "common source directory" we use as the base of the file structure
|
||||
// we reproduce into the output directory is based on the set of input files, which we're still in the process of traversing and resolving!
|
||||
// _Given that_, we have to guess what the base of the output directory is (obviously the user wrote the export map, so has some idea what it is!).
|
||||
// We are going to probe _so many_ possible paths. We limit where we'll do this to try to reduce the possibilities of false positive lookups.
|
||||
if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json)
|
||||
&& (state.compilerOptions.declarationDir || state.compilerOptions.outDir)
|
||||
&& finalPath.indexOf("/node_modules/") === -1
|
||||
&& (state.compilerOptions.configFile ? startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true)
|
||||
) {
|
||||
// So that all means we'll only try these guesses for files outside `node_modules` in a directory where the `package.json` and `tsconfig.json` are siblings.
|
||||
// Even with all that, we still don't know if the root of the output file structure will be (relative to the package file)
|
||||
// `.`, `./src` or any other deeper directory structure. (If project references are used, it's definitely `.` by fiat, so that should be pretty common.)
|
||||
|
||||
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
|
||||
const commonSourceDirGuesses: string[] = [];
|
||||
// A `rootDir` compiler option strongly indicates the root location
|
||||
// A `composite` project is using project references and has it's common src dir set to `.`, so it shouldn't need to check any other locations
|
||||
if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) {
|
||||
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], state.host.getCurrentDirectory?.() || "", getCanonicalFileName));
|
||||
commonSourceDirGuesses.push(commonDir);
|
||||
}
|
||||
else if (state.requestContainingDirectory) {
|
||||
// However without either of those set we're in the dark. Let's say you have
|
||||
//
|
||||
// ./tools/index.ts
|
||||
// ./src/index.ts
|
||||
// ./dist/index.js
|
||||
// ./package.json <-- references ./dist/index.js
|
||||
// ./tsconfig.json <-- loads ./src/index.ts
|
||||
//
|
||||
// How do we know `./src` is the common src dir, and not `./tools`, given only the `./dist` out dir and `./dist/index.js` filename?
|
||||
// Answer: We... don't. We know we're looking for an `index.ts` input file, but we have _no clue_ which subfolder it's supposed to be loaded from
|
||||
// without more context.
|
||||
// But we do have more context! Just a tiny bit more! We're resolving an import _for some other input file_! And that input file, too
|
||||
// must be inside the common source directory! So we propagate that tidbit of info all the way to here via state.requestContainingDirectory
|
||||
|
||||
const requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, "index.ts"));
|
||||
// And we can try every folder above the common folder for the request folder and the config/package base directory
|
||||
// This technically can be wrong - we may load ./src/index.ts when ./src/sub/index.ts was right because we don't
|
||||
// know if only `./src/sub` files were loaded by the program; but this has the best chance to be right of just about anything
|
||||
// else we have. And, given that we're about to load `./src/index.ts` because we choose it as likely correct, there will then
|
||||
// be a file outside of `./src/sub` in the program (the file we resolved to), making us de-facto right. So this fallback lookup
|
||||
// logic may influence what files are pulled in by self-names, which in turn influences the output path shape, but it's all
|
||||
// internally consistent so the paths should be stable so long as we prefer the "most general" (meaning: top-most-level directory) possible results first.
|
||||
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [requestingFile, toAbsolutePath(packagePath)], state.host.getCurrentDirectory?.() || "", getCanonicalFileName));
|
||||
commonSourceDirGuesses.push(commonDir);
|
||||
|
||||
let fragment = ensureTrailingDirectorySeparator(commonDir);
|
||||
while (fragment && fragment.length > 1) {
|
||||
const parts = getPathComponents(fragment);
|
||||
parts.pop(); // remove a directory
|
||||
const commonDir = getPathFromPathComponents(parts);
|
||||
commonSourceDirGuesses.unshift(commonDir);
|
||||
fragment = ensureTrailingDirectorySeparator(commonDir);
|
||||
}
|
||||
}
|
||||
if (commonSourceDirGuesses.length > 1) {
|
||||
state.reportDiagnostic(createCompilerDiagnostic(
|
||||
isImports
|
||||
? Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate
|
||||
: Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,
|
||||
entry === "" ? "." : entry, // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird
|
||||
packagePath
|
||||
));
|
||||
}
|
||||
for (const commonSourceDirGuess of commonSourceDirGuesses) {
|
||||
const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
||||
for (const candidateDir of candidateDirectories) {
|
||||
if (startsWith(finalPath, candidateDir)) {
|
||||
// The matched export is looking up something in either the out declaration or js dir, now map the written path back into the source dir and source extension
|
||||
const pathFragment = finalPath.slice(candidateDir.length + 1); // +1 to also remove directory seperator
|
||||
const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
|
||||
const jsAndDtsExtensions = [Extension.Mjs, Extension.Cjs, Extension.Js, Extension.Json, Extension.Dmts, Extension.Dcts, Extension.Dts];
|
||||
for (const ext of jsAndDtsExtensions) {
|
||||
if (fileExtensionIs(possibleInputBase, ext)) {
|
||||
const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
||||
for (const possibleExt of inputExts) {
|
||||
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
||||
if ((extensions === Extensions.TypeScript && hasJSFileExtension(possibleInputWithInputExtension)) ||
|
||||
(extensions === Extensions.JavaScript && hasTSFileExtension(possibleInputWithInputExtension))) {
|
||||
continue;
|
||||
}
|
||||
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
||||
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, /*onlyRecordFailures*/ false, state)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess: string) {
|
||||
// Config file ouput paths are processed to be relative to the host's current directory, while
|
||||
// otherwise the paths are resolved relative to the common source dir the compiler puts together
|
||||
const currentDir = state.compilerOptions.configFile ? state.host.getCurrentDirectory?.() || "" : commonSourceDirGuess;
|
||||
const candidateDirectories = [];
|
||||
if (state.compilerOptions.declarationDir) {
|
||||
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));
|
||||
}
|
||||
if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {
|
||||
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));
|
||||
}
|
||||
return candidateDirectories;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2374,12 +2528,13 @@ namespace ts {
|
||||
export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations {
|
||||
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
||||
const failedLookupLocations: string[] = [];
|
||||
const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
|
||||
const containingDirectory = getDirectoryPath(containingFile);
|
||||
const diagnostics: Diagnostic[] = [];
|
||||
const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: containingDirectory, reportDiagnostic: diag => void diagnostics.push(diag) };
|
||||
|
||||
const resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
||||
// No originalPath because classic resolution doesn't resolve realPath
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations, state.resultFromCache);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations, diagnostics, state.resultFromCache);
|
||||
|
||||
function tryResolve(extensions: Extensions): SearchResult<Resolved> {
|
||||
const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
||||
@@ -2424,9 +2579,10 @@ namespace ts {
|
||||
trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
|
||||
}
|
||||
const failedLookupLocations: string[] = [];
|
||||
const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [] };
|
||||
const diagnostics: Diagnostic[] = [];
|
||||
const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: undefined, reportDiagnostic: diag => void diagnostics.push(diag) };
|
||||
const resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, /*typesScopeOnly*/ false, /*cache*/ undefined, /*redirectedReference*/ undefined);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations, state.resultFromCache);
|
||||
return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations, diagnostics, state.resultFromCache);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace ts.moduleSpecifiers {
|
||||
const info = getInfo(importingSourceFile.path, host);
|
||||
const modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
||||
return firstDefined(modulePaths,
|
||||
modulePath => tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ true, options.overrideImportMode));
|
||||
modulePath => tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, /*packageNameOnly*/ true, options.overrideImportMode));
|
||||
}
|
||||
|
||||
function getModuleSpecifierWorker(
|
||||
@@ -120,7 +120,7 @@ namespace ts.moduleSpecifiers {
|
||||
): string {
|
||||
const info = getInfo(importingSourceFileName, host);
|
||||
const modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
||||
return firstDefined(modulePaths, modulePath => tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ undefined, options.overrideImportMode)) ||
|
||||
return firstDefined(modulePaths, modulePath => tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, /*packageNameOnly*/ undefined, options.overrideImportMode)) ||
|
||||
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace ts.moduleSpecifiers {
|
||||
let pathsSpecifiers: string[] | undefined;
|
||||
let relativeSpecifiers: string[] | undefined;
|
||||
for (const modulePath of modulePaths) {
|
||||
const specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, /*packageNameOnly*/ undefined, options.overrideImportMode);
|
||||
const specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, /*packageNameOnly*/ undefined, options.overrideImportMode);
|
||||
nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier);
|
||||
if (specifier && modulePath.isRedirect) {
|
||||
// If we got a specifier for a redirect, it was a bare package specifier (e.g. "@foo/bar",
|
||||
@@ -666,7 +666,7 @@ namespace ts.moduleSpecifiers {
|
||||
: removeFileExtension(relativePath);
|
||||
}
|
||||
|
||||
function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCanonicalFileName, sourceDirectory }: Info, importingSourceFile: SourceFile , host: ModuleSpecifierResolutionHost, options: CompilerOptions, packageNameOnly?: boolean, overrideMode?: ModuleKind.ESNext | ModuleKind.CommonJS): string | undefined {
|
||||
function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCanonicalFileName, sourceDirectory }: Info, importingSourceFile: SourceFile , host: ModuleSpecifierResolutionHost, options: CompilerOptions, userPreferences: UserPreferences, packageNameOnly?: boolean, overrideMode?: ModuleKind.ESNext | ModuleKind.CommonJS): string | undefined {
|
||||
if (!host.fileExists || !host.readFile) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -680,8 +680,9 @@ namespace ts.moduleSpecifiers {
|
||||
let moduleSpecifier = path;
|
||||
let isPackageRootPath = false;
|
||||
if (!packageNameOnly) {
|
||||
const preferences = getPreferences(host, userPreferences, options, importingSourceFile);
|
||||
let packageRootIndex = parts.packageRootIndex;
|
||||
let moduleFileNameForExtensionless: string | undefined;
|
||||
let moduleFileName: string | undefined;
|
||||
while (true) {
|
||||
// If the module could be imported by a directory name, use that directory's name
|
||||
const { moduleFileToTry, packageRootPath, blockedByExports, verbatimFromExports } = tryDirectoryWithPackageJson(packageRootIndex);
|
||||
@@ -698,12 +699,12 @@ namespace ts.moduleSpecifiers {
|
||||
isPackageRootPath = true;
|
||||
break;
|
||||
}
|
||||
if (!moduleFileNameForExtensionless) moduleFileNameForExtensionless = moduleFileToTry;
|
||||
if (!moduleFileName) moduleFileName = moduleFileToTry;
|
||||
|
||||
// try with next level of directory
|
||||
packageRootIndex = path.indexOf(directorySeparator, packageRootIndex + 1);
|
||||
if (packageRootIndex === -1) {
|
||||
moduleSpecifier = getExtensionlessFileName(moduleFileNameForExtensionless);
|
||||
moduleSpecifier = removeExtensionAndIndexPostFix(moduleFileName, preferences.ending, options, host);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -768,7 +769,7 @@ namespace ts.moduleSpecifiers {
|
||||
}
|
||||
}
|
||||
// If the file is the main module, it can be imported by the package name
|
||||
const mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main;
|
||||
const mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js";
|
||||
if (isString(mainFileRelative)) {
|
||||
const mainExportFile = toPath(mainFileRelative, packageRootPath, getCanonicalFileName);
|
||||
if (removeFileExtension(mainExportFile) === removeFileExtension(getCanonicalFileName(moduleFileToTry))) {
|
||||
@@ -776,20 +777,14 @@ namespace ts.moduleSpecifiers {
|
||||
}
|
||||
}
|
||||
}
|
||||
return { moduleFileToTry };
|
||||
}
|
||||
|
||||
function getExtensionlessFileName(path: string): string {
|
||||
// We still have a file name - remove the extension
|
||||
const fullModulePathWithoutExtension = removeFileExtension(path);
|
||||
|
||||
// If the file is /index, it can be imported by its directory name
|
||||
// IFF there is not _also_ a file by the same name
|
||||
if (getCanonicalFileName(fullModulePathWithoutExtension.substring(parts.fileNameIndex)) === "/index" && !tryGetAnyFileFromPath(host, fullModulePathWithoutExtension.substring(0, parts.fileNameIndex))) {
|
||||
return fullModulePathWithoutExtension.substring(0, parts.fileNameIndex);
|
||||
else {
|
||||
// No package.json exists; an index.js will still resolve as the package name
|
||||
const fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));
|
||||
if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") {
|
||||
return { moduleFileToTry, packageRootPath };
|
||||
}
|
||||
}
|
||||
|
||||
return fullModulePathWithoutExtension;
|
||||
return { moduleFileToTry };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -812,13 +807,20 @@ namespace ts.moduleSpecifiers {
|
||||
});
|
||||
}
|
||||
|
||||
function removeExtensionAndIndexPostFix(fileName: string, ending: Ending, options: CompilerOptions): string {
|
||||
function removeExtensionAndIndexPostFix(fileName: string, ending: Ending, options: CompilerOptions, host?: ModuleSpecifierResolutionHost): string {
|
||||
if (fileExtensionIsOneOf(fileName, [Extension.Json, Extension.Mjs, Extension.Cjs])) return fileName;
|
||||
const noExtension = removeFileExtension(fileName);
|
||||
if (fileName === noExtension) return fileName;
|
||||
if (fileExtensionIsOneOf(fileName, [Extension.Dmts, Extension.Mts, Extension.Dcts, Extension.Cts])) return noExtension + getJSExtensionForFile(fileName, options);
|
||||
switch (ending) {
|
||||
case Ending.Minimal:
|
||||
return removeSuffix(noExtension, "/index");
|
||||
const withoutIndex = removeSuffix(noExtension, "/index");
|
||||
if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {
|
||||
// Can't remove index if there's a file by the same name as the directory.
|
||||
// Probably more callers should pass `host` so we can determine this?
|
||||
return noExtension;
|
||||
}
|
||||
return withoutIndex;
|
||||
case Ending.Index:
|
||||
return noExtension;
|
||||
case Ending.JsExtension:
|
||||
|
||||
+22
-9
@@ -2745,6 +2745,7 @@ namespace ts {
|
||||
const startPos = scanner.getStartPos();
|
||||
const result = parseListElement(kind, parseElement);
|
||||
if (!result) {
|
||||
parsingContext = saveParsingContext;
|
||||
return undefined;
|
||||
}
|
||||
list.push(result as NonNullable<T>);
|
||||
@@ -4537,6 +4538,10 @@ namespace ts {
|
||||
// isn't actually allowed, but we want to treat it as a lambda so we can provide
|
||||
// a good error message.
|
||||
if (isModifierKind(second) && second !== SyntaxKind.AsyncKeyword && lookAhead(nextTokenIsIdentifier)) {
|
||||
if (nextToken() === SyntaxKind.AsKeyword) {
|
||||
// https://github.com/microsoft/TypeScript/issues/44466
|
||||
return Tristate.False;
|
||||
}
|
||||
return Tristate.True;
|
||||
}
|
||||
|
||||
@@ -5449,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 {
|
||||
|
||||
+44
-8
@@ -282,7 +282,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// directoryExists
|
||||
if (originalDirectoryExists && originalCreateDirectory) {
|
||||
if (originalDirectoryExists) {
|
||||
host.directoryExists = directory => {
|
||||
const key = toPath(directory);
|
||||
const value = directoryExistsCache.get(key);
|
||||
@@ -291,11 +291,14 @@ namespace ts {
|
||||
directoryExistsCache.set(key, !!newValue);
|
||||
return newValue;
|
||||
};
|
||||
host.createDirectory = directory => {
|
||||
const key = toPath(directory);
|
||||
directoryExistsCache.delete(key);
|
||||
originalCreateDirectory.call(host, directory);
|
||||
};
|
||||
|
||||
if (originalCreateDirectory) {
|
||||
host.createDirectory = directory => {
|
||||
const key = toPath(directory);
|
||||
directoryExistsCache.delete(key);
|
||||
originalCreateDirectory.call(host, directory);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -593,7 +596,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function getResolutionModeOverrideForClause(clause: AssertClause | undefined, grammarErrorOnNode?: (node: Node, diagnostic: DiagnosticMessage) => boolean) {
|
||||
export function getResolutionModeOverrideForClause(clause: AssertClause | undefined, grammarErrorOnNode?: (node: Node, diagnostic: DiagnosticMessage) => void) {
|
||||
if (!clause) return undefined;
|
||||
if (length(clause.elements) !== 1) {
|
||||
grammarErrorOnNode?.(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require);
|
||||
@@ -966,6 +969,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,
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -1364,6 +1369,36 @@ namespace ts {
|
||||
|
||||
return program;
|
||||
|
||||
function addResolutionDiagnostics(list: Diagnostic[] | undefined) {
|
||||
if (!list) return;
|
||||
for (const elem of list) {
|
||||
programDiagnostics.add(elem);
|
||||
}
|
||||
}
|
||||
|
||||
function pullDiagnosticsFromCache(names: string[] | readonly FileReference[], containingFile: SourceFile) {
|
||||
if (!moduleResolutionCache) return;
|
||||
const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
||||
const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : undefined;
|
||||
const containingDir = getDirectoryPath(containingFileName);
|
||||
const redirectedReference = getRedirectReferenceForResolution(containingFile);
|
||||
let i = 0;
|
||||
for (const n of names) {
|
||||
// mimics logic done in the resolution cache, should be resilient to upgrading it to use `FileReference`s for non-type-reference modal lookups to make it rely on the index in the list less
|
||||
const mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
|
||||
const name = typeof n === "string" ? n : n.fileName;
|
||||
i++;
|
||||
// only nonrelative names hit the cache, and, at least as of right now, only nonrelative names can issue diagnostics
|
||||
// (Since diagnostics are only issued via import or export map lookup)
|
||||
// This may totally change if/when the issue of output paths not mapping to input files is fixed in a broader context
|
||||
// When it is, how we extract diagnostics from the module name resolver will have the be refined - the current cache
|
||||
// APIs wrapping the underlying resolver make it almost impossible to smuggle the diagnostics out in a generalized way
|
||||
if (isExternalModuleNameRelative(name)) continue;
|
||||
const diags = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)?.resolutionDiagnostics;
|
||||
addResolutionDiagnostics(diags);
|
||||
}
|
||||
}
|
||||
|
||||
function resolveModuleNamesWorker(moduleNames: string[], containingFile: SourceFile, reusedNames: string[] | undefined): readonly ResolvedModuleFull[] {
|
||||
if (!moduleNames.length) return emptyArray;
|
||||
const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
||||
@@ -1374,6 +1409,7 @@ namespace ts {
|
||||
performance.mark("afterResolveModule");
|
||||
performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
||||
tracing?.pop();
|
||||
pullDiagnosticsFromCache(moduleNames, containingFile);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -3733,7 +3769,7 @@ namespace ts {
|
||||
}
|
||||
const matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
||||
// Could be additional files specified as roots
|
||||
if (!matchedByInclude) return undefined;
|
||||
if (!matchedByInclude || !isString(matchedByInclude)) return undefined;
|
||||
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
||||
message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
||||
break;
|
||||
|
||||
@@ -733,7 +733,7 @@ namespace ts {
|
||||
decl.modifiers,
|
||||
decl.importClause,
|
||||
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
||||
getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined
|
||||
getResolutionModeOverrideForClauseInNightly(decl.assertClause)
|
||||
);
|
||||
}
|
||||
// The `importClause` visibility corresponds to the default's visibility.
|
||||
@@ -745,7 +745,7 @@ namespace ts {
|
||||
decl.importClause.isTypeOnly,
|
||||
visibleDefaultBinding,
|
||||
/*namedBindings*/ undefined,
|
||||
), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
||||
), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
||||
}
|
||||
if (decl.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) {
|
||||
// Namespace import (optionally with visible default)
|
||||
@@ -755,7 +755,7 @@ namespace ts {
|
||||
decl.importClause.isTypeOnly,
|
||||
visibleDefaultBinding,
|
||||
namedBindings,
|
||||
), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined) : undefined;
|
||||
), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined;
|
||||
}
|
||||
// Named imports (optionally with visible default)
|
||||
const bindingList = mapDefined(decl.importClause.namedBindings.elements, b => resolver.isDeclarationVisible(b) ? b : undefined);
|
||||
@@ -771,7 +771,7 @@ namespace ts {
|
||||
bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined,
|
||||
),
|
||||
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
||||
getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined
|
||||
getResolutionModeOverrideForClauseInNightly(decl.assertClause)
|
||||
);
|
||||
}
|
||||
// Augmentation of export depends on import
|
||||
@@ -782,12 +782,23 @@ namespace ts {
|
||||
decl.modifiers,
|
||||
/*importClause*/ undefined,
|
||||
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
||||
getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined
|
||||
getResolutionModeOverrideForClauseInNightly(decl.assertClause)
|
||||
);
|
||||
}
|
||||
// Nothing visible
|
||||
}
|
||||
|
||||
function getResolutionModeOverrideForClauseInNightly(assertClause: AssertClause | undefined) {
|
||||
const mode = getResolutionModeOverrideForClause(assertClause);
|
||||
if (mode !== undefined) {
|
||||
if (!isNightly()) {
|
||||
context.addDiagnostic(createDiagnosticForNode(assertClause!, Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
||||
}
|
||||
return assertClause;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function transformAndReplaceLatePaintedStatements(statements: NodeArray<Statement>): NodeArray<Statement> {
|
||||
// This is a `while` loop because `handleSymbolAccessibilityError` can see additional import aliases marked as visible during
|
||||
// error handling which must now be included in the output and themselves checked for errors.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -145,8 +145,6 @@ namespace ts {
|
||||
// Testing only
|
||||
/*@internal*/ getUpToDateStatusOfProject(project: string): UpToDateStatus;
|
||||
/*@internal*/ invalidateProject(configFilePath: ResolvedConfigFilePath, reloadLevel?: ConfigFileProgramReloadLevel): void;
|
||||
/*@internal*/ buildNextInvalidatedProject(): void;
|
||||
/*@internal*/ getAllParsedConfigs(): readonly ParsedCommandLine[];
|
||||
/*@internal*/ close(): void;
|
||||
}
|
||||
|
||||
@@ -250,7 +248,6 @@ namespace ts {
|
||||
allProjectBuildPending: boolean;
|
||||
needsSummary: boolean;
|
||||
watchAllProjectsPending: boolean;
|
||||
currentInvalidatedProject: InvalidatedProject<T> | undefined;
|
||||
|
||||
// Watch state
|
||||
readonly watch: boolean;
|
||||
@@ -332,7 +329,6 @@ namespace ts {
|
||||
allProjectBuildPending: true,
|
||||
needsSummary: true,
|
||||
watchAllProjectsPending: watch,
|
||||
currentInvalidatedProject: undefined,
|
||||
|
||||
// Watch state
|
||||
watch,
|
||||
@@ -684,7 +680,6 @@ namespace ts {
|
||||
projectPath: ResolvedConfigFilePath
|
||||
) {
|
||||
state.projectPendingBuild.delete(projectPath);
|
||||
state.currentInvalidatedProject = undefined;
|
||||
return state.diagnostics.has(projectPath) ?
|
||||
ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
||||
ExitStatus.Success;
|
||||
@@ -1171,19 +1166,22 @@ namespace ts {
|
||||
!isIncrementalCompilation(config.options);
|
||||
}
|
||||
|
||||
function getNextInvalidatedProject<T extends BuilderProgram>(
|
||||
interface InvalidateProjectCreateInfo {
|
||||
kind: InvalidatedProjectKind;
|
||||
status: UpToDateStatus;
|
||||
project: ResolvedConfigFileName;
|
||||
projectPath: ResolvedConfigFilePath;
|
||||
projectIndex: number;
|
||||
config: ParsedCommandLine;
|
||||
}
|
||||
|
||||
function getNextInvalidatedProjectCreateInfo<T extends BuilderProgram>(
|
||||
state: SolutionBuilderState<T>,
|
||||
buildOrder: AnyBuildOrder,
|
||||
reportQueue: boolean
|
||||
): InvalidatedProject<T> | undefined {
|
||||
): InvalidateProjectCreateInfo | undefined {
|
||||
if (!state.projectPendingBuild.size) return undefined;
|
||||
if (isCircularBuildOrder(buildOrder)) return undefined;
|
||||
if (state.currentInvalidatedProject) {
|
||||
// Only if same buildOrder the currentInvalidated project can be sent again
|
||||
return arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
||||
state.currentInvalidatedProject :
|
||||
undefined;
|
||||
}
|
||||
|
||||
const { options, projectPendingBuild } = state;
|
||||
for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
||||
@@ -1220,9 +1218,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
const status = getUpToDateStatus(state, config, projectPath);
|
||||
verboseReportProjectStatus(state, project, status);
|
||||
if (!options.force) {
|
||||
if (status.type === UpToDateStatusType.UpToDate) {
|
||||
verboseReportProjectStatus(state, project, status);
|
||||
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
||||
projectPendingBuild.delete(projectPath);
|
||||
// Up to date, skip
|
||||
@@ -1235,17 +1233,19 @@ namespace ts {
|
||||
|
||||
if (status.type === UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
||||
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
||||
return createUpdateOutputFileStampsProject(
|
||||
state,
|
||||
return {
|
||||
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
||||
status,
|
||||
project,
|
||||
projectPath,
|
||||
config,
|
||||
buildOrder
|
||||
);
|
||||
projectIndex,
|
||||
config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (status.type === UpToDateStatusType.UpstreamBlocked) {
|
||||
verboseReportProjectStatus(state, project, status);
|
||||
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
||||
projectPendingBuild.delete(projectPath);
|
||||
if (options.verbose) {
|
||||
@@ -1262,28 +1262,63 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (status.type === UpToDateStatusType.ContainerOnly) {
|
||||
verboseReportProjectStatus(state, project, status);
|
||||
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
||||
projectPendingBuild.delete(projectPath);
|
||||
// Do nothing
|
||||
continue;
|
||||
}
|
||||
|
||||
return createBuildOrUpdateInvalidedProject(
|
||||
needsBuild(state, status, config) ?
|
||||
return {
|
||||
kind: needsBuild(state, status, config) ?
|
||||
InvalidatedProjectKind.Build :
|
||||
InvalidatedProjectKind.UpdateBundle,
|
||||
state,
|
||||
status,
|
||||
project,
|
||||
projectPath,
|
||||
projectIndex,
|
||||
config,
|
||||
buildOrder,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function createInvalidatedProjectWithInfo<T extends BuilderProgram>(
|
||||
state: SolutionBuilderState<T>,
|
||||
info: InvalidateProjectCreateInfo,
|
||||
buildOrder: AnyBuildOrder,
|
||||
) {
|
||||
verboseReportProjectStatus(state, info.project, info.status);
|
||||
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
||||
createBuildOrUpdateInvalidedProject(
|
||||
info.kind,
|
||||
state,
|
||||
info.project,
|
||||
info.projectPath,
|
||||
info.projectIndex,
|
||||
info.config,
|
||||
buildOrder as BuildOrder,
|
||||
) :
|
||||
createUpdateOutputFileStampsProject(
|
||||
state,
|
||||
info.project,
|
||||
info.projectPath,
|
||||
info.config,
|
||||
buildOrder as BuildOrder
|
||||
);
|
||||
}
|
||||
|
||||
function getNextInvalidatedProject<T extends BuilderProgram>(
|
||||
state: SolutionBuilderState<T>,
|
||||
buildOrder: AnyBuildOrder,
|
||||
reportQueue: boolean
|
||||
): InvalidatedProject<T> | undefined {
|
||||
const info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
||||
if (!info) return info;
|
||||
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
||||
}
|
||||
|
||||
function listEmittedFile({ write }: SolutionBuilderState, proj: ParsedCommandLine, file: string) {
|
||||
if (write && proj.options.listEmittedFiles) {
|
||||
write(`TSFILE: ${file}`);
|
||||
@@ -1769,10 +1804,10 @@ namespace ts {
|
||||
function invalidateProjectAndScheduleBuilds(state: SolutionBuilderState, resolvedPath: ResolvedConfigFilePath, reloadLevel: ConfigFileProgramReloadLevel) {
|
||||
state.reportFileChangeDetected = true;
|
||||
invalidateProject(state, resolvedPath, reloadLevel);
|
||||
scheduleBuildInvalidatedProject(state);
|
||||
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
||||
}
|
||||
|
||||
function scheduleBuildInvalidatedProject(state: SolutionBuilderState) {
|
||||
function scheduleBuildInvalidatedProject(state: SolutionBuilderState, time: number, changeDetected: boolean) {
|
||||
const { hostWithWatch } = state;
|
||||
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
||||
return;
|
||||
@@ -1780,26 +1815,36 @@ namespace ts {
|
||||
if (state.timerToBuildInvalidatedProject) {
|
||||
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
||||
}
|
||||
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, 250, state);
|
||||
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
||||
}
|
||||
|
||||
function buildNextInvalidatedProject(state: SolutionBuilderState) {
|
||||
function buildNextInvalidatedProject(state: SolutionBuilderState, changeDetected: boolean) {
|
||||
state.timerToBuildInvalidatedProject = undefined;
|
||||
if (state.reportFileChangeDetected) {
|
||||
state.reportFileChangeDetected = false;
|
||||
state.projectErrorsReported.clear();
|
||||
reportWatchStatus(state, Diagnostics.File_change_detected_Starting_incremental_compilation);
|
||||
}
|
||||
let projectsBuilt = 0;
|
||||
const buildOrder = getBuildOrder(state);
|
||||
const invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
||||
if (invalidatedProject) {
|
||||
invalidatedProject.done();
|
||||
if (state.projectPendingBuild.size) {
|
||||
// Schedule next project for build
|
||||
if (state.watch && !state.timerToBuildInvalidatedProject) {
|
||||
scheduleBuildInvalidatedProject(state);
|
||||
projectsBuilt++;
|
||||
while (state.projectPendingBuild.size) {
|
||||
// If already scheduled, skip
|
||||
if (state.timerToBuildInvalidatedProject) return;
|
||||
// Before scheduling check if the next project needs build
|
||||
const info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
||||
if (!info) break; // Nothing to build any more
|
||||
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
||||
// Schedule next project for build
|
||||
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
const project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
||||
project.done();
|
||||
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps) projectsBuilt++;
|
||||
}
|
||||
}
|
||||
disableCache(state);
|
||||
@@ -1961,11 +2006,6 @@ namespace ts {
|
||||
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
||||
},
|
||||
invalidateProject: (configFilePath, reloadLevel) => invalidateProject(state, configFilePath, reloadLevel || ConfigFileProgramReloadLevel.None),
|
||||
buildNextInvalidatedProject: () => buildNextInvalidatedProject(state),
|
||||
getAllParsedConfigs: () => arrayFrom(mapDefinedIterator(
|
||||
state.configFileCache.values(),
|
||||
config => isParsedCommandLine(config) ? config : undefined
|
||||
)),
|
||||
close: () => stopWatching(state),
|
||||
};
|
||||
}
|
||||
|
||||
+15
-3
@@ -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;
|
||||
@@ -6385,6 +6392,7 @@ namespace ts {
|
||||
validatedIncludeSpecs: readonly string[] | undefined;
|
||||
validatedExcludeSpecs: readonly string[] | undefined;
|
||||
pathPatterns: readonly (string | Pattern)[] | undefined;
|
||||
isDefaultIncludeSpec: boolean;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
@@ -6717,6 +6725,8 @@ namespace ts {
|
||||
readonly resolvedModule: ResolvedModuleFull | undefined;
|
||||
/* @internal */
|
||||
readonly failedLookupLocations: string[];
|
||||
/* @internal */
|
||||
readonly resolutionDiagnostics: Diagnostic[]
|
||||
}
|
||||
|
||||
export interface ResolvedTypeReferenceDirective {
|
||||
@@ -6738,6 +6748,8 @@ namespace ts {
|
||||
export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
|
||||
readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
|
||||
readonly failedLookupLocations: string[];
|
||||
/* @internal */
|
||||
resolutionDiagnostics: Diagnostic[]
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
@@ -7675,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;
|
||||
|
||||
+14
-10
@@ -2866,16 +2866,6 @@ namespace ts {
|
||||
return typeParameters && find(typeParameters, p => p.name.escapedText === name);
|
||||
}
|
||||
|
||||
export function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean {
|
||||
const last = lastOrUndefined<ParameterDeclaration | JSDocParameterTag>(s.parameters);
|
||||
return !!last && isRestParameter(last);
|
||||
}
|
||||
|
||||
export function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean {
|
||||
const type = isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
||||
return (node as ParameterDeclaration).dotDotDotToken !== undefined || !!type && type.kind === SyntaxKind.JSDocVariadicType;
|
||||
}
|
||||
|
||||
export function hasTypeArguments(node: Node): node is HasTypeArguments {
|
||||
return !!(node as HasTypeArguments).typeArguments;
|
||||
}
|
||||
@@ -4121,6 +4111,10 @@ namespace ts {
|
||||
return indentStrings[1].length;
|
||||
}
|
||||
|
||||
export function isNightly() {
|
||||
return stringContains(version, "-dev") || stringContains(version, "-insiders");
|
||||
}
|
||||
|
||||
export function createTextWriter(newLine: string): EmitTextWriter {
|
||||
let output: string;
|
||||
let indent: number;
|
||||
@@ -4387,6 +4381,16 @@ namespace ts {
|
||||
Extension.Dts;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is an inverse of `getDeclarationEmitExtensionForPath`.
|
||||
*/
|
||||
export function getPossibleOriginalInputExtensionForExtension(path: string) {
|
||||
return fileExtensionIsOneOf(path, [Extension.Dmts, Extension.Mjs, Extension.Mts]) ? [Extension.Mts, Extension.Mjs] :
|
||||
fileExtensionIsOneOf(path, [Extension.Dcts, Extension.Cjs, Extension.Cts]) ? [Extension.Cts, Extension.Cjs]:
|
||||
fileExtensionIsOneOf(path, [`.json.d.ts`]) ? [Extension.Json] :
|
||||
[Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js];
|
||||
}
|
||||
|
||||
export function outFile(options: CompilerOptions) {
|
||||
return options.outFile || options.out;
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
@@ -2015,5 +2028,16 @@ namespace ts {
|
||||
export function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain {
|
||||
return node.kind === SyntaxKind.JSDocLink || node.kind === SyntaxKind.JSDocLinkCode || node.kind === SyntaxKind.JSDocLinkPlain;
|
||||
}
|
||||
|
||||
export function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean {
|
||||
const last = lastOrUndefined<ParameterDeclaration | JSDocParameterTag>(s.parameters);
|
||||
return !!last && isRestParameter(last);
|
||||
}
|
||||
|
||||
export function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean {
|
||||
const type = isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
||||
return (node as ParameterDeclaration).dotDotDotToken !== undefined || !!type && type.kind === SyntaxKind.JSDocVariadicType;
|
||||
}
|
||||
|
||||
// #endregion
|
||||
}
|
||||
+25
-3
@@ -261,6 +261,9 @@ namespace ts {
|
||||
const configFile = program.getCompilerOptions().configFile;
|
||||
if (!configFile?.configFileSpecs?.validatedIncludeSpecs) return undefined;
|
||||
|
||||
// Return true if its default include spec
|
||||
if (configFile.configFileSpecs.isDefaultIncludeSpec) return true;
|
||||
|
||||
const isJsonFile = fileExtensionIs(fileName, Extension.Json);
|
||||
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
||||
const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
|
||||
@@ -327,15 +330,18 @@ namespace ts {
|
||||
const matchedByFiles = getMatchedFileSpec(program, fileName);
|
||||
if (matchedByFiles) return chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Part_of_files_list_in_tsconfig_json);
|
||||
const matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
||||
return matchedByInclude ?
|
||||
return isString(matchedByInclude) ?
|
||||
chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
Diagnostics.Matched_by_include_pattern_0_in_1,
|
||||
matchedByInclude,
|
||||
toFileName(options.configFile, fileNameConvertor)
|
||||
) :
|
||||
// Could be additional files specified as roots
|
||||
chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Root_file_specified_for_compilation);
|
||||
// Could be additional files specified as roots or matched by default include
|
||||
chainDiagnosticMessages(/*details*/ undefined, matchedByInclude ?
|
||||
Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk :
|
||||
Diagnostics.Root_file_specified_for_compilation
|
||||
);
|
||||
case FileIncludeKind.SourceFromProjectReference:
|
||||
case FileIncludeKind.OutputFromProjectReference:
|
||||
const isOutput = reason.kind === FileIncludeKind.OutputFromProjectReference;
|
||||
@@ -507,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 {
|
||||
@@ -521,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> {
|
||||
|
||||
@@ -880,6 +880,10 @@ namespace ts.server {
|
||||
throw new Error("Program objects are not serializable through the server protocol.");
|
||||
}
|
||||
|
||||
updateIsDefinitionOfReferencedSymbols(_referencedSymbols: readonly ReferencedSymbol[], _knownSymbolSpans: Set<DocumentSpan>): boolean {
|
||||
return notImplemented();
|
||||
}
|
||||
|
||||
getNonBoundSourceFile(_fileName: string): SourceFile {
|
||||
throw new Error("SourceFile objects are not serializable through the server protocol.");
|
||||
}
|
||||
|
||||
@@ -404,8 +404,8 @@ namespace FourSlashInterface {
|
||||
this.state.baselineSignatureHelp();
|
||||
}
|
||||
|
||||
public baselineCompletions() {
|
||||
this.state.baselineCompletions();
|
||||
public baselineCompletions(preferences?: ts.UserPreferences) {
|
||||
this.state.baselineCompletions(preferences);
|
||||
}
|
||||
|
||||
public baselineSmartSelection() {
|
||||
|
||||
@@ -1389,22 +1389,27 @@ namespace Harness {
|
||||
else {
|
||||
IO.writeFile(actualFileName, encodedActual);
|
||||
}
|
||||
const errorMessage = getBaselineFileChangedErrorMessage(relativeFileName);
|
||||
if (!!require && opts && opts.PrintDiff) {
|
||||
const Diff = require("diff");
|
||||
const patch = Diff.createTwoFilesPatch("Expected", "Actual", expected, actual, "The current baseline", "The new version");
|
||||
throw new Error(`The baseline file ${relativeFileName} has changed.${ts.ForegroundColorEscapeSequences.Grey}\n\n${patch}`);
|
||||
throw new Error(`${errorMessage}${ts.ForegroundColorEscapeSequences.Grey}\n\n${patch}`);
|
||||
}
|
||||
else {
|
||||
if (!IO.fileExists(expected)) {
|
||||
throw new Error(`New baseline created at ${IO.joinPath("tests", "baselines","local", relativeFileName)}`);
|
||||
}
|
||||
else {
|
||||
throw new Error(`The baseline file ${relativeFileName} has changed.`);
|
||||
throw new Error(errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBaselineFileChangedErrorMessage(relativeFileName: string): string {
|
||||
return `The baseline file ${relativeFileName} has changed. (Run "gulp baseline-accept" if the new baseline is correct.)`;
|
||||
}
|
||||
|
||||
export function runBaseline(relativeFileName: string, actual: string | null, opts?: BaselineOptions): void {
|
||||
const actualFileName = localPath(relativeFileName, opts && opts.Baselinefolder, opts && opts.Subfolder);
|
||||
if (actual === undefined) {
|
||||
|
||||
@@ -630,6 +630,9 @@ namespace Harness.LanguageService {
|
||||
getAutoImportProvider(): ts.Program | undefined {
|
||||
throw new Error("Program can not be marshaled across the shim layer.");
|
||||
}
|
||||
updateIsDefinitionOfReferencedSymbols(_referencedSymbols: readonly ts.ReferencedSymbol[], _knownSymbolSpans: ts.Set<ts.DocumentSpan>): boolean {
|
||||
return ts.notImplemented();
|
||||
}
|
||||
getNonBoundSourceFile(): ts.SourceFile {
|
||||
throw new Error("SourceFile can not be marshaled across the shim layer.");
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
symLink: string;
|
||||
}
|
||||
|
||||
type FSEntry = FsFile | FsFolder | FsSymLink;
|
||||
export type FSEntry = FsFile | FsFolder | FsSymLink;
|
||||
|
||||
function isFsFolder(s: FSEntry | undefined): s is FsFolder {
|
||||
return !!s && isArray((s as FsFolder).entries);
|
||||
@@ -207,18 +207,27 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
}
|
||||
}
|
||||
|
||||
interface CallbackData {
|
||||
cb: TimeOutCallback;
|
||||
args: any[];
|
||||
ms: number | undefined;
|
||||
time: number;
|
||||
}
|
||||
class Callbacks {
|
||||
private map: TimeOutCallback[] = [];
|
||||
private map: { cb: TimeOutCallback; args: any[]; ms: number | undefined; time: number; }[] = [];
|
||||
private nextId = 1;
|
||||
|
||||
constructor(private host: TestServerHost) {
|
||||
}
|
||||
|
||||
getNextId() {
|
||||
return this.nextId;
|
||||
}
|
||||
|
||||
register(cb: (...args: any[]) => void, args: any[]) {
|
||||
register(cb: TimeOutCallback, args: any[], ms?: number) {
|
||||
const timeoutId = this.nextId;
|
||||
this.nextId++;
|
||||
this.map[timeoutId] = cb.bind(/*this*/ undefined, ...args);
|
||||
this.map[timeoutId] = { cb, args, ms, time: this.host.getTime() };
|
||||
return timeoutId;
|
||||
}
|
||||
|
||||
@@ -236,9 +245,19 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
return n;
|
||||
}
|
||||
|
||||
private invokeCallback({ cb, args, ms, time }: CallbackData) {
|
||||
if (ms !== undefined) {
|
||||
const newTime = ms + time;
|
||||
if (this.host.getTime() < newTime) {
|
||||
this.host.setTime(newTime);
|
||||
}
|
||||
}
|
||||
cb(...args);
|
||||
}
|
||||
|
||||
invoke(invokeKey?: number) {
|
||||
if (invokeKey) {
|
||||
this.map[invokeKey]();
|
||||
this.invokeCallback(this.map[invokeKey]);
|
||||
delete this.map[invokeKey];
|
||||
return;
|
||||
}
|
||||
@@ -247,13 +266,13 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
// so do not clear the entire callback list regardless. Only remove the
|
||||
// ones we have invoked.
|
||||
for (const key in this.map) {
|
||||
this.map[key]();
|
||||
this.invokeCallback(this.map[key]);
|
||||
delete this.map[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type TimeOutCallback = () => any;
|
||||
type TimeOutCallback = (...args: any[]) => void;
|
||||
|
||||
export interface TestFileWatcher {
|
||||
cb: FileWatcherCallback;
|
||||
@@ -310,8 +329,8 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
private time = timeIncrements;
|
||||
getCanonicalFileName: (s: string) => string;
|
||||
private toPath: (f: string) => Path;
|
||||
private timeoutCallbacks = new Callbacks();
|
||||
private immediateCallbacks = new Callbacks();
|
||||
private timeoutCallbacks = new Callbacks(this);
|
||||
private immediateCallbacks = new Callbacks(this);
|
||||
readonly screenClears: number[] = [];
|
||||
|
||||
readonly watchedFiles = createMultiMap<Path, TestFileWatcher>();
|
||||
@@ -421,6 +440,14 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
return new Date(this.time);
|
||||
}
|
||||
|
||||
getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
setTime(time: number) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
private reloadFS(fileOrFolderOrSymLinkList: FileOrFolderOrSymLinkMap | readonly FileOrFolderOrSymLink[]) {
|
||||
Debug.assert(this.fs.size === 0);
|
||||
if (isArray(fileOrFolderOrSymLinkList)) {
|
||||
@@ -864,8 +891,8 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
}
|
||||
|
||||
// TOOD: record and invoke callbacks to simulate timer events
|
||||
setTimeout(callback: TimeOutCallback, _time: number, ...args: any[]) {
|
||||
return this.timeoutCallbacks.register(callback, args);
|
||||
setTimeout(callback: TimeOutCallback, ms: number, ...args: any[]) {
|
||||
return this.timeoutCallbacks.register(callback, args, ms);
|
||||
}
|
||||
|
||||
getNextTimeoutId() {
|
||||
@@ -909,7 +936,7 @@ interface Array<T> { length: number; [n: number]: T; }`
|
||||
this.immediateCallbacks.invoke();
|
||||
}
|
||||
|
||||
setImmediate(callback: TimeOutCallback, _time: number, ...args: any[]) {
|
||||
setImmediate(callback: TimeOutCallback, ...args: any[]) {
|
||||
return this.immediateCallbacks.register(callback, args);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+30
-5
@@ -1,3 +1,4 @@
|
||||
/// <reference lib="es2018.intl" />
|
||||
declare namespace Intl {
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,25 @@ declare namespace Intl {
|
||||
| "second"
|
||||
| "seconds";
|
||||
|
||||
/**
|
||||
* Value of the `unit` property in objects returned by
|
||||
* `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and
|
||||
* `format` methods accept either singular or plural unit names as input,
|
||||
* but `formatToParts` only outputs singular (e.g. "day") not plural (e.g.
|
||||
* "days").
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
||||
*/
|
||||
type RelativeTimeFormatUnitSingular =
|
||||
| "year"
|
||||
| "quarter"
|
||||
| "month"
|
||||
| "week"
|
||||
| "day"
|
||||
| "hour"
|
||||
| "minute"
|
||||
| "second";
|
||||
|
||||
/**
|
||||
* The locale matching algorithm to use.
|
||||
*
|
||||
@@ -100,11 +120,16 @@ declare namespace Intl {
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
||||
*/
|
||||
interface RelativeTimeFormatPart {
|
||||
type: string;
|
||||
value: string;
|
||||
unit?: RelativeTimeFormatUnit;
|
||||
}
|
||||
type RelativeTimeFormatPart =
|
||||
| {
|
||||
type: "literal";
|
||||
value: string;
|
||||
}
|
||||
| {
|
||||
type: Exclude<NumberFormatPartTypes, "literal">;
|
||||
value: string;
|
||||
unit: RelativeTimeFormatUnitSingular;
|
||||
};
|
||||
|
||||
interface RelativeTimeFormat {
|
||||
/**
|
||||
|
||||
Vendored
+7
-3
@@ -5,12 +5,16 @@ declare namespace Intl {
|
||||
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
||||
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
||||
dayPeriod?: "narrow" | "short" | "long" | undefined;
|
||||
fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;
|
||||
fractionalSecondDigits?: 1 | 2 | 3 | undefined;
|
||||
}
|
||||
|
||||
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
}
|
||||
|
||||
interface DateTimeFormat {
|
||||
formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string;
|
||||
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeFormatPart[];
|
||||
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[];
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
@@ -19,7 +23,7 @@ declare namespace Intl {
|
||||
timeStyle?: "full" | "long" | "medium" | "short";
|
||||
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
||||
dayPeriod?: "narrow" | "short" | "long";
|
||||
fractionalSecondDigits?: 0 | 1 | 2 | 3;
|
||||
fractionalSecondDigits?: 1 | 2 | 3;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
/// <reference lib="es2021" />
|
||||
/// <reference lib="es2022.array" />
|
||||
/// <reference lib="es2022.error" />
|
||||
/// <reference lib="es2022.intl" />
|
||||
/// <reference lib="es2022.object" />
|
||||
/// <reference lib="es2022.string" />
|
||||
Vendored
+91
@@ -0,0 +1,91 @@
|
||||
declare namespace Intl {
|
||||
|
||||
/**
|
||||
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
||||
*/
|
||||
interface SegmenterOptions {
|
||||
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
||||
localeMatcher?: "best fit" | "lookup" | undefined;
|
||||
/** The type of input to be split */
|
||||
granularity?: "grapheme" | "word" | "sentence" | undefined;
|
||||
}
|
||||
|
||||
interface Segmenter {
|
||||
/**
|
||||
* Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
|
||||
*
|
||||
* @param input - The text to be segmented as a `string`.
|
||||
*
|
||||
* @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
|
||||
*/
|
||||
segment(input: string): Segments;
|
||||
resolvedOptions(): ResolvedSegmenterOptions;
|
||||
}
|
||||
|
||||
interface ResolvedSegmenterOptions {
|
||||
locale: string;
|
||||
granularity: "grapheme" | "word" | "sentence";
|
||||
}
|
||||
|
||||
interface Segments {
|
||||
/**
|
||||
* Returns an object describing the segment in the original string that includes the code unit at a specified index.
|
||||
*
|
||||
* @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
|
||||
*/
|
||||
containing(codeUnitIndex?: number): SegmentData;
|
||||
|
||||
/** Returns an iterator to iterate over the segments. */
|
||||
[Symbol.iterator](): IterableIterator<SegmentData>;
|
||||
}
|
||||
|
||||
interface SegmentData {
|
||||
/** A string containing the segment extracted from the original input string. */
|
||||
segment: string;
|
||||
/** The code unit index in the original input string at which the segment begins. */
|
||||
index: number;
|
||||
/** The complete input string that was segmented. */
|
||||
input: string;
|
||||
/**
|
||||
* A boolean value only if granularity is "word"; otherwise, undefined.
|
||||
* If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.
|
||||
*/
|
||||
isWordLike?: boolean;
|
||||
}
|
||||
|
||||
const Segmenter: {
|
||||
prototype: Segmenter;
|
||||
|
||||
/**
|
||||
* Creates a new `Intl.Segmenter` object.
|
||||
*
|
||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
||||
* For the general form and interpretation of the `locales` argument,
|
||||
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
||||
*
|
||||
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
||||
* with some or all options of `SegmenterOptions`.
|
||||
*
|
||||
* @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
||||
*/
|
||||
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
|
||||
|
||||
/**
|
||||
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
|
||||
*
|
||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
||||
* For the general form and interpretation of the `locales` argument,
|
||||
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
||||
*
|
||||
* @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
|
||||
* with some or all possible options.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
|
||||
*/
|
||||
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
|
||||
};
|
||||
}
|
||||
Vendored
+5
-1
@@ -1,6 +1,10 @@
|
||||
declare namespace Intl {
|
||||
interface NumberRangeFormatPart extends NumberFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
}
|
||||
|
||||
interface NumberFormat {
|
||||
formatRange(start: number | bigint, end: number | bigint): string;
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberFormatPart[];
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,7 @@
|
||||
"es2021.intl",
|
||||
"es2022.array",
|
||||
"es2022.error",
|
||||
"es2022.intl",
|
||||
"es2022.object",
|
||||
"es2022.string",
|
||||
"esnext.intl",
|
||||
|
||||
@@ -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>
|
||||
@@ -5360,10 +5378,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[仅当 '--module' 标志设置为 'es2020'、'es2022'、'esnext'、 'commonjs'、'amd'、'system'、'umd'、'node12' 或 'nodenext' 时,才支持动态导入。]]></Val>
|
||||
<Val><![CDATA[仅在将 “--module” 标记设置为 “es2020”、“es2022”、“esnext”、“commonjs”、“amd”、“system”、“umd”、“node16” 或 “nodenext” 时,才支持动态导入。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5376,11 +5397,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有当 “--module” 选项设置为 “esnext” 或 “nodenext” 时,动态导入才支持第二个参数。]]></Val>
|
||||
<Val><![CDATA[只有当 “--module” 选项设置为 “esnext”、 “node16” 或 “nodenext” 时,动态导入才支持第二个参数。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7965,15 +7986,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON 导入在 ES 模块模式导入中是实验性的。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8331,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>
|
||||
@@ -10757,19 +10778,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。请考虑将扩展名添加到导入路径中。]]></Val>
|
||||
<Val><![CDATA[当 “--moduleResolution” 为 “node16” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。请考虑将扩展名添加到导入路径中。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。你是否指的是“{0}”?]]></Val>
|
||||
<Val><![CDATA[当 “--moduleResolution” 为 “node16” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。你是否指的是“{0}”?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11115,11 +11142,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[仅当“moduleResolution”为“node12”或“nodenext”时才支持解析模式。]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[仅当 `moduleResolution` 为 `node16` 或 `nodenext` 时才支持解析模式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12696,6 +12732,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[当前文件是 CommonJS 模块,因此不能在顶级使用 “await”。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12827,10 +12872,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[仅当 '--module' 选项为 'es2020'、'es2022'、'esnext'、 'system'、'node12' 或 'nodenext' 时,才允许 'import.meta' 元属性。]]></Val>
|
||||
<Val><![CDATA[仅当 “--module” 选项为 “es2020”、“es2022”、“esnext”、“system”、“node16” 或 “nodenext” 时,才允许使用 “import.meta” 元属性。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13140,6 +13188,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[项目根不明确,但需要解析文件“{1}”中的导出映射项“{0}”。提供 `rootDir` 编译器选项以消除歧义。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[项目根不明确,但仍需要解析文件“{1}”中的导入映射项“{0}”。提供 `rootDir` 编译器选项以消除歧义。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13440,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>
|
||||
@@ -13728,15 +13803,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此类型参数可能需要 "extends object" 约束。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13746,11 +13812,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[仅当 'module' 选项设置为 'es2022'、'esnext'、'system' 或 'nodenext',且 'target' 选项设置为 'es2017' 或更高版本时,才允许顶级 'await' 表达式。]]></Val>
|
||||
<Val><![CDATA[仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “await” 表达式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13764,11 +13830,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[仅当 'module' 选项设置为 'es2022'、'esnext'、'system' 或 'nodenext',且 'target' 选项设置为 'es2017' 或更高版本时,才允许顶级 'for await' 循环。]]></Val>
|
||||
<Val><![CDATA[仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “for await” 循环。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15950,10 +16016,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[“auto”: 将导入、导出、import.meta、jsx (带有 jsx: react-jsx)或 esm 格式(带模块: node12+)的文件视为模块。]]></Val>
|
||||
<Val><![CDATA[“auto”: 将带有导入、导出、import.meta、jsx (带有 jsx: react-jsx)或 esm 格式(带模块: node16+)的文件视为模块。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16380,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>
|
||||
@@ -5360,10 +5378,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有在 '--module' 旗標設定為 'es2020'、'es2022'、'esnext'、'commonjs'、'amd'、'system'、'umd'、'node12' 或 'nodenext',才支援動態匯入。]]></Val>
|
||||
<Val><![CDATA[只有在 '--module' 旗標設定為 'es2020'、'es2022'、'esnext'、'commonjs'、'amd'、'system'、'umd'、'node16' 或 'nodenext',才支援動態匯入。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5376,11 +5397,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[當 '--module' 選項設定為 'esnext' 時,動態匯入只支援第二個引數。]]></Val>
|
||||
<Val><![CDATA[當 '--module' 選項設定為 'esnext'、'node16' 或 'nodenext' 時,動態匯入只支援第二個引數。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7965,15 +7986,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON 匯入在 ES 模組模式匯入中為實驗性。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8331,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>
|
||||
@@ -10757,19 +10778,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[當 '--moduleResolution' 為 'node12' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。請考慮將延伸模組新增到匯入路徑。]]></Val>
|
||||
<Val><![CDATA[當 '--moduleResolution' 為 'node16' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。請考慮將副檔名新增到匯入路徑。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[當 '--moduleResolution' 為 'node12' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。您是 指 '{0}' 嗎?]]></Val>
|
||||
<Val><![CDATA[當 '--moduleResolution' 為 'node16' 或 'nodenext' 時,相對匯入路徑在 EcmaScript 匯入中需要明確的副檔名。您是 指 '{0}' 嗎?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11115,11 +11142,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[只有當 'moduleResolution' 為 'node12' 或 'nodenext' 時,才支援解析模式。]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有當 'moduleResolution' 為 'node16' 或 'nodenext' 時,才支援解析模式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12696,6 +12732,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[目前的檔案是 CommonJS 模組,無法在最上層使用 'await'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12827,10 +12872,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有當 '--module' 選項為 'es2020'、'es2022'、'esnext'、'system'、, 'node12' 或 'nodenext' 時,才允許 'import.meta' 中繼屬性。]]></Val>
|
||||
<Val><![CDATA[只有當 '--module' 選項為 'es2020'、'es2022'、'esnext'、'system'、, 'node16' 或 'nodenext' 時,才允許 'import.meta' 中繼屬性。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13140,6 +13188,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[專案根目錄模棱兩可,但需要用以解決檔案 '{1}' 中的匯出對應項目 '{0}'。請提供 'rootDir' 編譯器選項來釐清。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[專案根目錄模稜兩可,但需要在檔案 '{1}' 中解析匯入對應項目 '{0}'。請提供 'rootDir' 編譯器選項來釐清。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13440,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>
|
||||
@@ -13728,15 +13803,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此類型參數可能需要 'extends object' 限制式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13746,11 +13812,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有在 'module' 選項設定為 'es2022'、'esnext'、'system' 或 'nodenext',而且 'target' 選項設定為 'es2017' 或更高版本時,才允許最上層的 'await' 運算式。]]></Val>
|
||||
<Val><![CDATA[只有在 'module' 選項設定為 'es2022'、'esnext'、'system'、'node16' 或 'nodenext',而且 'target' 選項設定為 'es2017' 或更高版本時,才允許最上層的 'await' 運算式。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13764,11 +13830,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[只有在 'module' 選項設為 'es2022'、'esnext'、'system' 或 'nodenext',而且 'target' 選項設為 'es2017' 或更高版本時,才允許最上層的 'for await' 迴圈。]]></Val>
|
||||
<Val><![CDATA[只有在 'module' 選項設為 'es2022'、'esnext'、'system'、'node16' 或 'nodenext',而且 'target' 選項設為 'es2017' 或更高版本時,才允許最上層的 'for await' 迴圈。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15950,10 +16016,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": 處理具有 imports、exports、import.meta, jsx (具有 jsx: react-jsx) 或 esm 格式 (具有 module: node12+) 的檔案作為模組。]]></Val>
|
||||
<Val><![CDATA["auto": 處理具有 imports、exports、import.meta, jsx (具有 jsx: react-jsx) 的檔案,或以 esm 格式 (具有 module: node16+) 作為模組。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16380,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>
|
||||
|
||||
@@ -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>
|
||||
@@ -5369,10 +5387,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dynamické importy se podporují jen v případě, že příznak --module je nastavený na es2020, es2022, esnext, commonjs, amd, system, umd, node12 nebo nodenext.]]></Val>
|
||||
<Val><![CDATA[Dynamické importy se podporují jen v případě, že příznak --module je nastavený na es2020, es2022, esnext, commonjs, amd, system, umd, node16 nebo nodenext.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5385,11 +5406,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dynamické importy podporují pouze druhý argument, pokud je možnost --module nastavena na hodnotu esnext nebo nodenext.]]></Val>
|
||||
<Val><![CDATA[Dynamické importy podporují druhý argument pouze, pokud je možnost --module nastavena na hodnotu esnext, node16 nebo nodenext.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7974,15 +7995,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importy JSON jsou v importech režimu modulu ES experimentální.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8340,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>
|
||||
@@ -10766,19 +10787,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node12 nebo nodenext. Zvažte přidání rozšíření do cesty importu.]]></Val>
|
||||
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node16 nebo nodenext. Zvažte přidání přípony do cesty importu.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node12 nebo nodenext. Měli jste na mysli {0}?]]></Val>
|
||||
<Val><![CDATA[Relativní cesty importu vyžadují explicitní přípony souborů v importech EcmaScriptu, když --moduleResolution je node16 nebo nodenext. Měli jste na mysli {0}?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11124,11 +11151,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Režimy řešení se podporují pouze v případě, že moduleResolution je node12 nebo nodenext.]]></Val>
|
||||
<Val><![CDATA[Kontrolní výrazy režimu řešení jsou nestabilní. Ke ztlumení této chyby použijte noční TypeScript. Zkuste provést aktualizaci pomocí příkazu npm install -D typescript@next.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Režimy řešení se podporují pouze v případě, že hodnota moduleResolution je node16 nebo nodenext.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12705,6 +12741,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Aktuální soubor je modul CommonJS a na nejvyšší úrovni nemůže používat await.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12836,10 +12881,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Metavlastnost import.meta se povoluje jen v případě, že možnost --module je nastavená na es2020, es2022, esnext, system, node12 nebo nodenext.]]></Val>
|
||||
<Val><![CDATA[Metavlastnost import.meta se povoluje jen v případě, že možnost --module je nastavená na es2020, es2022, esnext, system, node16 nebo nodenext.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13149,6 +13197,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Kořen projektu je nejednoznačný, ale je vyžadován pro vyřešení položky {0} mapování exportu v souboru {1}. Pokud chcete zrušit dvojznačnost, zadejte možnost kompilátoru rootDir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Kořen projektu je nejednoznačný, ale je vyžadován pro vyřešení položky {0} mapování importu v souboru {1}. Pokud chcete zrušit dvojznačnost, zadejte možnost kompilátoru rootDir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13449,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>
|
||||
@@ -13737,15 +13812,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tento parametr typu pravděpodobně potřebuje omezení „extends object“.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13755,11 +13821,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Výrazy await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.]]></Val>
|
||||
<Val><![CDATA[Výrazy await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system, node16 nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13773,11 +13839,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Smyčky for await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.]]></Val>
|
||||
<Val><![CDATA[Smyčky for await nejvyšší úrovně se povolují jen v případě, že možnost module je nastavená na es2022, esnext, system, node16 nebo nodenext a možnost target je nastavená na es2017 nebo vyšší.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15959,10 +16025,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[auto: Považovat soubory s importy, exporty, import.meta, jsx (s jsx: react-jsx) nebo formátem ESM (s modulem node12+) za moduly.]]></Val>
|
||||
<Val><![CDATA[auto: Považovat soubory s importy, exporty, import.meta, jsx (s jsx: react-jsx) nebo formátem esm (s modulem node16+) za moduly.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16389,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>
|
||||
|
||||
@@ -3516,6 +3516,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[Der Klassenkonstruktor darf kein Generator sein.]]></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[Der Klassenkonstruktor darf kein Accessor sein.]]></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>
|
||||
@@ -5357,10 +5375,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dynamische Importe werden nur unterstützt, wenn das "--module"-Kennzeichen auf "es2020", "es2022", "esnext", "commonjs", "amd", "system", "umd", "node12" oder "nodenext" festgelegt ist.]]></Val>
|
||||
<Val><![CDATA[Dynamische Importe werden nur unterstützt, wenn das Flag „--module“ auf „es2020“, „es2022“, „esnext“, „commonjs“, „amd“, „system“, „umd“, „node16“ oder „ Knotenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5373,11 +5394,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dynamische Importe unterstützen nur ein zweites Argument, wenn die Option „--module“ auf „esnext“ oder „nodenext“ festgelegt ist.]]></Val>
|
||||
<Val><![CDATA[Dynamische Importe unterstützen nur ein zweites Argument, wenn die Option „--module“ auf „esnext“, „node16“ oder „nodenext“ gesetzt ist.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7962,15 +7983,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON-Importe sind experimentell in Importen im ES-Modulmodus.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8328,6 +8340,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>
|
||||
@@ -10751,19 +10772,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Relative Importpfade benötigen explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ auf „node12“ oder „nodenext“ festgelegt ist. Fügen Sie dem Importpfad gegebenenfalls eine Erweiterung hinzu.]]></Val>
|
||||
<Val><![CDATA[Relative Importpfade erfordern explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ „node16“ oder „nodenext“ ist. Erwägen Sie, dem Importpfad eine Erweiterung hinzuzufügen.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Relative Importpfade benötigen explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ auf „node12“ oder „nodenext“ festgelegt ist. Meinten Sie „{0}“?]]></Val>
|
||||
<Val><![CDATA[Relative Importpfade erfordern explizite Dateierweiterungen in EcmaScript-Importen, wenn „--moduleResolution“ „node16“ oder „nodenext“ ist. Hast du gemeint '{0}'?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11109,11 +11136,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Auflösungsmodi werden nur unterstützt, wenn „moduleResolution“ auf „node12“ oder „nodenext“ festgelegt ist.]]></Val>
|
||||
<Val><![CDATA[Assertionen im Auflösungsmodus sind instabil. Verwenden Sie „Nightly TypeScript“, um diesen Fehler zu beheben. Versuchen Sie die Aktualisierung mit „npm install -D typescript@next“ durchzuführen..]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Auflösungsmodi werden nur unterstützt, wenn „moduleResolution“ „node16“ oder „nodenext“ ist.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12690,6 +12726,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die aktuelle Datei ist ein CommonJS-Modul und kann „await“ nicht auf der obersten Ebene verwenden.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12821,10 +12866,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Die Metaeigenschaft "import.meta" ist nur zulässig, wenn die „--module“-Option "es2020", "es2022", "esnext", "system", "node12" oder "nodenext" lautet.]]></Val>
|
||||
<Val><![CDATA[Die Meta-Eigenschaft „import.meta“ ist nur zulässig, wenn die Option „--module“ „es2020“, „es2022“, „esnext“, „system“, „node16“ oder „nodenext“ ist.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13134,6 +13182,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Der Projektstamm ist mehrdeutig, wird aber benötigt, um den Exportzuordnungseintrag „{0}“ in der Datei „{1}“ aufzulösen. Geben Sie die Compiler-Option „rootDir“ an, um die Mehrdeutigkeit aufzuheben.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Der Projektstamm ist mehrdeutig, wird aber benötigt, um den Importzuordnungseintrag „{0}“ in der Datei „{1}“ aufzulösen. Geben Sie die Compiler-Option „rootDir“ an, um die Mehrdeutigkeit aufzuheben.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13434,6 +13500,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[Diese Bedingung gibt immer „{0}“ zurück, da JavaScript Objekte nach Verweis und nicht nach Wert vergleicht.]]></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>
|
||||
@@ -13722,15 +13797,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dieser Typparameter benötigt wahrscheinlich eine „extends object“-Einschränkung.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13740,11 +13806,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[„Await“-Ausdrücke der obersten Ebene sind nur zulässig, wenn die Option "module" auf "es2022", "esnext", "system" oder "nodenext" festgelegt ist und die Option "target" auf "es2017" oder höher festgelegt ist.]]></Val>
|
||||
<Val><![CDATA['await'-Ausdrücke der obersten Ebene sind nur zulässig, wenn die 'module'-Option auf 'es2022', 'esnext', 'system', 'node16' oder 'nodenext' und die 'target'-Option auf ' es2017' oder höher.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13758,11 +13824,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[„For Await“-Schleifen der obersten Ebene sind nur zulässig, wenn die „module“-Option auf "es2022", "esnext", "system" oder "nodenext" festgelegt ist und die Option "target" auf "es2017" oder höher festgelegt ist.]]></Val>
|
||||
<Val><![CDATA['for await'-Schleifen der obersten Ebene sind nur erlaubt, wenn die 'module'-Option auf 'es2022', 'esnext', 'system', 'node16' oder 'nodenext' gesetzt ist und die 'target'-Option auf gesetzt ist 'es2017' oder höher.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15944,10 +16010,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[„auto“: Behandelt Dateien mit Importen, Exporten, import.meta, jsx (mit jsx: react-jsx) oder esm-Format (mit Modul: node12+) als Module.]]></Val>
|
||||
<Val><![CDATA[„auto“: Dateien mit imports, exports, import.meta, jsx (mit jsx: respond-jsx) oder esm-Format (mit module: node16+) als Module behandeln.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16374,6 +16443,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>
|
||||
@@ -5372,10 +5390,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las importaciones dinámicas solo se admiten cuando la marca "--módulo" está establecida en "es2020", "es2022", "esnext", "commonjs", "amd", "system", "umd", "node12" o "nodenext".]]></Val>
|
||||
<Val><![CDATA[Las importaciones dinámicas solo se admiten cuando la marca "--módulo" está establecida en "es2020", "es2022", "esnext", "commonjs", "amd", "system", "umd", "node16" o "nodenext".]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5388,11 +5409,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las importaciones dinámicas solo admiten un segundo argumento cuando la opción "--module" está establecida en "esnext" o "nodenext".]]></Val>
|
||||
<Val><![CDATA[Las importaciones dinámicas solo admiten un segundo argumento cuando la opción "--module" está establecida en "esnext", "node16" o "nodenext".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7977,15 +7998,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las importaciones de JSON son experimentales en las importaciones del modo de módulo ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8343,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>
|
||||
@@ -10769,19 +10790,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node12" o "nodenext". Considere la posibilidad de agregar una extensión a la ruta de acceso de importación.]]></Val>
|
||||
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node16" o "nodenext". Considere la posibilidad de agregar una extensión a la ruta de acceso de importación.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node12" o "nodenext". ¿Quería decir "{0}"?]]></Val>
|
||||
<Val><![CDATA[Las rutas de acceso de importación relativas necesitan extensiones de archivo explícitas en las importaciones EcmaScript cuando "--moduleResolution" es "node16" o "nodenext". ¿Quería decir "{0}"?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11127,11 +11154,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Los modos de resolución solo se admiten cuando "moduleResolution" es "node12" o "nodenext".]]></Val>
|
||||
<Val><![CDATA[Las aserciones del modo de resolución son inestables. Use TypeScript nocturno para silenciar este error. Intente actualizar con "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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Los modos de resolución solo se admiten cuando "moduleResolution" es "node16" o "nodenext".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12708,6 +12744,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El archivo actual es un módulo CommonJS y no puede usar "await" en el nivel superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12839,10 +12884,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La metapropiedad "import.meta" solo se permite cuando la opción "--módulo" es "es2020", "es2022", "esnext", "system", "node12" o "nodenext".]]></Val>
|
||||
<Val><![CDATA[La metapropiedad "import.meta" solo se permite cuando la opción "--módulo" es "es2020", "es2022", "esnext", "system", "node16" o "nodenext".]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13152,6 +13200,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La raíz del proyecto es ambigua, pero es necesaria para resolver la entrada de asignación de exportación "{0}" en el archivo "{1}". Proporcione la opción del compilador "rootDir" para eliminar la ambigüedad.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La raíz del proyecto es ambigua, pero es necesaria para resolver la entrada de asignación de importación "{0}" en el archivo "{1}". Proporcione la opción del compilador "rootDir" para eliminar la ambigüedad.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13452,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>
|
||||
@@ -13740,15 +13815,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Puede que este parámetro de tipo necesite una restricción “extends object”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13758,11 +13824,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Las expresiones "await" de nivel superior solo se permiten cuando la opción "módulo" está establecida en "es2022", "esnext", "system" o "nodenext", y la opción "destino" está establecida en "es2017" o superior.]]></Val>
|
||||
<Val><![CDATA[Las expresiones "await" de nivel superior solo se permiten cuando la opción "módulo" está establecida en "es2022", "esnext", "system", "node16" o "nodenext", y la opción "destino" está establecida en "es2017" o superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13776,11 +13842,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Los bucles "for await" de nivel superior solo se permiten cuando la opción "módulo" está establecida en "es2022", "esnext", "system" o "nodenext", y la opción "destino" está establecida en "es2017" o superior.]]></Val>
|
||||
<Val><![CDATA[Los bucles "for await" de nivel superior solo se permiten cuando la opción "módulo" está establecida en "es2022", "esnext", "system", "node16" o "nodenext", y la opción "destino" está establecida en "es2017" o superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15962,10 +16028,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": trate los archivos con importaciones, exportaciones, import.meta, jsx (con jsx: react-jsx) o formato esm (con módulo: node12+) como módulos.]]></Val>
|
||||
<Val><![CDATA["auto": trate los archivos con importaciones, exportaciones, import.meta, jsx (con jsx: react-jsx) o formato esm (con el módulo: node16+) como módulos.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16392,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>
|
||||
@@ -5372,10 +5390,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les importations dynamiques sont prises en charge uniquement lorsque l’indicateur « --module » est défini sur « es2020 », « es2022 », « esnext », « commonjs », « amd », « system », « umd », « node12 » ou « nodenext ».]]></Val>
|
||||
<Val><![CDATA[Les importations dynamiques sont prises en charge uniquement lorsque l’indicateur '--module' a la valeur 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5388,11 +5409,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les importations dynamiques prennent uniquement en charge un deuxième argument lorsque l’option « --module » a la valeur « esnext » ou « nodenext ».]]></Val>
|
||||
<Val><![CDATA[Les importations dynamiques prennent uniquement en charge un deuxième argument lorsque l’option « --module » est définie sur « esnext », « node16 » ou « nodenext ».]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7977,15 +7998,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les importations JSON sont expérimentales dans les importations en mode module ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8343,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>
|
||||
@@ -10769,19 +10790,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les chemins d’importation relatifs nécessitent des extensions de fichier explicites dans les importations EcmaScript quand « --moduleResolution » est « node12 » ou « nodenext ». Envisagez d’ajouter une extension au chemin d’importation.]]></Val>
|
||||
<Val><![CDATA[Les chemins d’importation relatifs nécessitent des extensions de fichier explicites dans les importations EcmaScript quand '--moduleResolution' est 'node16' ou 'nodenext'. Envisagez d’ajouter une extension au chemin d’importation.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les chemins d’importation relatifs ont besoin d’extensions de fichier explicites dans les importations EcmaScript quand « --moduleResolution » est « node12 » ou « nodenext ». Voulez-vous dire « {0} » ?]]></Val>
|
||||
<Val><![CDATA[Les chemins d’importation relatifs ont besoin d’extensions de fichier explicites dans les importations EcmaScript quand '--moduleResolution' est 'node16' ou 'nodenext'. Voulez-vous dire «{0}» ?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11127,11 +11154,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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 modes de résolution sont uniquement pris en charge quand 'moduleResolution' a la valeur 'node12' ou 'nodenext'.]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les modes de résolution sont pris en charge uniquement lorsque 'moduleResolution' est 'node16' ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12708,6 +12744,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le fichier actuel est un module CommonJS et ne peut pas utiliser 'await' au niveau supérieur.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12839,10 +12884,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La méta-propriété « import.meta » est autorisée uniquement lorsque l’option « --module » est « es2020 », « es2022 », « esnext », « system », « node12 » ou « nodenext ».]]></Val>
|
||||
<Val><![CDATA[La méta-propriété 'import.meta' est autorisée uniquement lorsque l’option '--module' est 'es2020', 'es2022', 'esnext', 'system', 'node16' ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13152,6 +13200,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La racine du projet est ambiguë, mais elle est nécessaire pour résoudre l’entrée de carte d’exportation '{0}' dans le fichier '{1}'. Fournissez l’option de compilateur « rootDir » pour lever l’ambiguïté.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La racine du projet est ambiguë, mais elle est nécessaire pour résoudre l’entrée de carte d’importation «{0}» dans le fichier «{1}». Fournissez l’option de compilateur « rootDir » pour lever l’ambiguïté.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13452,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>
|
||||
@@ -13740,15 +13815,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ce paramètre de type nécessite probablement une contrainte 'extends object'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13758,11 +13824,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les expressions « await » de niveau supérieur sont autorisées uniquement lorsque l’option « module » a la valeur « es2022 », « esnext », « system » ou « nodenext », et que l’option « target » a la valeur « es2017 » ou une valeur supérieure.]]></Val>
|
||||
<Val><![CDATA[Les expressions 'await' de niveau supérieur sont autorisées uniquement lorsque l’option 'module' a la valeur 'es2022', 'esnext', 'system', 'node16' ou 'nodenext' et que l’option 'target' a la valeur 'es2017' ou une valeur supérieure.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13776,11 +13842,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Les boucles « for await » de niveau supérieur sont autorisées uniquement lorsque l’option « module » a la valeur « es2022 », « esnext », « system » ou « nodenext », et que l’option « target » est définie sur « es2017 » ou une version ultérieure.]]></Val>
|
||||
<Val><![CDATA[Les boucles « for await » de niveau supérieur sont autorisées uniquement lorsque l’option « module » a la valeur « es2022 », « esnext », « system », « node16 » ou « nodenext », et que l’option « target » a la valeur « es2017 » ou une version ultérieure.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15962,10 +16028,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[« auto » : traite les fichiers avec imports, exports, import.meta, jsx (avec jsx: react-jsx) ou esm format (avec le module : node12+) en tant que modules.]]></Val>
|
||||
<Val><![CDATA[« auto » : traitez les fichiers avec des importations, des exportations, import.meta, jsx (avec jsx: react-jsx) ou un format esm (avec module : node16+) en tant que modules.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16392,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>
|
||||
|
||||
@@ -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[Il costruttore di classe non può essere un generatore.]]></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[Il costruttore di classe non può essere una funzione di accesso.]]></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>
|
||||
@@ -5360,10 +5378,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le importazioni dinamiche sono supportate solo quando il flag '--module' è impostato su 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12' o 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Le importazioni dinamiche sono supportate solo quando il flag '--module' è impostato su 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16' o 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5376,11 +5397,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le importazioni dinamiche supportano un secondo argomento solo quando l'opzione “--modulo” è impostata su “esnext” o “nodenext”.]]></Val>
|
||||
<Val><![CDATA[Le importazioni dinamiche supportano un secondo argomento solo quando l'opzione '--module' è impostata su ''esnext', 'node16', o 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7965,15 +7986,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le importazioni JSON sono sperimentali nelle importazioni in modalità modulo ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8331,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[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>
|
||||
@@ -10757,19 +10778,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node12' o 'nodenext'. Provare ad aggiungere un'estensione al percorso di importazione.]]></Val>
|
||||
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node16' o 'nodenext'. Provare ad aggiungere un'estensione al percorso di importazione.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node12' o 'nodenext'. Si intendeva "{0}"?]]></Val>
|
||||
<Val><![CDATA[I percorsi di importazione relativi necessitano di estensioni di file esplicite nelle importazioni EcmaScript quando '--moduleResolution' è 'node16' o 'nodenext'. Si intendeva "{0}"?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11115,11 +11142,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Le modalità di risoluzione sono supportate solo quando 'moduleResolution' è 'node12' o 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Le asserzioni della modalità di risoluzione sono instabili. Usare TypeScript notturno per disattivare questo errore. Provare ad eseguire l'aggiornamento con '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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le modalità di risoluzione sono supportate solo quando 'moduleResolution' è 'node16' o 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12696,6 +12732,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Il file corrente è un modulo CommonJS e non può usare 'await' al livello principale.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12827,10 +12872,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La metaproprietà 'import.meta' è consentita solo se l'opzione '--module' è impostata su 'es2020', 'es2022', 'esnext', 'system', 'node12' o 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[La metaproprietà 'import.meta' è consentita solo se l'opzione '--module' è impostata su 'es2020', 'es2022', 'esnext', 'system', 'node16' o 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13140,6 +13188,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La radice del progetto è ambigua, ma è necessaria per risolvere i '{0}' delle voci della mappa di esportazione nel file '{1}'. Specificare l'opzione del compilatore 'rootDir' per disambiguare.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La radice del progetto è ambigua, ma è necessaria per risolvere i '{0}' delle voci della mappa di importazione nel file '{1}'. Specificare l'opzione del compilatore 'rootDir' per disambiguare.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13440,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[Questa condizione restituirà sempre '{0}' perché JavaScript confronta gli oggetti per riferimento, non per valore.]]></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>
|
||||
@@ -13728,15 +13803,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Questo parametro di tipo richiede probabilmente un vincolo 'extends object'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13746,11 +13812,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le espressioni 'await' di primo livello sono consentite solo quando l'opzione 'module' è impostata su 'es2022', 'esnext', 'system' o 'nodenext' e l'opzione 'target' è impostata su 'es2017' o versione successiva.]]></Val>
|
||||
<Val><![CDATA[Le espressioni 'await' di primo livello sono consentite solo quando l'opzione 'module' è impostata su 'es2022', 'esnext', 'system', 'node16', or 'nodenext', e l'opzione 'target' è impostata su 'es2017' o versione successiva.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13764,11 +13830,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[I cicli 'for await' di primo livello sono consentiti solo quando l'opzione 'module' è impostata su 'es2022', 'esnext', 'system' o 'nodenext' e l'opzione 'target' è impostata su 'es2017' o versione successiva.]]></Val>
|
||||
<Val><![CDATA[I cicli 'for await' di primo livello sono consentiti solo quando l'opzione 'module' è impostata su'es2022', 'esnext', 'system', 'node16', o 'nodenext' e l'opzione 'target' è impostata su 'es2017' o versione successiva.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15950,10 +16016,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": considera i file con importazioni, esportazioni, import.meta, jsx (con jsx: react-jsx) o il formato esm (con modulo: node12+) come moduli.]]></Val>
|
||||
<Val><![CDATA["auto": considera i file con importazioni, esportazioni, import.meta, jsx (con jsx: react-jsx) o il formato esm (con modulo: node16+) come moduli.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16380,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[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>
|
||||
@@ -5360,10 +5378,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[動的インポートは、'--module' フラグが 'es2022'、'es2020'、'esnext'、'commonjs'、'amd'、'system'、'umd'、'node12'、'nodenext' に設定されている場合にのみサポートされます。]]></Val>
|
||||
<Val><![CDATA[動的インポートは、'--module' フラグが 'es2020'、'es2022'、'esnext'、'commonjs'、'amd'、'system'、'umd'、'node16'、'nodenext' に設定されている場合にのみサポートされます。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5376,11 +5397,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['--module' オプションが 'esnext' または 'nodenext' に設定されている場合、動的インポートは 2 番目の引数のみをサポートします。]]></Val>
|
||||
<Val><![CDATA['--module' オプションが 'esnext'、'node16'、または 'nodenext' に設定されている場合、動的インポートは 2 番目の引数のみをサポートします。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7965,15 +7986,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON インポートは、ES モジュール モードのインポートでは試験的な機能です。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8331,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>
|
||||
@@ -10757,19 +10778,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node12' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。インポート パスに拡張機能を追加することを検討してください。]]></Val>
|
||||
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node16' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。インポート パスに拡張機能を追加することを検討してください。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node12' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。'{0}' ということですか?]]></Val>
|
||||
<Val><![CDATA[相対インポート パスでは、'--moduleResolution' が 'node16' または 'nodenext' の場合、EcmaScript インポートに明示的なファイル拡張子が必要です。'{0}' ということですか?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11115,11 +11142,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[解決モードは、"moduleResolution" が "node12" または "nodenext" の場合にのみサポートされます。]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[解決モードは、`moduleResolution` が `node16` または `nodenext` の場合にのみサポートされます。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12696,6 +12732,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[現在のファイルは CommonJS モジュールであり、最上位レベルでは 'await' を使用できません。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12827,10 +12872,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['import.meta' メタプロパティは、'--module' オプションが 'es2020'、'es2022'、'esnext'、'system'、'node12'、または 'nodenext' の場合にのみ許可されます。]]></Val>
|
||||
<Val><![CDATA['import.meta' メタプロパティは、'--module' オプションが 'es2020'、'es2022'、'esnext'、'system'、'node16'、または 'nodenext' の場合にのみ許可されます。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13140,6 +13188,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[プロジェクト ルートはあいまいですが、ファイル '{1}' のエクスポート マップ エントリ '{0}' を解決するために必要です。あいまいさを解消するには、'rootDir' コンパイラ オプションを指定します。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[プロジェクト ルートはあいまいですが、ファイル '{1}' のインポート マップ エントリ '{0}' を解決するために必要です。あいまいさを解消するには、'rootDir' コンパイラ オプションを指定します。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13440,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>
|
||||
@@ -13728,15 +13803,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[この型パラメーターには、`extends object` 制約が必要な可能性があります。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13746,11 +13812,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[トップレベルの 'await' 式は、'module' オプションが 'es2022'、'esnext'、'system'、または 'nodenext' に設定されていて、'target' オプションが 'es2017' 以上に設定されている場合にのみ使用できます。]]></Val>
|
||||
<Val><![CDATA[トップレベルの 'await' 式は、'module' オプションが 'es2022'、'esnext'、'system'、'node16' または 'nodenext' に設定されていて、'target' オプションが 'es2017' 以上に設定されている場合にのみ使用できます。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13764,11 +13830,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[トップレベルの 'for await' ループは、'module' オプションが 'es2022'、'esnext'、'system'、または 'nodenext' に設定されていて、'target' オプションが 'es2017' 以上に設定されている場合にのみ使用できます。]]></Val>
|
||||
<Val><![CDATA[トップレベルの 'for await' ループは、'module' オプションが 'es2022'、'esnext'、'system'、'node16'、または 'nodenext' に設定されていて、'target' オプションが 'es2017' 以上に設定されている場合にのみ使用できます。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15950,10 +16016,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": インポート、エクスポート、import.meta、jsx (jsx: react-jsx を使用)、または esm 形式 (モジュール: node12+) でファイルをモジュールとして扱います。]]></Val>
|
||||
<Val><![CDATA["auto": インポート、エクスポート、import.meta、jsx (jsx: react-jsx を使用)、または esm 形式 (モジュール: node16+) でファイルをモジュールとして扱います。]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16380,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>
|
||||
@@ -5360,10 +5378,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[동적 가져오기는 '--module' 플래그가 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12' 또는 'nodenext'로 설정된 경우에만 지원됩니다.]]></Val>
|
||||
<Val><![CDATA[동적 가져오기는 '--module' 플래그가 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16' 또는 'nodenext'로 설정된 경우에만 지원됩니다.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5376,11 +5397,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[동적 가져오기는 '--module' 옵션이 'esnext' 또는 'nodenext'로 설정된 경우에만 두 번째 인수를 지원합니다.]]></Val>
|
||||
<Val><![CDATA[동적 가져오기는 '--module' 옵션이 'esnext', 'node16' 또는 'nodenext'로 설정된 경우에만 두 번째 인수를 지원합니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7965,15 +7986,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON 가져오기는 ES 모듈 모드 가져오기에서 실험적입니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8331,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>
|
||||
@@ -10757,19 +10778,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node12' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. 가져오기 경로에 확장자를 추가하는 것을 고려하세요.]]></Val>
|
||||
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node16' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. 가져오기 경로에 확장자를 추가하는 것을 고려하세요.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node12' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. '{0}'을(를) 의미했나요?]]></Val>
|
||||
<Val><![CDATA[상대 가져오기 경로는 '--moduleResolution'이 'node16' 또는 'nodenext'인 경우 EcmaScript 가져오기의 명시적 파일 확장자가 필요합니다. '{0}'을(를) 의미했나요?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11115,11 +11142,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[해상도 모드는 `moduleResolution`이 `node12` 또는 `nodenext`인 경우에만 지원됩니다.]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[해상도 모드는 `moduleResolution`이 `node16` 또는 `nodenext`인 경우에만 지원됩니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12696,6 +12732,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[현재 파일은 CommonJS 모듈이며 최상위 수준에서 'await'를 사용할 수 없습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12827,10 +12872,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['import.meta' 메타 속성은 '--module' 옵션이 'es2020', 'es2022', 'esnext', 'system', 'node12' 또는 'nodenext'인 경우에만 허용됩니다.]]></Val>
|
||||
<Val><![CDATA['import.meta' 메타 속성은 '--module' 옵션이 'es2020', 'es2022', 'esnext', 'system', 'node16' 또는 'nodenext'인 경우에만 허용됩니다.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13140,6 +13188,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[프로젝트 루트가 모호하지만 '{1}' 파일에서 '{0}' 내보내기 맵 항목을 확인하는 데 필요합니다. 명확하게 하려면 `rootDir` 컴파일러 옵션을 제공하세요.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[프로젝트 루트가 모호하지만 '{1}' 파일에서 '{0}' 가져오기 맵 항목을 확인하는 데 필요합니다. 명확하게 하려면 `rootDir` 컴파일러 옵션을 제공하세요.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13440,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>
|
||||
@@ -13728,15 +13803,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[이 형식 매개 변수에는 `extends object` 제약 조건이 필요할 수 있습니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13746,11 +13812,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[최상위 'await' 식은 'module' 옵션이 'es2022', 'esnext', 'system' 또는 'nodenext'로 설정되고 'target' 옵션이 'es2017' 이상으로 설정된 경우에만 허용됩니다.]]></Val>
|
||||
<Val><![CDATA[최상위 'await' 식은 'module' 옵션이 'es2022', 'esnext', 'system', 'node16' 또는 'nodenext'로 설정되고 'target' 옵션이 'es2017' 이상으로 설정된 경우에만 허용됩니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13764,11 +13830,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[최상위 'for await' 루프는 'module' 옵션이 'es2022', 'esnext', 'system' 또는 'nodenext'로 설정되고 'target' 옵션이 'es2017' 이상으로 설정된 경우에만 허용됩니다.]]></Val>
|
||||
<Val><![CDATA[최상위 'for await' 루프는 'module' 옵션이 'es2022', 'esnext', 'system', 'node16' 또는 'nodenext'로 설정되고 'target' 옵션이 'es2017' 이상으로 설정된 경우에만 허용됩니다.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15950,10 +16016,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": 가져오기, 내보내기, import.meta, jsx(jsx: react-jsx 포함) 또는 esm 형식(모듈: node12+ 포함)이 있는 파일을 모듈로 처리합니다.]]></Val>
|
||||
<Val><![CDATA["auto": 가져오기, 내보내기, import.meta, jsx(jsx: react-jsx 포함) 또는 esm 형식(모듈: node16+ 포함)이 있는 파일을 모듈로 처리합니다.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16380,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>
|
||||
|
||||
@@ -3509,6 +3509,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 klas nie może być generatorem.]]></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 klas nie może być metodą dostępu.]]></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>
|
||||
@@ -5350,10 +5368,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dynamiczne importy są obsługiwane tylko wtedy, gdy flaga „--module” jest ustawiona na „es2020”, „es2022”, „esnext”, „commonjs”, „amd”, „system”, „umd”, „node12” lub „nodenext”.]]></Val>
|
||||
<Val><![CDATA[Dynamiczne importy są obsługiwane tylko wtedy, gdy flaga „--module” jest ustawiona na „es2020”, „es2022”, „esnext”, „commonjs”, „amd”, „system”, „umd”, „node16” lub „nodenext”.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5366,11 +5387,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importy dynamiczne obsługują tylko drugi argument, gdy opcja „--module” jest ustawiona na wartość „esnext” lub „nodenext”.]]></Val>
|
||||
<Val><![CDATA[Importy dynamiczne obsługują tylko drugi argument, gdy opcja „--module” jest ustawiona na wartość „esnext”, „node16” lub „nodenext”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7955,15 +7976,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importy JSON są eksperymentalne w importach w trybie modułu ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8321,6 +8333,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>
|
||||
@@ -10744,19 +10765,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node12” lub „nodenext”. Zastanów się nad dodaniem rozszerzenia do ścieżki importu.]]></Val>
|
||||
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node16” lub „nodenext”. Zastanów się nad dodaniem rozszerzenia do ścieżki importu.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node12” lub „nodenext”. Czy chodziło Ci o "{0}"?]]></Val>
|
||||
<Val><![CDATA[Względne ścieżki importu wymagają jawnych rozszerzeń plików w importach ecmaScript, gdy element „--moduleResolution” ma wartość „node16” lub „nodenext”. Czy chodziło Ci o „{0}”?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11102,11 +11129,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Tryby rozdzielczości są obsługiwane tylko wtedy, gdy element „moduleResolution” ma wartość „node12” lub „nodenext”.]]></Val>
|
||||
<Val><![CDATA[Asercje trybu rozdzielczości są niestabilne. Użyj nocnego języka TypeScript, aby wyciszyć ten błąd. Spróbuj zaktualizować za pomocą „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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Tryby rozdzielczości są obsługiwane tylko wtedy, gdy element „moduleResolution” ma wartość „node16” lub „nodenext”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12683,6 +12719,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bieżący plik jest modułem CommonJS i nie może używać elementu „await” na najwyższym poziomie.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12814,10 +12859,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Meta-właściwość „import.meta” jest dozwolona tylko wtedy, gdy opcja „--module” ma wartość „es2020”, „es2022”, „esnext”, „system”, „node12” lub „nodenext”.]]></Val>
|
||||
<Val><![CDATA[Meta-właściwość „import.meta” jest dozwolona tylko wtedy, gdy opcja „--module” ma wartość „es2020”, „es2022”, „esnext”, „system”, „node16” lub „nodenext”.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13127,6 +13175,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Katalog główny projektu jest niejednoznaczny, a jest wymagany do rozpoznania wpisu mapy eksportu „{0}” w pliku „{1}”. Podaj opcję kompilatora „rootDir”, aby usunąć niejednoznaczności.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Katalog główny projektu jest niejednoznaczny, a jest wymagany do rozpoznania wpisu mapy importu „{0}” w pliku „{1}”. Podaj opcję kompilatora „rootDir”, aby usunąć niejednoznaczności.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13427,6 +13493,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[Ten warunek zawsze będzie zwracać wartość „{0}”, ponieważ język JavaScript porównuje obiekty według odwołania, a nie wartości.]]></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>
|
||||
@@ -13715,15 +13790,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ten parametr typu prawdopodobnie wymaga ograniczenia „extends object”.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13733,11 +13799,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Wyrażenia „await” najwyższego poziomu są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.]]></Val>
|
||||
<Val><![CDATA[Wyrażenia „await” najwyższego poziomu są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system”, „node16” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13751,11 +13817,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Pętle najwyższego poziomu „for await” są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.]]></Val>
|
||||
<Val><![CDATA[Pętle najwyższego poziomu „for await” są dozwolone tylko wtedy, gdy opcja „module” jest ustawiona na wartość „es2022”, „esnext”, „system”, „node16” lub „nodenext”, a opcja „target” jest ustawiona na wartość „es2017” lub wyższą.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15937,10 +16003,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[„auto”: Traktuj pliki za pomocą importów, eksportów, import.meta, jsx (z jsx: react-jsx) lub formatu esm (z modułem: node12+) jako moduły.]]></Val>
|
||||
<Val><![CDATA[„auto”: Traktuj pliki za pomocą importów, eksportów, import.meta, jsx (z jsx: react-jsx) lub formatu esm (z modułem: node16+) jako moduły.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16367,6 +16436,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>
|
||||
@@ -5353,10 +5371,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Importações dinâmicas são suportadas apenas quando o sinalizador '--module' é definido como 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', ou 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Só há suporte para importações dinâmicas quando o sinalizador '--module' está definido como 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16' ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5369,11 +5390,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[As importações dinâmicas suportam apenas um segundo argumento quando a opção '--module' está definida como 'esnext' ou 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[As importações dinâmicas suportam apenas um segundo argumento quando a opção '--module' é definida como 'esnext', 'node16' ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7958,15 +7979,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[As importações JSON são experimentais em importações de modo de módulo ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8324,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>
|
||||
@@ -10747,19 +10768,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações ECMAScript quando '--moduleResolution' é 'node12' ou 'nodenext'. Considere adicionar uma extensão ao caminho de importação.]]></Val>
|
||||
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações do EcmaScript quando '--moduleResolution' for 'node16' ou 'nodenext'. Considere adicionar uma extensão ao caminho de importação.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações do EcmaScript quando '--moduleResolution' é 'node12' ou 'nodenext'. Você quis dizer '{0}'?]]></Val>
|
||||
<Val><![CDATA[Os caminhos de importação relativos precisam de extensões de arquivo explícitas nas importações do EcmaScript quando '--moduleResolution' for 'node16' ou 'nodenext'. Você quis dizer '{0}'?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11105,11 +11132,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Os modos de resolução só têm suporte quando 'moduleResolution' é 'node12' ou 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[As declarações do modo de resolução são instável. Use o TypeScript noturno para silenciar esse erro. Tente atualizar com 'npm install -D typescript@next'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Os modos de resolução são suportados apenas quando `moduleResolution` for `node16` ou `nodenext`.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12686,6 +12722,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[O arquivo atual é um módulo CommonJS e não pode usar 'await' no nível superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12817,10 +12862,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A metapropriedade 'import.meta' é permitida apenas quando a opção '--module' é 'es2020', 'es2022', 'esnext', 'system', 'node12', ou 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[A meta-propriedade 'import.meta' só é permitida quando a opção '--module' é 'es2020', 'es2022', 'esnext', 'system', 'node16' ou 'nodenext'.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13130,6 +13178,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A raiz do projeto é ambígua, mas é necessária para resolver a entrada de mapa de exportação '{0}' no arquivo '{1}'. Forneça a opção do compilador `rootDir` para desambiguar.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[A raiz do projeto é ambígua, mas é necessária para resolver a entrada do mapa de importação '{0}' no arquivo '{1}'. Forneça a opção do compilador `rootDir` para desambiguar.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13430,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>
|
||||
@@ -13718,15 +13793,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Esse parâmetro de tipo provavelmente precisa de uma restrição `extends object.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13736,11 +13802,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Expressões de nível superior 'await' são permitidas apenas quando a opção 'module' está definida como 'es2022', 'esnext', 'system' ou 'nodenext' e a opção 'target' está definida como 'es2017 ou superior.]]></Val>
|
||||
<Val><![CDATA[As expressões 'await' de nível superior só são permitidas quando a opção 'module' está definida como 'es2022', 'esnext', 'system', 'node16' ou 'nodenext' e a opção 'target' está definida como ' es2017' ou superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13754,11 +13820,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Loops de nível superior 'for await' são permitidos apenas quando a opção 'module' está definida como 'es2022', 'esnext', 'system' ou 'nodenext' e a opção 'target' está definida como 'es2017' ou superior.]]></Val>
|
||||
<Val><![CDATA[Loops 'for await' de nível superior só são permitidos quando a opção 'module' está definida como 'es2022', 'esnext', 'system', 'node16' ou 'nodenext', e a opção 'target' está definida como 'es2017' ou superior.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15940,10 +16006,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": Tratar arquivos com importações, exportações, import.meta, jsx (com jsx: react-jsx) ou formato esm (com módulo: node12+) como módulos.]]></Val>
|
||||
<Val><![CDATA["auto": trata os arquivos com import, export, import.meta, jsx (com jsx: react-jsx) ou formato esm (com module: node16+) como módulos.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16370,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>
|
||||
@@ -5359,10 +5377,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Динамический импорт поддерживаются только в том случае, если флагу "--module" присвоено значение "es2020", "es2022", "esnext", "commonjs", "amd", "system", "umd", "node12" или "nodenext".]]></Val>
|
||||
<Val><![CDATA[Динамический импорт поддерживается только в том случае, если для флажка --module установлено значение ''es2020'', ''es2022'', ''esnext'', ''commonjs'', ''amd'', ''system'', ''umd'', ''node16'' или ''nodenext''.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5375,11 +5396,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Динамический импорт поддерживает второй аргумент только в случае, когда для параметра "--module" задано значение "esnext" или "nodenext".]]></Val>
|
||||
<Val><![CDATA[Динамический импорт поддерживает только второй аргумент, если для параметра --module установлено значение ''esnext'', ''node16'' или ''nodenext''.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7964,15 +7985,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Импорт данных JSON — экспериментальная функция импорта в режиме модуля ES.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8330,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>
|
||||
@@ -10756,19 +10777,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[В относительных путях импорта необходимо явным образом указывать расширения файлов при импорте EcmaScript, когда для параметра "--moduleResolution" задано значение "node12" или "nodenext". Попробуйте добавить расширение в путь импорта.]]></Val>
|
||||
<Val><![CDATA[Относительные пути импорта требуют явных расширений файлов в импорте EcmaScript, когда ''--moduleResolution'' имеет значение ''node16'' или ''nodenext''. Рассмотрите возможность добавления расширения к пути импорта.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[В относительных путях импорта необходимо явным образом указывать расширения файлов при импорте EcmaScript, когда для параметра "--moduleResolution" задано значение "node12" или "nodenext". Вы имели в виду "{0}"?]]></Val>
|
||||
<Val><![CDATA[Относительные пути импорта требуют явных расширений файлов в импорте EcmaScript, когда ''--moduleResolution'' имеет значение ''node16'' или ''nodenext''. Вы имеете в виду '{0}''?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11114,11 +11141,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Режимы разрешения поддерживаются, только если параметр moduleResolution имеет значение "node12" или "nodenext".]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Режимы разрешения поддерживаются только тогда, когда ''moduleResolution'' равно ''node16'' или ''nodenext''.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12695,6 +12731,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Текущий файл является модулем CommonJS и не может использовать "await" на верхнем уровне.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12826,10 +12871,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Метасвойство "import.meta" допускается, только если параметру "--module" присвоено значение "es2020", "es2022", "esnext", "system", "node12" или "nodenext".]]></Val>
|
||||
<Val><![CDATA[Мета-свойство import.meta разрешено только в том случае, если параметр --module имеет значение ''es2020'', ''es2022'', ''esnext'', ''system'', ''node16'' или ''nodenext''.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13139,6 +13187,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Корень проекта неоднозначен, но требуется для разрешения записи карты экспорта ''{0}'' в файле ''{1}''. Укажите параметр компилятора ''rootDir'' для устранения неоднозначности.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Корень проекта неоднозначен, но требуется для разрешения записи карты импорта ''{0}'' в файле ''{1}''. Укажите параметр компилятора ''rootDir'' для устранения неоднозначности.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13439,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>
|
||||
@@ -13727,15 +13802,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Возможно, для этого параметра типа требуется ограничение "extends object".]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13745,11 +13811,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Выражения "await" верхнего уровня допускаются, только если параметру "module" присвоено значение "es2022", "esnext", "system" или "nodenext", а параметру "target" присвоено значение "es2017" или выше.]]></Val>
|
||||
<Val><![CDATA[Выражения ожидания верхнего уровня разрешены только в том случае, если для параметра "module" установлено значение "es2022", "esnext", "system", "node16" или "nodenext", а для параметра "цель" установлено значение "es2017" или выше.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13763,11 +13829,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Циклы "for await" верхнего уровня допускаются, только если параметру "module" присвоено значение "es2022", "esnext", "system" или "nodenext", а параметру "target" присвоено значение "es2017" или выше.]]></Val>
|
||||
<Val><![CDATA[Выражения ожидания верхнего уровня разрешены, только если для параметра "module" установлено значение "es2022", "esnext", "system", "node16" или "nodenext", а для параметра "target" установлено значение "es2017" или выше.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15949,10 +16015,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": обрабатывать файлы с импортом, экспортом, import.meta, jsx (с jsx: react-jsx) или форматом esm (с модулем: node12+) в качестве модулей.]]></Val>
|
||||
<Val><![CDATA["auto": обрабатывать файлы с импортом, экспортом, import.meta, jsx (с jsx: react-jsx) или форматом esm (с модулем: node16+) как файлы с модулями.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16379,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>
|
||||
|
||||
@@ -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[Sınıf oluşturucu, program yönergeleri üreten bir oluşturucu olamaz.]]></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[Sınıf oluşturucu, bir erişimci olamaz.]]></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>
|
||||
@@ -5353,10 +5371,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dinamik içeri aktarmalar yalnızca '--module' bayrağı 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12' veya 'nodenext' olarak ayarlandığında desteklenir.]]></Val>
|
||||
<Val><![CDATA[Dinamik içe aktarma yalnızca '--module' bayrağı 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16' veya 'nodenext' olarak ayarlandığında desteklenir.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5369,11 +5390,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Dinamik içeri aktarmalar, yalnızca '--module' seçeneği 'esnext' veya 'nodenext' olarak ayarlandığında ikinci bir bağımsız değişkeni destekler.]]></Val>
|
||||
<Val><![CDATA[Dinamik içe aktarma, yalnızca '--module' seçeneği 'esnext', 'node16' veya 'nodenext' olarak ayarlandığında ikinci bir argümanı destekler.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -7958,15 +7979,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSON_imports_are_experimental_in_ES_module_mode_imports_7062" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSON imports are experimental in ES module mode imports.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[JSON içeri aktarmaları, ES modül modu içeri aktarmaları için deneyseldir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[JSX attributes must only be assigned a non-empty 'expression'.]]></Val>
|
||||
@@ -8324,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[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>
|
||||
@@ -10750,19 +10771,25 @@
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['--moduleResolution' değeri 'node12' veya 'nodenext' olduğunda göreli içeri aktarma yolları EcmaScript içeri aktarmalarında açık dosya uzantılarını gerektirir. İçeri aktarma yoluna bir uzantı eklemeyi düşünün.]]></Val>
|
||||
<Val><![CDATA[Göreli içe aktarma yolları, '--moduleResolution' 'node16' veya 'nodenext' olduğunda EcmaScript içe aktarmalarında açık dosya uzantılarına ihtiyaç duyar. İçe aktarma yoluna bir uzantı eklemeyi düşünün.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['--moduleResolution' değeri 'node12' veya 'nodenext' olduğunda göreli içeri aktarma yolları EcmaScript içeri aktarmalarında açık dosya uzantılarını gerektirir. Şunu mu demek istediniz: '{0}'?]]></Val>
|
||||
<Val><![CDATA[Göreli içe aktarma yolları, '--moduleResolution' 'node16' veya 'nodenext' olduğunda EcmaScript içe aktarmalarında açık dosya uzantılarına ihtiyaç duyar. Şunu mu demek istediniz: '{0}'?]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -11108,11 +11135,20 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452" ItemType="0" PsrId="306" Leaf="true">
|
||||
<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 modes are only supported when `moduleResolution` is `node12` or `nodenext`.]]></Val>
|
||||
<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[Çözümleme modları yalnızca `moduleResolution` değeri `node12` veya `nodenext` olduğunda desteklenir.]]></Val>
|
||||
<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>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Çözünürlük modları yalnızca `moduleResolution` değeri `node16` veya `nodenext` olduğunda desteklenir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -12689,6 +12725,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current file is a CommonJS module and cannot use 'await' at the top level.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Geçerli dosya bir CommonJS modülüdür ve en üst düzeyde 'await'i kullanamaz.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_current_host_does_not_support_the_0_option_5001" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The current host does not support the '{0}' option.]]></Val>
|
||||
@@ -12820,10 +12865,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA['import.meta' meta özelliğine yalnızca '--module' seçeneği 'es2020', 'es2022', 'esnext', 'system', 'node12' veya 'nodenext' olduğunda izin verilir.]]></Val>
|
||||
<Val><![CDATA['import.meta' meta özelliğine yalnızca '--module' seçeneği 'es2020', 'es2022', 'esnext', 'system', 'node16' veya 'nodenext' olduğunda izin verilir.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA[The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -13133,6 +13181,24 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Proje kökü belirsizdir, ancak '{1}' dosyasındaki '{0}' dışa aktarma haritası girişini çözmek için gereklidir. Belirsizliği gidermek için `rootDir` derleyici seçeneğini sağlayın.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Proje kökü belirsizdir, ancak '{1}' dosyasındaki '{0}' içe aktarma haritası girişini çözmek için gereklidir. Belirsizliği gidermek için `rootDir` derleme seçeneğini sağlayın.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.]]></Val>
|
||||
@@ -13433,6 +13499,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 nesneleri değer göre değil başvuruya göre karşılaştırdığından bu koşul her zaman '{0}' değerini döndürür.]]></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>
|
||||
@@ -13721,15 +13796,6 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_type_parameter_probably_needs_an_extends_object_constraint_2208" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This type parameter probably needs an `extends object` constraint.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Bu tür parametresi için bir `nesneyi genişletir` kısıtlaması gerekiyor olabilir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.]]></Val>
|
||||
@@ -13739,11 +13805,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Üst düzey 'await' ifadelerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.]]></Val>
|
||||
<Val><![CDATA[Üst düzey 'await' ifadelerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system', 'node16' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -13757,11 +13823,11 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Item ItemId=";Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Val><![CDATA[Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Üst düzey 'for await' döngülerine yalnızca 'module' seçeneği 'es2022', 'esnext', 'system' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üzeri olarak ayarlandığında izin verilir.]]></Val>
|
||||
<Val><![CDATA[Üst düzey 'bekleme için' döngülerine yalnızca 'modül' seçeneği 'es2022', 'esnext', 'system', 'node16' veya 'nodenext' olarak ayarlandığında ve 'target' seçeneği 'es2017' veya üstü olarak ayarlandığında izin verilir.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
@@ -15943,10 +16009,13 @@
|
||||
</Item>
|
||||
<Item ItemId=";auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["auto": import, export, import.meta, jsx (jsx: react-jsx) veya esm biçimi (module: node12+) olan dosyaları modül olarak işle.]]></Val>
|
||||
<Val><![CDATA["auto": İçe aktarma, dışa aktarma, import.meta, jsx (jsx: react-jsx ile) veya esm biçimi (modül: node16+ ile) içeren dosyaları modül olarak ele alın.]]></Val>
|
||||
</Tgt>
|
||||
<Prev Cat="Text">
|
||||
<Val><![CDATA["auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.]]></Val>
|
||||
</Prev>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -16373,6 +16442,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>
|
||||
|
||||
+262
-169
@@ -303,7 +303,7 @@ namespace ts.server {
|
||||
return createSet(({textSpan}) => textSpan.start + 100003 * textSpan.length, documentSpansEqual);
|
||||
}
|
||||
|
||||
function combineProjectOutputForRenameLocations(
|
||||
function getRenameLocationsWorker(
|
||||
projects: Projects,
|
||||
defaultProject: Project,
|
||||
initialLocation: DocumentPosition,
|
||||
@@ -311,89 +311,164 @@ namespace ts.server {
|
||||
findInComments: boolean,
|
||||
{ providePrefixAndSuffixTextForRename }: UserPreferences
|
||||
): readonly RenameLocation[] {
|
||||
const outputs: RenameLocation[] = [];
|
||||
const seen = createDocumentSpanSet();
|
||||
combineProjectOutputWorker(
|
||||
const perProjectResults = getPerProjectReferences(
|
||||
projects,
|
||||
defaultProject,
|
||||
initialLocation,
|
||||
/*isForRename*/ true,
|
||||
(project, location, tryAddToTodo) => {
|
||||
const projectOutputs = project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, providePrefixAndSuffixTextForRename);
|
||||
if (projectOutputs) {
|
||||
for (const output of projectOutputs) {
|
||||
if (!seen.has(output) && !tryAddToTodo(project, documentSpanLocation(output))) {
|
||||
seen.add(output);
|
||||
outputs.push(output);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
(project, position) => project.getLanguageService().findRenameLocations(position.fileName, position.pos, findInStrings, findInComments, providePrefixAndSuffixTextForRename),
|
||||
(renameLocation, cb) => cb(documentSpanLocation(renameLocation)),
|
||||
);
|
||||
return outputs;
|
||||
|
||||
// No filtering or dedup'ing is required if there's exactly one project
|
||||
if (isArray(perProjectResults)) {
|
||||
return perProjectResults;
|
||||
}
|
||||
|
||||
const results: RenameLocation[] = [];
|
||||
const seen = createDocumentSpanSet();
|
||||
|
||||
perProjectResults.forEach((projectResults, project) => {
|
||||
for (const result of projectResults) {
|
||||
// If there's a mapped location, it'll appear in the results for another project
|
||||
if (!seen.has(result) && !getMappedLocationForProject(documentSpanLocation(result), project)) {
|
||||
results.push(result);
|
||||
seen.add(result);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function getDefinitionLocation(defaultProject: Project, initialLocation: DocumentPosition, isForRename: boolean): DocumentPosition | undefined {
|
||||
const infos = defaultProject.getLanguageService().getDefinitionAtPosition(initialLocation.fileName, initialLocation.pos, /*searchOtherFilesOnly*/ false, isForRename);
|
||||
const infos = defaultProject.getLanguageService().getDefinitionAtPosition(initialLocation.fileName, initialLocation.pos, /*searchOtherFilesOnly*/ false, /*stopAtAlias*/ isForRename);
|
||||
const info = infos && firstOrUndefined(infos);
|
||||
return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : undefined;
|
||||
}
|
||||
|
||||
function combineProjectOutputForReferences(
|
||||
function getReferencesWorker(
|
||||
projects: Projects,
|
||||
defaultProject: Project,
|
||||
initialLocation: DocumentPosition,
|
||||
logger: Logger,
|
||||
): readonly ReferencedSymbol[] {
|
||||
const outputs: ReferencedSymbol[] = [];
|
||||
|
||||
combineProjectOutputWorker(
|
||||
const perProjectResults = getPerProjectReferences(
|
||||
projects,
|
||||
defaultProject,
|
||||
initialLocation,
|
||||
/*isForRename*/ false,
|
||||
(project, location, getMappedLocation) => {
|
||||
logger.info(`Finding references to ${location.fileName} position ${location.pos} in project ${project.getProjectName()}`);
|
||||
const projectOutputs = project.getLanguageService().findReferences(location.fileName, location.pos);
|
||||
if (projectOutputs) {
|
||||
const clearIsDefinition = projectOutputs[0].references[0].isDefinition === undefined;
|
||||
for (const referencedSymbol of projectOutputs) {
|
||||
const mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(referencedSymbol.definition));
|
||||
const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ?
|
||||
referencedSymbol.definition :
|
||||
{
|
||||
...referencedSymbol.definition,
|
||||
textSpan: createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length),
|
||||
fileName: mappedDefinitionFile.fileName,
|
||||
contextSpan: getMappedContextSpan(referencedSymbol.definition, project)
|
||||
};
|
||||
|
||||
let symbolToAddTo = find(outputs, o => documentSpansEqual(o.definition, definition));
|
||||
if (!symbolToAddTo) {
|
||||
symbolToAddTo = { definition, references: [] };
|
||||
outputs.push(symbolToAddTo);
|
||||
}
|
||||
|
||||
for (const ref of referencedSymbol.references) {
|
||||
// If it's in a mapped file, that is added to the todo list by `getMappedLocation`.
|
||||
if (!contains(symbolToAddTo.references, ref, documentSpansEqual) && !getMappedLocation(project, documentSpanLocation(ref))) {
|
||||
if (clearIsDefinition) {
|
||||
delete ref.isDefinition;
|
||||
}
|
||||
symbolToAddTo.references.push(ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
(project, position) => {
|
||||
logger.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`);
|
||||
return project.getLanguageService().findReferences(position.fileName, position.pos);
|
||||
},
|
||||
(referencedSymbol, cb) => {
|
||||
cb(documentSpanLocation(referencedSymbol.definition));
|
||||
for (const ref of referencedSymbol.references) {
|
||||
cb(documentSpanLocation(ref));
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
return outputs.filter(o => o.references.length !== 0);
|
||||
// No re-mapping or isDefinition updatses are required if there's exactly one project
|
||||
if (isArray(perProjectResults)) {
|
||||
return perProjectResults;
|
||||
}
|
||||
|
||||
// `isDefinition` is only (definitely) correct in `defaultProject` because we might
|
||||
// have started the other project searches from related symbols. Propagate the
|
||||
// correct results to all other projects.
|
||||
|
||||
const defaultProjectResults = perProjectResults.get(defaultProject)!;
|
||||
if (defaultProjectResults[0].references[0].isDefinition === undefined) {
|
||||
// Clear all isDefinition properties
|
||||
perProjectResults.forEach(projectResults => {
|
||||
for (const referencedSymbol of projectResults) {
|
||||
for (const ref of referencedSymbol.references) {
|
||||
delete ref.isDefinition;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Correct isDefinition properties from projects other than defaultProject
|
||||
const knownSymbolSpans = createDocumentSpanSet();
|
||||
for (const referencedSymbol of defaultProjectResults) {
|
||||
for (const ref of referencedSymbol.references) {
|
||||
if (ref.isDefinition) {
|
||||
knownSymbolSpans.add(ref);
|
||||
// One is enough - updateIsDefinitionOfReferencedSymbols will fill out the set based on symbols
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const updatedProjects = new Set<Project>();
|
||||
while (true) {
|
||||
let progress = false;
|
||||
perProjectResults.forEach((referencedSymbols, project) => {
|
||||
if (updatedProjects.has(project)) return;
|
||||
const updated = project.getLanguageService().updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans);
|
||||
if (updated) {
|
||||
updatedProjects.add(project);
|
||||
progress = true;
|
||||
}
|
||||
});
|
||||
if (!progress) break;
|
||||
}
|
||||
|
||||
perProjectResults.forEach((referencedSymbols, project) => {
|
||||
if (updatedProjects.has(project)) return;
|
||||
for (const referencedSymbol of referencedSymbols) {
|
||||
for (const ref of referencedSymbol.references) {
|
||||
ref.isDefinition = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// We need to de-duplicate and aggregate the results by choosing an authoritative version
|
||||
// of each definition and merging references from all the projects where they appear.
|
||||
|
||||
const results: ReferencedSymbol[] = [];
|
||||
const seenRefs = createDocumentSpanSet(); // It doesn't make sense to have a reference in two definition lists, so we de-dup globally
|
||||
|
||||
// TODO: We might end up with a more logical allocation of refs to defs if we pre-sorted the defs by descending ref-count.
|
||||
// Otherwise, it just ends up attached to the first corresponding def we happen to process. The others may or may not be
|
||||
// dropped later when we check for defs with ref-count 0.
|
||||
perProjectResults.forEach((projectResults, project) => {
|
||||
for (const referencedSymbol of projectResults) {
|
||||
const mappedDefinitionFile = getMappedLocationForProject(documentSpanLocation(referencedSymbol.definition), project);
|
||||
const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ?
|
||||
referencedSymbol.definition :
|
||||
{
|
||||
...referencedSymbol.definition,
|
||||
textSpan: createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), // Why would the length be the same in the original?
|
||||
fileName: mappedDefinitionFile.fileName,
|
||||
contextSpan: getMappedContextSpanForProject(referencedSymbol.definition, project)
|
||||
};
|
||||
|
||||
let symbolToAddTo = find(results, o => documentSpansEqual(o.definition, definition));
|
||||
if (!symbolToAddTo) {
|
||||
symbolToAddTo = { definition, references: [] };
|
||||
results.push(symbolToAddTo);
|
||||
}
|
||||
|
||||
for (const ref of referencedSymbol.references) {
|
||||
if (!seenRefs.has(ref) && !getMappedLocationForProject(documentSpanLocation(ref), project)) {
|
||||
seenRefs.add(ref);
|
||||
symbolToAddTo.references.push(ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return results.filter(o => o.references.length !== 0);
|
||||
}
|
||||
|
||||
interface ProjectAndLocation<TLocation extends DocumentPosition | undefined> {
|
||||
interface ProjectAndLocation {
|
||||
readonly project: Project;
|
||||
readonly location: TLocation;
|
||||
readonly location: DocumentPosition;
|
||||
}
|
||||
|
||||
function forEachProjectInProjects(projects: Projects, path: string | undefined, cb: (project: Project, path: string | undefined) => void): void {
|
||||
@@ -409,53 +484,136 @@ namespace ts.server {
|
||||
}
|
||||
}
|
||||
|
||||
type CombineProjectOutputCallback<TLocation extends DocumentPosition | undefined> = (
|
||||
project: Project,
|
||||
location: TLocation,
|
||||
getMappedLocation: (project: Project, location: DocumentPosition) => DocumentPosition | undefined,
|
||||
) => void;
|
||||
|
||||
function combineProjectOutputWorker<TLocation extends DocumentPosition | undefined>(
|
||||
/**
|
||||
* @param projects Projects initially known to contain {@link initialLocation}
|
||||
* @param defaultProject The default project containing {@link initialLocation}
|
||||
* @param initialLocation Where the search operation was triggered
|
||||
* @param getResultsForPosition This is where you plug in `findReferences`, `renameLocation`, etc
|
||||
* @param forPositionInResult Given an item returned by {@link getResultsForPosition} enumerate the positions referred to by that result
|
||||
* @returns In the common case where there's only one project, returns an array of results from {@link getResultsForPosition}.
|
||||
* If multiple projects were searched - even if they didn't return results - the result will be a map from project to per-project results.
|
||||
*/
|
||||
function getPerProjectReferences<TResult>(
|
||||
projects: Projects,
|
||||
defaultProject: Project,
|
||||
initialLocation: TLocation,
|
||||
initialLocation: DocumentPosition,
|
||||
isForRename: boolean,
|
||||
cb: CombineProjectOutputCallback<TLocation>,
|
||||
): void {
|
||||
const projectService = defaultProject.projectService;
|
||||
let toDo: ProjectAndLocation<TLocation>[] | undefined;
|
||||
const seenProjects = new Set<string>();
|
||||
forEachProjectInProjects(projects, initialLocation && initialLocation.fileName, (project, path) => {
|
||||
// TLocation should be either `DocumentPosition` or `undefined`. Since `initialLocation` is `TLocation` this cast should be valid.
|
||||
const location = (initialLocation ? { fileName: path, pos: initialLocation.pos } : undefined) as TLocation;
|
||||
toDo = callbackProjectAndLocation(project, location, projectService, toDo, seenProjects, cb);
|
||||
getResultsForPosition: (project: Project, location: DocumentPosition) => readonly TResult[] | undefined,
|
||||
forPositionInResult: (result: TResult, cb: (location: DocumentPosition) => void) => void,
|
||||
): readonly TResult[] | ESMap<Project, readonly TResult[]> {
|
||||
// If `getResultsForPosition` returns results for a project, they go in here
|
||||
const resultsMap = new Map<Project, readonly TResult[]>();
|
||||
|
||||
const queue: ProjectAndLocation[] = [];
|
||||
|
||||
// In order to get accurate isDefinition values for `defaultProject`,
|
||||
// we need to ensure that it is searched from `initialLocation`.
|
||||
// The easiest way to do this is to search it first.
|
||||
queue.push({ project: defaultProject, location: initialLocation });
|
||||
|
||||
// This will queue `defaultProject` a second time, but it will be dropped
|
||||
// as a dup when it is dequeued.
|
||||
forEachProjectInProjects(projects, initialLocation.fileName, (project, path) => {
|
||||
const location = { fileName: path!, pos: initialLocation.pos };
|
||||
queue.push({ project, location });
|
||||
});
|
||||
|
||||
// After initial references are collected, go over every other project and see if it has a reference for the symbol definition.
|
||||
if (initialLocation) {
|
||||
const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename);
|
||||
const projectService = defaultProject.projectService;
|
||||
const cancellationToken = defaultProject.getCancellationToken();
|
||||
|
||||
const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename);
|
||||
|
||||
// Don't call these unless !!defaultDefinition
|
||||
const getGeneratedDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition!.fileName) ?
|
||||
defaultDefinition :
|
||||
defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition!));
|
||||
const getSourceDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition!.fileName) ?
|
||||
defaultDefinition :
|
||||
defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition!));
|
||||
|
||||
// Track which projects we have already searched so that we don't repeat searches.
|
||||
// We store the project key, rather than the project, because that's what `loadAncestorProjectTree` wants.
|
||||
// (For that same reason, we don't use `resultsMap` for this check.)
|
||||
const searchedProjects = new Set<string>();
|
||||
|
||||
onCancellation:
|
||||
while (queue.length) {
|
||||
while (queue.length) {
|
||||
if (cancellationToken.isCancellationRequested()) break onCancellation;
|
||||
|
||||
const { project, location } = queue.shift()!;
|
||||
|
||||
if (isLocationProjectReferenceRedirect(project, location)) continue;
|
||||
|
||||
if (!tryAddToSet(searchedProjects, getProjectKey(project))) continue;
|
||||
|
||||
const projectResults = searchPosition(project, location);
|
||||
if (projectResults) {
|
||||
resultsMap.set(project, projectResults);
|
||||
}
|
||||
}
|
||||
|
||||
// At this point, we know about all projects passed in as arguments and any projects in which
|
||||
// `getResultsForPosition` has returned results. We expand that set to include any projects
|
||||
// downstream from any of these and then queue new initial-position searches for any new project
|
||||
// containing `initialLocation`.
|
||||
if (defaultDefinition) {
|
||||
const getGeneratedDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ?
|
||||
defaultDefinition :
|
||||
defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition));
|
||||
const getSourceDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ?
|
||||
defaultDefinition :
|
||||
defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition));
|
||||
projectService.loadAncestorProjectTree(seenProjects);
|
||||
// This seems to mean "load all projects downstream from any member of `seenProjects`".
|
||||
projectService.loadAncestorProjectTree(searchedProjects);
|
||||
projectService.forEachEnabledProject(project => {
|
||||
if (!addToSeen(seenProjects, project)) return;
|
||||
const definition = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);
|
||||
if (definition) {
|
||||
toDo = callbackProjectAndLocation<TLocation>(project, definition as TLocation, projectService, toDo, seenProjects, cb);
|
||||
if (cancellationToken.isCancellationRequested()) return; // There's no mechanism for skipping the remaining projects
|
||||
if (searchedProjects.has(getProjectKey(project))) return; // Can loop forever without this (enqueue here, dequeue above, repeat)
|
||||
const location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);
|
||||
if (location) {
|
||||
queue.push({ project, location });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
while (toDo && toDo.length) {
|
||||
const next = toDo.pop();
|
||||
Debug.assertIsDefined(next);
|
||||
toDo = callbackProjectAndLocation(next.project, next.location, projectService, toDo, seenProjects, cb);
|
||||
// In the common case where there's only one project, return a simpler result to make
|
||||
// it easier for the caller to skip post-processing.
|
||||
if (searchedProjects.size === 1) {
|
||||
const it = resultsMap.values().next();
|
||||
Debug.assert(!it.done);
|
||||
return it.value;
|
||||
}
|
||||
|
||||
return resultsMap;
|
||||
|
||||
// May enqueue to otherPositionQueue
|
||||
function searchPosition(project: Project, location: DocumentPosition): readonly TResult[] | undefined {
|
||||
const projectResults = getResultsForPosition(project, location);
|
||||
if (!projectResults) return undefined;
|
||||
|
||||
for (const result of projectResults) {
|
||||
forPositionInResult(result, position => {
|
||||
// This may trigger a search for a tsconfig, but there are several layers of caching that make it inexpensive
|
||||
const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, position);
|
||||
if (!originalLocation) return;
|
||||
|
||||
const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName)!;
|
||||
|
||||
for (const project of originalScriptInfo.containingProjects) {
|
||||
if (!project.isOrphan()) {
|
||||
queue.push({ project, location: originalLocation });
|
||||
}
|
||||
}
|
||||
|
||||
const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);
|
||||
if (symlinkedProjectsMap) {
|
||||
symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => {
|
||||
for (const symlinkedProject of symlinkedProjects) {
|
||||
if (!symlinkedProject.isOrphan()) {
|
||||
queue.push({ project: symlinkedProject, location: { fileName: symlinkedPath as string, pos: originalLocation.pos } });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return projectResults;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,49 +650,6 @@ namespace ts.server {
|
||||
sourceFile.resolvedPath !== project.toPath(location.fileName);
|
||||
}
|
||||
|
||||
function callbackProjectAndLocation<TLocation extends DocumentPosition | undefined>(
|
||||
project: Project,
|
||||
location: TLocation,
|
||||
projectService: ProjectService,
|
||||
toDo: ProjectAndLocation<TLocation>[] | undefined,
|
||||
seenProjects: Set<string>,
|
||||
cb: CombineProjectOutputCallback<TLocation>,
|
||||
): ProjectAndLocation<TLocation>[] | undefined {
|
||||
if (project.getCancellationToken().isCancellationRequested()) return undefined; // Skip rest of toDo if cancelled
|
||||
// If this is not the file we were actually looking, return rest of the toDo
|
||||
if (isLocationProjectReferenceRedirect(project, location)) return toDo;
|
||||
cb(project, location, (innerProject, location) => {
|
||||
addToSeen(seenProjects, project);
|
||||
const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(innerProject, location);
|
||||
if (!originalLocation) return undefined;
|
||||
|
||||
const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName)!;
|
||||
toDo = toDo || [];
|
||||
|
||||
for (const project of originalScriptInfo.containingProjects) {
|
||||
addToTodo(project, originalLocation as TLocation, toDo, seenProjects);
|
||||
}
|
||||
const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);
|
||||
if (symlinkedProjectsMap) {
|
||||
symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => {
|
||||
for (const symlinkedProject of symlinkedProjects) {
|
||||
addToTodo(symlinkedProject, { fileName: symlinkedPath as string, pos: originalLocation.pos } as TLocation, toDo!, seenProjects);
|
||||
}
|
||||
});
|
||||
}
|
||||
return originalLocation === location ? undefined : originalLocation;
|
||||
});
|
||||
return toDo;
|
||||
}
|
||||
|
||||
function addToTodo<TLocation extends DocumentPosition | undefined>(project: Project, location: TLocation, toDo: Push<ProjectAndLocation<TLocation>>, seenProjects: Set<string>): void {
|
||||
if (!project.isOrphan() && addToSeen(seenProjects, project)) toDo.push({ project, location });
|
||||
}
|
||||
|
||||
function addToSeen(seenProjects: Set<string>, project: Project) {
|
||||
return tryAddToSet(seenProjects, getProjectKey(project));
|
||||
}
|
||||
|
||||
function getProjectKey(project: Project) {
|
||||
return isConfiguredProject(project) ? project.canonicalConfigFilePath : project.getProjectName();
|
||||
}
|
||||
@@ -543,39 +658,16 @@ namespace ts.server {
|
||||
return { fileName, pos: textSpan.start };
|
||||
}
|
||||
|
||||
function getMappedLocation(location: DocumentPosition, project: Project): DocumentPosition | undefined {
|
||||
const mapsTo = project.getSourceMapper().tryGetSourcePosition(location);
|
||||
return mapsTo && project.projectService.fileExists(toNormalizedPath(mapsTo.fileName)) ? mapsTo : undefined;
|
||||
function getMappedLocationForProject(location: DocumentPosition, project: Project): DocumentPosition | undefined {
|
||||
return getMappedLocation(location, project.getSourceMapper(), p => project.projectService.fileExists(p as NormalizedPath));
|
||||
}
|
||||
|
||||
function getMappedDocumentSpan(documentSpan: DocumentSpan, project: Project): DocumentSpan | undefined {
|
||||
const newPosition = getMappedLocation(documentSpanLocation(documentSpan), project);
|
||||
if (!newPosition) return undefined;
|
||||
return {
|
||||
fileName: newPosition.fileName,
|
||||
textSpan: {
|
||||
start: newPosition.pos,
|
||||
length: documentSpan.textSpan.length
|
||||
},
|
||||
originalFileName: documentSpan.fileName,
|
||||
originalTextSpan: documentSpan.textSpan,
|
||||
contextSpan: getMappedContextSpan(documentSpan, project),
|
||||
originalContextSpan: documentSpan.contextSpan
|
||||
};
|
||||
function getMappedDocumentSpanForProject(documentSpan: DocumentSpan, project: Project): DocumentSpan | undefined {
|
||||
return getMappedDocumentSpan(documentSpan, project.getSourceMapper(), p => project.projectService.fileExists(p as NormalizedPath));
|
||||
}
|
||||
|
||||
function getMappedContextSpan(documentSpan: DocumentSpan, project: Project): TextSpan | undefined {
|
||||
const contextSpanStart = documentSpan.contextSpan && getMappedLocation(
|
||||
{ fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start },
|
||||
project
|
||||
);
|
||||
const contextSpanEnd = documentSpan.contextSpan && getMappedLocation(
|
||||
{ fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start + documentSpan.contextSpan.length },
|
||||
project
|
||||
);
|
||||
return contextSpanStart && contextSpanEnd ?
|
||||
{ start: contextSpanStart.pos, length: contextSpanEnd.pos - contextSpanStart.pos } :
|
||||
undefined;
|
||||
function getMappedContextSpanForProject(documentSpan: DocumentSpan, project: Project): TextSpan | undefined {
|
||||
return getMappedContextSpan(documentSpan, project.getSourceMapper(), p => project.projectService.fileExists(p as NormalizedPath));
|
||||
}
|
||||
|
||||
const invalidPartialSemanticModeCommands: readonly CommandNames[] = [
|
||||
@@ -1189,7 +1281,7 @@ namespace ts.server {
|
||||
|
||||
private mapDefinitionInfoLocations(definitions: readonly DefinitionInfo[], project: Project): readonly DefinitionInfo[] {
|
||||
return definitions.map((info): DefinitionInfo => {
|
||||
const newDocumentSpan = getMappedDocumentSpan(info, project);
|
||||
const newDocumentSpan = getMappedDocumentSpanForProject(info, project);
|
||||
return !newDocumentSpan ? info : {
|
||||
...newDocumentSpan,
|
||||
containerKind: info.containerKind,
|
||||
@@ -1484,7 +1576,7 @@ namespace ts.server {
|
||||
|
||||
private mapImplementationLocations(implementations: readonly ImplementationLocation[], project: Project): readonly ImplementationLocation[] {
|
||||
return implementations.map((info): ImplementationLocation => {
|
||||
const newDocumentSpan = getMappedDocumentSpan(info, project);
|
||||
const newDocumentSpan = getMappedDocumentSpanForProject(info, project);
|
||||
return !newDocumentSpan ? info : {
|
||||
...newDocumentSpan,
|
||||
kind: info.kind,
|
||||
@@ -1665,7 +1757,7 @@ namespace ts.server {
|
||||
|
||||
if (!renameInfo.canRename) return simplifiedResult ? { info: renameInfo, locs: [] } : [];
|
||||
|
||||
const locations = combineProjectOutputForRenameLocations(
|
||||
const locations = getRenameLocationsWorker(
|
||||
projects,
|
||||
defaultProject,
|
||||
{ fileName: args.file, pos: position },
|
||||
@@ -1703,7 +1795,7 @@ namespace ts.server {
|
||||
const file = toNormalizedPath(args.file);
|
||||
const projects = this.getProjects(args);
|
||||
const position = this.getPositionInFile(args, file);
|
||||
const references = combineProjectOutputForReferences(
|
||||
const references = getReferencesWorker(
|
||||
projects,
|
||||
this.getDefaultProject(args),
|
||||
{ fileName: args.file, pos: position },
|
||||
@@ -2298,7 +2390,8 @@ namespace ts.server {
|
||||
const seenItems = new Map<string, NavigateToItem[]>(); // name to items with that name
|
||||
|
||||
if (!args.file && !projectFileName) {
|
||||
// VS Code's `Go to symbol in workspaces` sends request like this
|
||||
// VS Code's `Go to symbol in workspaces` sends request like this by default.
|
||||
// There's a setting to have it send a file name (reverting to older behavior).
|
||||
|
||||
// TODO (https://github.com/microsoft/TypeScript/issues/47839)
|
||||
// This appears to have been intended to search all projects but, in practice, it seems to only search
|
||||
@@ -2323,7 +2416,7 @@ namespace ts.server {
|
||||
// Mutates `outputs`
|
||||
function addItemsForProject(project: Project) {
|
||||
const projectItems = project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*filename*/ undefined, /*excludeDts*/ project.isNonTsProject());
|
||||
const unseenItems = filter(projectItems, item => tryAddSeenItem(item) && !getMappedLocation(documentSpanLocation(item), project));
|
||||
const unseenItems = filter(projectItems, item => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project));
|
||||
if (unseenItems.length) {
|
||||
outputs.push({ project, navigateToItems: unseenItems });
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
"types.ts",
|
||||
"utilitiesPublic.ts",
|
||||
"utilities.ts",
|
||||
"watchType.ts",
|
||||
"protocol.ts",
|
||||
"scriptInfo.ts",
|
||||
"typingsCache.ts",
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
@@ -459,6 +459,7 @@ namespace ts.codefix {
|
||||
const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
|
||||
const functionDeclaration = createSignatureDeclarationFromCallExpression(SyntaxKind.FunctionDeclaration, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) as FunctionDeclaration;
|
||||
changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
|
||||
importAdder.writeFixes(changes);
|
||||
}
|
||||
|
||||
function addJsxAttributes(changes: textChanges.ChangeTracker, context: CodeFixContextBase, info: JsxAttributesInfo) {
|
||||
@@ -468,7 +469,7 @@ namespace ts.codefix {
|
||||
const jsxAttributesNode = info.parentDeclaration.attributes;
|
||||
const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute);
|
||||
const attrs = map(info.attributes, attr => {
|
||||
const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr));
|
||||
const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration);
|
||||
const name = factory.createIdentifier(attr.name);
|
||||
const jsxAttribute = factory.createJsxAttribute(name, factory.createJsxExpression(/*dotDotDotToken*/ undefined, value));
|
||||
// formattingScanner requires the Identifier to have a context for scanning attributes with "-" (data-foo).
|
||||
@@ -478,6 +479,7 @@ namespace ts.codefix {
|
||||
const jsxAttributes = factory.createJsxAttributes(hasSpreadAttribute ? [...attrs, ...jsxAttributesNode.properties] : [...jsxAttributesNode.properties, ...attrs]);
|
||||
const options = { prefix: jsxAttributesNode.pos === jsxAttributesNode.end ? " " : undefined };
|
||||
changes.replaceNode(context.sourceFile, jsxAttributesNode, jsxAttributes, options);
|
||||
importAdder.writeFixes(changes);
|
||||
}
|
||||
|
||||
function addObjectLiteralProperties(changes: textChanges.ChangeTracker, context: CodeFixContextBase, info: ObjectLiteralInfo) {
|
||||
@@ -486,7 +488,7 @@ namespace ts.codefix {
|
||||
const target = getEmitScriptTarget(context.program.getCompilerOptions());
|
||||
const checker = context.program.getTypeChecker();
|
||||
const props = map(info.properties, prop => {
|
||||
const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop));
|
||||
const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration);
|
||||
return factory.createPropertyAssignment(createPropertyNameNodeForIdentifierOrLiteral(prop.name, target, quotePreference === QuotePreference.Single), initializer);
|
||||
});
|
||||
const options = {
|
||||
@@ -495,9 +497,10 @@ namespace ts.codefix {
|
||||
indentation: info.indentation
|
||||
};
|
||||
changes.replaceNode(context.sourceFile, info.parentDeclaration, factory.createObjectLiteralExpression([...info.parentDeclaration.properties, ...props], /*multiLine*/ true), options);
|
||||
importAdder.writeFixes(changes);
|
||||
}
|
||||
|
||||
function tryGetValueFromType(context: CodeFixContextBase, checker: TypeChecker, importAdder: ImportAdder, quotePreference: QuotePreference, type: Type): Expression {
|
||||
function tryGetValueFromType(context: CodeFixContextBase, checker: TypeChecker, importAdder: ImportAdder, quotePreference: QuotePreference, type: Type, enclosingDeclaration: Node | undefined): Expression {
|
||||
if (type.flags & TypeFlags.AnyOrUnknown) {
|
||||
return createUndefined();
|
||||
}
|
||||
@@ -534,7 +537,7 @@ namespace ts.codefix {
|
||||
return factory.createNull();
|
||||
}
|
||||
if (type.flags & TypeFlags.Union) {
|
||||
const expression = firstDefined((type as UnionType).types, t => tryGetValueFromType(context, checker, importAdder, quotePreference, t));
|
||||
const expression = firstDefined((type as UnionType).types, t => tryGetValueFromType(context, checker, importAdder, quotePreference, t, enclosingDeclaration));
|
||||
return expression ?? createUndefined();
|
||||
}
|
||||
if (checker.isArrayLikeType(type)) {
|
||||
@@ -542,7 +545,7 @@ namespace ts.codefix {
|
||||
}
|
||||
if (isObjectLiteralType(type)) {
|
||||
const props = map(checker.getPropertiesOfType(type), prop => {
|
||||
const initializer = prop.valueDeclaration ? tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration)) : createUndefined();
|
||||
const initializer = prop.valueDeclaration ? tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration), enclosingDeclaration) : createUndefined();
|
||||
return factory.createPropertyAssignment(prop.name, initializer);
|
||||
});
|
||||
return factory.createObjectLiteralExpression(props, /*multiLine*/ true);
|
||||
@@ -555,7 +558,7 @@ namespace ts.codefix {
|
||||
if (signature === undefined) return createUndefined();
|
||||
|
||||
const func = createSignatureDeclarationFromSignature(SyntaxKind.FunctionExpression, context, quotePreference, signature[0],
|
||||
createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), /*name*/ undefined, /*modifiers*/ undefined, /*optional*/ undefined, /*enclosingDeclaration*/ undefined, importAdder) as FunctionExpression | undefined;
|
||||
createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), /*name*/ undefined, /*modifiers*/ undefined, /*optional*/ undefined, /*enclosingDeclaration*/ enclosingDeclaration, importAdder) as FunctionExpression | undefined;
|
||||
return func ?? createUndefined();
|
||||
}
|
||||
if (getObjectFlags(type) & ObjectFlags.Class) {
|
||||
|
||||
@@ -381,38 +381,45 @@ namespace ts {
|
||||
host.log?.("getExportInfoMap: cache miss or empty; calculating new results");
|
||||
const compilerOptions = program.getCompilerOptions();
|
||||
let moduleCount = 0;
|
||||
forEachExternalModuleToImportFrom(program, host, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => {
|
||||
if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested();
|
||||
const seenExports = new Map<__String, true>();
|
||||
const checker = program.getTypeChecker();
|
||||
const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions);
|
||||
// Note: I think we shouldn't actually see resolved module symbols here, but weird merges
|
||||
// can cause it to happen: see 'completionsImport_mergedReExport.ts'
|
||||
if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) {
|
||||
cache.add(
|
||||
importingFile.path,
|
||||
defaultInfo.symbol,
|
||||
defaultInfo.exportKind === ExportKind.Default ? InternalSymbolName.Default : InternalSymbolName.ExportEquals,
|
||||
moduleSymbol,
|
||||
moduleFile,
|
||||
defaultInfo.exportKind,
|
||||
isFromPackageJson,
|
||||
checker);
|
||||
}
|
||||
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => {
|
||||
if (exported !== defaultInfo?.symbol && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) {
|
||||
try {
|
||||
forEachExternalModuleToImportFrom(program, host, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => {
|
||||
if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested();
|
||||
const seenExports = new Map<__String, true>();
|
||||
const checker = program.getTypeChecker();
|
||||
const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions);
|
||||
// Note: I think we shouldn't actually see resolved module symbols here, but weird merges
|
||||
// can cause it to happen: see 'completionsImport_mergedReExport.ts'
|
||||
if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) {
|
||||
cache.add(
|
||||
importingFile.path,
|
||||
exported,
|
||||
key,
|
||||
defaultInfo.symbol,
|
||||
defaultInfo.exportKind === ExportKind.Default ? InternalSymbolName.Default : InternalSymbolName.ExportEquals,
|
||||
moduleSymbol,
|
||||
moduleFile,
|
||||
ExportKind.Named,
|
||||
defaultInfo.exportKind,
|
||||
isFromPackageJson,
|
||||
checker);
|
||||
}
|
||||
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => {
|
||||
if (exported !== defaultInfo?.symbol && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) {
|
||||
cache.add(
|
||||
importingFile.path,
|
||||
exported,
|
||||
key,
|
||||
moduleSymbol,
|
||||
moduleFile,
|
||||
ExportKind.Named,
|
||||
isFromPackageJson,
|
||||
checker);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
// Ensure cache is reset if operation is cancelled
|
||||
cache.clear();
|
||||
throw err;
|
||||
}
|
||||
|
||||
host.log?.(`getExportInfoMap: done in ${timestamp() - start} ms`);
|
||||
return cache;
|
||||
|
||||
@@ -564,7 +564,7 @@ namespace ts.FindAllReferences {
|
||||
}
|
||||
|
||||
/** Whether a reference, `node`, is a definition of the `target` symbol */
|
||||
function isDeclarationOfSymbol(node: Node, target: Symbol | undefined): boolean {
|
||||
export function isDeclarationOfSymbol(node: Node, target: Symbol | undefined): boolean {
|
||||
if (!target) return false;
|
||||
const source = getDeclarationFromName(node) ||
|
||||
(node.kind === SyntaxKind.DefaultKeyword ? node.parent
|
||||
|
||||
@@ -93,11 +93,12 @@ namespace ts.JsDoc {
|
||||
const parts: SymbolDisplayPart[][] = [];
|
||||
forEachUnique(declarations, declaration => {
|
||||
for (const jsdoc of getCommentHavingNodes(declaration)) {
|
||||
const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, t => t.kind === SyntaxKind.JSDocTag && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc"));
|
||||
// skip comments containing @typedefs since they're not associated with particular declarations
|
||||
// Exceptions:
|
||||
// - @typedefs are themselves declarations with associated comments
|
||||
// - @param or @return indicate that the author thinks of it as a 'local' @typedef that's part of the function documentation
|
||||
if (jsdoc.comment === undefined
|
||||
if (jsdoc.comment === undefined && !inheritDoc
|
||||
|| isJSDoc(jsdoc)
|
||||
&& declaration.kind !== SyntaxKind.JSDocTypedefTag && declaration.kind !== SyntaxKind.JSDocCallbackTag
|
||||
&& jsdoc.tags
|
||||
@@ -105,7 +106,10 @@ namespace ts.JsDoc {
|
||||
&& !jsdoc.tags.some(t => t.kind === SyntaxKind.JSDocParameterTag || t.kind === SyntaxKind.JSDocReturnTag)) {
|
||||
continue;
|
||||
}
|
||||
const newparts = getDisplayPartsFromComment(jsdoc.comment, checker);
|
||||
let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : [];
|
||||
if (inheritDoc && inheritDoc.comment) {
|
||||
newparts = newparts.concat(getDisplayPartsFromComment(inheritDoc.comment, checker));
|
||||
}
|
||||
if (!contains(parts, newparts, isIdenticalListOfDisplayParts)) {
|
||||
parts.push(newparts);
|
||||
}
|
||||
|
||||
+116
-148
@@ -592,7 +592,7 @@ namespace ts {
|
||||
* @returns `true` if `node` has a JSDoc "inheritDoc" tag on it, otherwise `false`.
|
||||
*/
|
||||
function hasJSDocInheritDocTag(node: Node) {
|
||||
return getJSDocTags(node).some(tag => tag.tagName.text === "inheritDoc");
|
||||
return getJSDocTags(node).some(tag => tag.tagName.text === "inheritDoc" || tag.tagName.text === "inheritdoc");
|
||||
}
|
||||
|
||||
function getJsDocTagsOfDeclarations(declarations: Declaration[] | undefined, checker: TypeChecker | undefined): JSDocTagInfo[] {
|
||||
@@ -643,13 +643,14 @@ namespace ts {
|
||||
}
|
||||
|
||||
function findBaseOfDeclaration<T>(checker: TypeChecker, declaration: Declaration, cb: (symbol: Symbol) => T[] | undefined): T[] | undefined {
|
||||
if (hasStaticModifier(declaration)) return;
|
||||
|
||||
const classOrInterfaceDeclaration = declaration.parent?.kind === SyntaxKind.Constructor ? declaration.parent.parent : declaration.parent;
|
||||
if (!classOrInterfaceDeclaration) return;
|
||||
|
||||
const isStaticMember = hasStaticModifier(declaration);
|
||||
return firstDefined(getAllSuperTypeNodes(classOrInterfaceDeclaration), superTypeNode => {
|
||||
const symbol = checker.getPropertyOfType(checker.getTypeAtLocation(superTypeNode), declaration.symbol.name);
|
||||
const baseType = checker.getTypeAtLocation(superTypeNode);
|
||||
const type = isStaticMember && baseType.symbol ? checker.getTypeOfSymbol(baseType.symbol) : baseType;
|
||||
const symbol = checker.getPropertyOfType(type, declaration.symbol.name);
|
||||
return symbol ? cb(symbol) : undefined;
|
||||
});
|
||||
}
|
||||
@@ -926,14 +927,6 @@ namespace ts {
|
||||
|
||||
/// Language Service
|
||||
|
||||
// Information about a specific host file.
|
||||
interface HostFileInformation {
|
||||
hostFileName: string;
|
||||
version: string;
|
||||
scriptSnapshot: IScriptSnapshot;
|
||||
scriptKind: ScriptKind;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface DisplayPartsSymbolWriter extends EmitTextWriter {
|
||||
displayParts(): SymbolDisplayPart[];
|
||||
@@ -987,82 +980,6 @@ namespace ts {
|
||||
return codefix.getSupportedErrorCodes();
|
||||
}
|
||||
|
||||
// Either it will be file name if host doesnt have file or it will be the host's file information
|
||||
type CachedHostFileInformation = HostFileInformation | string;
|
||||
|
||||
// Cache host information about script Should be refreshed
|
||||
// at each language service public entry point, since we don't know when
|
||||
// the set of scripts handled by the host changes.
|
||||
class HostCache {
|
||||
private fileNameToEntry: ESMap<Path, CachedHostFileInformation>;
|
||||
private currentDirectory: string;
|
||||
|
||||
constructor(private host: LanguageServiceHost, getCanonicalFileName: GetCanonicalFileName) {
|
||||
// script id => script index
|
||||
this.currentDirectory = host.getCurrentDirectory();
|
||||
this.fileNameToEntry = new Map();
|
||||
|
||||
// Initialize the list with the root file names
|
||||
const rootFileNames = host.getScriptFileNames();
|
||||
tracing?.push(tracing.Phase.Session, "initializeHostCache", { count: rootFileNames.length });
|
||||
for (const fileName of rootFileNames) {
|
||||
this.createEntry(fileName, toPath(fileName, this.currentDirectory, getCanonicalFileName));
|
||||
}
|
||||
tracing?.pop();
|
||||
}
|
||||
|
||||
private createEntry(fileName: string, path: Path) {
|
||||
let entry: CachedHostFileInformation;
|
||||
const scriptSnapshot = this.host.getScriptSnapshot(fileName);
|
||||
if (scriptSnapshot) {
|
||||
entry = {
|
||||
hostFileName: fileName,
|
||||
version: this.host.getScriptVersion(fileName),
|
||||
scriptSnapshot,
|
||||
scriptKind: getScriptKind(fileName, this.host)
|
||||
};
|
||||
}
|
||||
else {
|
||||
entry = fileName;
|
||||
}
|
||||
|
||||
this.fileNameToEntry.set(path, entry);
|
||||
return entry;
|
||||
}
|
||||
|
||||
public getEntryByPath(path: Path): CachedHostFileInformation | undefined {
|
||||
return this.fileNameToEntry.get(path);
|
||||
}
|
||||
|
||||
public getHostFileInformation(path: Path): HostFileInformation | undefined {
|
||||
const entry = this.fileNameToEntry.get(path);
|
||||
return !isString(entry) ? entry : undefined;
|
||||
}
|
||||
|
||||
public getOrCreateEntryByPath(fileName: string, path: Path): HostFileInformation {
|
||||
const info = this.getEntryByPath(path) || this.createEntry(fileName, path);
|
||||
return isString(info) ? undefined! : info; // TODO: GH#18217
|
||||
}
|
||||
|
||||
public getRootFileNames(): string[] {
|
||||
const names: string[] = [];
|
||||
this.fileNameToEntry.forEach(entry => {
|
||||
if (isString(entry)) {
|
||||
names.push(entry);
|
||||
}
|
||||
else {
|
||||
names.push(entry.hostFileName);
|
||||
}
|
||||
});
|
||||
return names;
|
||||
}
|
||||
|
||||
public getScriptSnapshot(path: Path): IScriptSnapshot {
|
||||
const file = this.getHostFileInformation(path);
|
||||
return (file && file.scriptSnapshot)!; // TODO: GH#18217
|
||||
}
|
||||
}
|
||||
|
||||
class SyntaxTreeCache {
|
||||
// For our syntactic only features, we also keep a cache of the syntax tree for the
|
||||
// currently edited file.
|
||||
@@ -1366,37 +1283,17 @@ namespace ts {
|
||||
lastTypesRootVersion = typeRootsVersion;
|
||||
}
|
||||
|
||||
const rootFileNames = host.getScriptFileNames();
|
||||
|
||||
// Get a fresh cache of the host information
|
||||
let hostCache: HostCache | undefined = new HostCache(host, getCanonicalFileName);
|
||||
const rootFileNames = hostCache.getRootFileNames();
|
||||
const newSettings = host.getCompilationSettings() || getDefaultCompilerOptions();
|
||||
const hasInvalidatedResolution: HasInvalidatedResolution = host.hasInvalidatedResolution || returnFalse;
|
||||
const hasChangedAutomaticTypeDirectiveNames = maybeBind(host, host.hasChangedAutomaticTypeDirectiveNames);
|
||||
const projectReferences = host.getProjectReferences?.();
|
||||
let parsedCommandLines: ESMap<Path, ParsedCommandLine | false> | undefined;
|
||||
const parseConfigHost: ParseConfigFileHost = {
|
||||
useCaseSensitiveFileNames,
|
||||
fileExists,
|
||||
readFile,
|
||||
readDirectory,
|
||||
trace: maybeBind(host, host.trace),
|
||||
getCurrentDirectory: () => currentDirectory,
|
||||
onUnRecoverableConfigFileDiagnostic: noop,
|
||||
};
|
||||
|
||||
// If the program is already up-to-date, we can reuse it
|
||||
if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// IMPORTANT - It is critical from this moment onward that we do not check
|
||||
// cancellation tokens. We are about to mutate source files from a previous program
|
||||
// instance. If we cancel midway through, we may end up in an inconsistent state where
|
||||
// the program points to old source files that have been invalidated because of
|
||||
// incremental parsing.
|
||||
|
||||
// Now create a new compiler
|
||||
const compilerHost: CompilerHost = {
|
||||
let compilerHost: CompilerHost | undefined = {
|
||||
getSourceFile: getOrCreateSourceFile,
|
||||
getSourceFileByPath: getOrCreateSourceFileByPath,
|
||||
getCancellationToken: () => cancellationToken,
|
||||
@@ -1406,8 +1303,8 @@ namespace ts {
|
||||
getDefaultLibFileName: options => host.getDefaultLibFileName(options),
|
||||
writeFile: noop,
|
||||
getCurrentDirectory: () => currentDirectory,
|
||||
fileExists,
|
||||
readFile,
|
||||
fileExists: fileName => host.fileExists(fileName),
|
||||
readFile: fileName => host.readFile && host.readFile(fileName),
|
||||
getSymlinkCache: maybeBind(host, host.getSymlinkCache),
|
||||
realpath: maybeBind(host, host.realpath),
|
||||
directoryExists: directoryName => {
|
||||
@@ -1416,20 +1313,54 @@ namespace ts {
|
||||
getDirectories: path => {
|
||||
return host.getDirectories ? host.getDirectories(path) : [];
|
||||
},
|
||||
readDirectory,
|
||||
readDirectory: (path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number) => {
|
||||
Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
|
||||
return host.readDirectory!(path, extensions, exclude, include, depth);
|
||||
},
|
||||
onReleaseOldSourceFile,
|
||||
onReleaseParsedCommandLine,
|
||||
hasInvalidatedResolution,
|
||||
hasChangedAutomaticTypeDirectiveNames,
|
||||
trace: parseConfigHost.trace,
|
||||
trace: maybeBind(host, host.trace),
|
||||
resolveModuleNames: maybeBind(host, host.resolveModuleNames),
|
||||
getModuleResolutionCache: maybeBind(host, host.getModuleResolutionCache),
|
||||
resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives),
|
||||
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
||||
getParsedCommandLine,
|
||||
};
|
||||
|
||||
const originalGetSourceFile = compilerHost.getSourceFile;
|
||||
|
||||
const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache(
|
||||
compilerHost,
|
||||
fileName => toPath(fileName, currentDirectory, getCanonicalFileName),
|
||||
(...args) => originalGetSourceFile.call(compilerHost, ...args)
|
||||
);
|
||||
compilerHost.getSourceFile = getSourceFileWithCache!;
|
||||
|
||||
host.setCompilerHost?.(compilerHost);
|
||||
|
||||
const parseConfigHost: ParseConfigFileHost = {
|
||||
useCaseSensitiveFileNames,
|
||||
fileExists: fileName => compilerHost!.fileExists(fileName),
|
||||
readFile: fileName => compilerHost!.readFile(fileName),
|
||||
readDirectory: (...args) => compilerHost!.readDirectory!(...args),
|
||||
trace: compilerHost.trace,
|
||||
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
||||
onUnRecoverableConfigFileDiagnostic: noop,
|
||||
};
|
||||
|
||||
// If the program is already up-to-date, we can reuse it
|
||||
if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), fileName => compilerHost!.fileExists(fileName), hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// IMPORTANT - It is critical from this moment onward that we do not check
|
||||
// cancellation tokens. We are about to mutate source files from a previous program
|
||||
// instance. If we cancel midway through, we may end up in an inconsistent state where
|
||||
// the program points to old source files that have been invalidated because of
|
||||
// incremental parsing.
|
||||
|
||||
const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);
|
||||
const options: CreateProgramOptions = {
|
||||
rootNames: rootFileNames,
|
||||
@@ -1440,9 +1371,9 @@ namespace ts {
|
||||
};
|
||||
program = createProgram(options);
|
||||
|
||||
// hostCache is captured in the closure for 'getOrCreateSourceFile' but it should not be used past this point.
|
||||
// It needs to be cleared to allow all collected snapshots to be released
|
||||
hostCache = undefined;
|
||||
// 'getOrCreateSourceFile' depends on caching but should be used past this point.
|
||||
// After this point, the cache needs to be cleared to allow all collected snapshots to be released
|
||||
compilerHost = undefined;
|
||||
parsedCommandLines = undefined;
|
||||
|
||||
// We reset this cache on structure invalidation so we don't hold on to outdated files for long; however we can't use the `compilerHost` above,
|
||||
@@ -1491,29 +1422,6 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function fileExists(fileName: string): boolean {
|
||||
const path = toPath(fileName, currentDirectory, getCanonicalFileName);
|
||||
const entry = hostCache && hostCache.getEntryByPath(path);
|
||||
return entry ?
|
||||
!isString(entry) :
|
||||
(!!host.fileExists && host.fileExists(fileName));
|
||||
}
|
||||
|
||||
function readFile(fileName: string) {
|
||||
// stub missing host functionality
|
||||
const path = toPath(fileName, currentDirectory, getCanonicalFileName);
|
||||
const entry = hostCache && hostCache.getEntryByPath(path);
|
||||
if (entry) {
|
||||
return isString(entry) ? undefined : getSnapshotText(entry.scriptSnapshot);
|
||||
}
|
||||
return host.readFile && host.readFile(fileName);
|
||||
}
|
||||
|
||||
function readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number) {
|
||||
Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
|
||||
return host.readDirectory!(path, extensions, exclude, include, depth);
|
||||
}
|
||||
|
||||
// Release any files we have acquired in the old program but are
|
||||
// not part of the new program.
|
||||
function onReleaseOldSourceFile(oldSourceFile: SourceFile, oldOptions: CompilerOptions) {
|
||||
@@ -1526,15 +1434,18 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getOrCreateSourceFileByPath(fileName: string, path: Path, _languageVersion: ScriptTarget, _onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined {
|
||||
Debug.assert(hostCache !== undefined, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
|
||||
Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
|
||||
// The program is asking for this file, check first if the host can locate it.
|
||||
// If the host can not locate the file, then it does not exist. return undefined
|
||||
// to the program to allow reporting of errors for missing files.
|
||||
const hostFileInformation = hostCache && hostCache.getOrCreateEntryByPath(fileName, path);
|
||||
if (!hostFileInformation) {
|
||||
const scriptSnapshot = host.getScriptSnapshot(fileName);
|
||||
if (!scriptSnapshot) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const scriptKind = getScriptKind(fileName, host);
|
||||
const scriptVersion = host.getScriptVersion(fileName);
|
||||
|
||||
// Check if the language version has changed since we last created a program; if they are the same,
|
||||
// it is safe to reuse the sourceFiles; if not, then the shape of the AST can change, and the oldSourceFile
|
||||
// can not be reused. we have to dump all syntax trees and create new ones.
|
||||
@@ -1567,8 +1478,8 @@ namespace ts {
|
||||
// We do not support the scenario where a host can modify a registered
|
||||
// file's script kind, i.e. in one project some file is treated as ".ts"
|
||||
// and in another as ".js"
|
||||
if (hostFileInformation.scriptKind === oldSourceFile.scriptKind) {
|
||||
return documentRegistry.updateDocumentWithKey(fileName, path, host, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
|
||||
if (scriptKind === oldSourceFile.scriptKind) {
|
||||
return documentRegistry.updateDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind);
|
||||
}
|
||||
else {
|
||||
// Release old source file and fall through to aquire new file with new script kind
|
||||
@@ -1580,7 +1491,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// Could not find this file in the old program, create a new SourceFile for it.
|
||||
return documentRegistry.acquireDocumentWithKey(fileName, path, host, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
|
||||
return documentRegistry.acquireDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1600,6 +1511,62 @@ namespace ts {
|
||||
return host.getPackageJsonAutoImportProvider?.();
|
||||
}
|
||||
|
||||
function updateIsDefinitionOfReferencedSymbols(referencedSymbols: readonly ReferencedSymbol[], knownSymbolSpans: Set<DocumentSpan>): boolean {
|
||||
const checker = program.getTypeChecker();
|
||||
const symbol = getSymbolForProgram();
|
||||
|
||||
if (!symbol) return false;
|
||||
|
||||
for (const referencedSymbol of referencedSymbols) {
|
||||
for (const ref of referencedSymbol.references) {
|
||||
const refNode = getNodeForSpan(ref);
|
||||
Debug.assertIsDefined(refNode);
|
||||
if (knownSymbolSpans.has(ref) || FindAllReferences.isDeclarationOfSymbol(refNode, symbol)) {
|
||||
knownSymbolSpans.add(ref);
|
||||
ref.isDefinition = true;
|
||||
const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists));
|
||||
if (mappedSpan) {
|
||||
knownSymbolSpans.add(mappedSpan);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ref.isDefinition = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
function getSymbolForProgram(): Symbol | undefined {
|
||||
for (const referencedSymbol of referencedSymbols) {
|
||||
for (const ref of referencedSymbol.references) {
|
||||
if (knownSymbolSpans.has(ref)) {
|
||||
const refNode = getNodeForSpan(ref);
|
||||
Debug.assertIsDefined(refNode);
|
||||
return checker.getSymbolAtLocation(refNode);
|
||||
}
|
||||
const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists));
|
||||
if (mappedSpan && knownSymbolSpans.has(mappedSpan)) {
|
||||
const refNode = getNodeForSpan(mappedSpan);
|
||||
if (refNode) {
|
||||
return checker.getSymbolAtLocation(refNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getNodeForSpan(docSpan: DocumentSpan): Node | undefined {
|
||||
const sourceFile = program.getSourceFile(docSpan.fileName);
|
||||
if (!sourceFile) return undefined;
|
||||
const rawNode = getTouchingPropertyName(sourceFile, docSpan.textSpan.start);
|
||||
const adjustedNode = FindAllReferences.Core.getAdjustedNode(rawNode, { use: FindAllReferences.FindReferencesUse.References });
|
||||
return adjustedNode;
|
||||
}
|
||||
}
|
||||
|
||||
function cleanupSemanticCache(): void {
|
||||
program = undefined!; // TODO: GH#18217
|
||||
}
|
||||
@@ -2715,6 +2682,7 @@ namespace ts {
|
||||
getNonBoundSourceFile,
|
||||
getProgram,
|
||||
getAutoImportProvider,
|
||||
updateIsDefinitionOfReferencedSymbols,
|
||||
getApplicableRefactors,
|
||||
getEditsForRefactor,
|
||||
toLineColumnOffset,
|
||||
@@ -2878,7 +2846,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. ");
|
||||
|
||||
@@ -448,10 +448,28 @@ namespace ts.Completions.StringCompletions {
|
||||
|
||||
fragment = ensureTrailingDirectorySeparator(fragment);
|
||||
|
||||
// const absolutePath = normalizeAndPreserveTrailingSlash(isRootedDiskPath(fragment) ? fragment : combinePaths(scriptPath, fragment)); // TODO(rbuckton): should use resolvePaths
|
||||
const absolutePath = resolvePath(scriptPath, fragment);
|
||||
const baseDirectory = hasTrailingDirectorySeparator(absolutePath) ? absolutePath : getDirectoryPath(absolutePath);
|
||||
|
||||
// check for a version redirect
|
||||
const packageJsonPath = findPackageJson(baseDirectory, host);
|
||||
if (packageJsonPath) {
|
||||
const packageJson = readJson(packageJsonPath, host as { readFile: (filename: string) => string | undefined });
|
||||
const typesVersions = (packageJson as any).typesVersions;
|
||||
if (typeof typesVersions === "object") {
|
||||
const versionPaths = getPackageJsonTypesVersionsPaths(typesVersions)?.paths;
|
||||
if (versionPaths) {
|
||||
const packageDirectory = getDirectoryPath(packageJsonPath);
|
||||
const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length);
|
||||
if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensions, versionPaths, host)) {
|
||||
// A true result means one of the `versionPaths` was matched, which will block relative resolution
|
||||
// to files and folders from here. All reachable paths given the pattern match are already added.
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());
|
||||
if (!tryDirectoryExists(host, baseDirectory)) return result;
|
||||
|
||||
@@ -505,37 +523,51 @@ namespace ts.Completions.StringCompletions {
|
||||
}
|
||||
}
|
||||
|
||||
// check for a version redirect
|
||||
const packageJsonPath = findPackageJson(baseDirectory, host);
|
||||
if (packageJsonPath) {
|
||||
const packageJson = readJson(packageJsonPath, host as { readFile: (filename: string) => string | undefined });
|
||||
const typesVersions = (packageJson as any).typesVersions;
|
||||
if (typeof typesVersions === "object") {
|
||||
const versionResult = getPackageJsonTypesVersionsPaths(typesVersions);
|
||||
const versionPaths = versionResult && versionResult.paths;
|
||||
const rest = absolutePath.slice(ensureTrailingDirectorySeparator(baseDirectory).length);
|
||||
if (versionPaths) {
|
||||
addCompletionEntriesFromPaths(result, rest, baseDirectory, extensions, versionPaths, host);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/** @returns whether `fragment` was a match for any `paths` (which should indicate whether any other path completions should be offered) */
|
||||
function addCompletionEntriesFromPaths(result: NameAndKind[], fragment: string, baseDirectory: string, fileExtensions: readonly string[], paths: MapLike<string[]>, host: LanguageServiceHost) {
|
||||
let pathResults: { results: NameAndKind[], matchedPattern: boolean }[] = [];
|
||||
let matchedPathPrefixLength = -1;
|
||||
for (const path in paths) {
|
||||
if (!hasProperty(paths, path)) continue;
|
||||
const patterns = paths[path];
|
||||
if (patterns) {
|
||||
for (const { name, kind, extension } of getCompletionsForPathMapping(path, patterns, fragment, baseDirectory, fileExtensions, host)) {
|
||||
// Path mappings may provide a duplicate way to get to something we've already added, so don't add again.
|
||||
if (!result.some(entry => entry.name === name)) {
|
||||
result.push(nameAndKind(name, kind, extension));
|
||||
}
|
||||
const pathPattern = tryParsePattern(path);
|
||||
if (!pathPattern) continue;
|
||||
const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment);
|
||||
const isLongestMatch = isMatch && (matchedPathPrefixLength === undefined || pathPattern.prefix.length > matchedPathPrefixLength);
|
||||
if (isLongestMatch) {
|
||||
// If this is a higher priority match than anything we've seen so far, previous results from matches are invalid, e.g.
|
||||
// for `import {} from "some-package/|"` with a typesVersions:
|
||||
// {
|
||||
// "bar/*": ["bar/*"], // <-- 1. We add 'bar', but 'bar/*' doesn't match yet.
|
||||
// "*": ["dist/*"], // <-- 2. We match here and add files from dist. 'bar' is still ok because it didn't come from a match.
|
||||
// "foo/*": ["foo/*"] // <-- 3. We matched '*' earlier and added results from dist, but if 'foo/*' also matched,
|
||||
// } results in dist would not be visible. 'bar' still stands because it didn't come from a match.
|
||||
// This is especially important if `dist/foo` is a folder, because if we fail to clear results
|
||||
// added by the '*' match, after typing `"some-package/foo/|"` we would get file results from both
|
||||
// ./dist/foo and ./foo, when only the latter will actually be resolvable.
|
||||
// See pathCompletionsTypesVersionsWildcard6.ts.
|
||||
matchedPathPrefixLength = pathPattern.prefix.length;
|
||||
pathResults = pathResults.filter(r => !r.matchedPattern);
|
||||
}
|
||||
if (typeof pathPattern === "string" || matchedPathPrefixLength === undefined || pathPattern.prefix.length >= matchedPathPrefixLength) {
|
||||
pathResults.push({
|
||||
matchedPattern: isMatch,
|
||||
results: getCompletionsForPathMapping(path, patterns, fragment, baseDirectory, fileExtensions, host)
|
||||
.map(({ name, kind, extension }) => nameAndKind(name, kind, extension)),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const equatePaths = host.useCaseSensitiveFileNames?.() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
|
||||
const equateResults: EqualityComparer<NameAndKind> = (a, b) => equatePaths(a.name, b.name);
|
||||
pathResults.forEach(pathResult => pathResult.results.forEach(pathResult => pushIfUnique(result, pathResult, equateResults)));
|
||||
|
||||
return matchedPathPrefixLength > -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -659,11 +691,15 @@ namespace ts.Completions.StringCompletions {
|
||||
|
||||
const pathPrefix = path.slice(0, path.length - 1);
|
||||
const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
|
||||
return remainingFragment === undefined ? justPathMappingName(pathPrefix) : flatMap(patterns, pattern =>
|
||||
getModulesForPathsPattern(remainingFragment, baseUrl, pattern, fileExtensions, host));
|
||||
if (remainingFragment === undefined) {
|
||||
const starIsFullPathComponent = path[path.length - 2] === "/";
|
||||
return starIsFullPathComponent ? justPathMappingName(pathPrefix) : flatMap(patterns, pattern =>
|
||||
getModulesForPathsPattern("", baseUrl, pattern, fileExtensions, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest })));
|
||||
}
|
||||
return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, baseUrl, pattern, fileExtensions, host));
|
||||
|
||||
function justPathMappingName(name: string): readonly NameAndKind[] {
|
||||
return startsWith(name, fragment) ? [directoryResult(name)] : emptyArray;
|
||||
return startsWith(name, fragment) ? [directoryResult(removeTrailingDirectorySeparator(name))] : emptyArray;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -552,6 +552,11 @@ namespace ts {
|
||||
/* @internal */ getNonBoundSourceFile(fileName: string): SourceFile;
|
||||
/* @internal */ getAutoImportProvider(): Program | undefined;
|
||||
|
||||
/// Returns true if a suitable symbol was found in the project.
|
||||
/// May set isDefinition properties in `referencedSymbols` to false.
|
||||
/// May add elements to `knownSymbolSpans`.
|
||||
/* @internal */ updateIsDefinitionOfReferencedSymbols(referencedSymbols: readonly ReferencedSymbol[], knownSymbolSpans: Set<DocumentSpan>): boolean;
|
||||
|
||||
toggleLineComment(fileName: string, textRange: TextRange): TextChange[];
|
||||
toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
|
||||
commentSelection(fileName: string, textRange: TextRange): TextChange[];
|
||||
|
||||
@@ -806,6 +806,8 @@ namespace ts {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
return getAdjustedLocationForFunction(node as FunctionDeclaration | FunctionExpression);
|
||||
case SyntaxKind.Constructor:
|
||||
return node;
|
||||
}
|
||||
}
|
||||
if (isNamedDeclaration(node)) {
|
||||
@@ -2115,6 +2117,48 @@ namespace ts {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function getMappedLocation(location: DocumentPosition, sourceMapper: SourceMapper, fileExists: ((path: string) => boolean) | undefined): DocumentPosition | undefined {
|
||||
const mapsTo = sourceMapper.tryGetSourcePosition(location);
|
||||
return mapsTo && (!fileExists || fileExists(normalizePath(mapsTo.fileName)) ? mapsTo : undefined);
|
||||
}
|
||||
|
||||
export function getMappedDocumentSpan(documentSpan: DocumentSpan, sourceMapper: SourceMapper, fileExists?: (path: string) => boolean): DocumentSpan | undefined {
|
||||
const { fileName, textSpan } = documentSpan;
|
||||
const newPosition = getMappedLocation({ fileName, pos: textSpan.start }, sourceMapper, fileExists);
|
||||
if (!newPosition) return undefined;
|
||||
const newEndPosition = getMappedLocation({ fileName, pos: textSpan.start + textSpan.length }, sourceMapper, fileExists);
|
||||
const newLength = newEndPosition
|
||||
? newEndPosition.pos - newPosition.pos
|
||||
: textSpan.length; // This shouldn't happen
|
||||
return {
|
||||
fileName: newPosition.fileName,
|
||||
textSpan: {
|
||||
start: newPosition.pos,
|
||||
length: newLength,
|
||||
},
|
||||
originalFileName: documentSpan.fileName,
|
||||
originalTextSpan: documentSpan.textSpan,
|
||||
contextSpan: getMappedContextSpan(documentSpan, sourceMapper, fileExists),
|
||||
originalContextSpan: documentSpan.contextSpan
|
||||
};
|
||||
}
|
||||
|
||||
export function getMappedContextSpan(documentSpan: DocumentSpan, sourceMapper: SourceMapper, fileExists?: (path: string) => boolean): TextSpan | undefined {
|
||||
const contextSpanStart = documentSpan.contextSpan && getMappedLocation(
|
||||
{ fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start },
|
||||
sourceMapper,
|
||||
fileExists
|
||||
);
|
||||
const contextSpanEnd = documentSpan.contextSpan && getMappedLocation(
|
||||
{ fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start + documentSpan.contextSpan.length },
|
||||
sourceMapper,
|
||||
fileExists
|
||||
);
|
||||
return contextSpanStart && contextSpanEnd ?
|
||||
{ start: contextSpanStart.pos, length: contextSpanEnd.pos - contextSpanStart.pos } :
|
||||
undefined;
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// Display-part writer helpers
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
"unittests/tsbuildWatch/noEmit.ts",
|
||||
"unittests/tsbuildWatch/noEmitOnError.ts",
|
||||
"unittests/tsbuildWatch/programUpdates.ts",
|
||||
"unittests/tsbuildWatch/projectsBuilding.ts",
|
||||
"unittests/tsbuildWatch/publicApi.ts",
|
||||
"unittests/tsbuildWatch/reexport.ts",
|
||||
"unittests/tsbuildWatch/watchEnvironment.ts",
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace ts {
|
||||
extension: Extension.Ts,
|
||||
},
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("/sub"));
|
||||
assert.isUndefined(cache.get("/"));
|
||||
@@ -228,6 +229,7 @@ namespace ts {
|
||||
extension: Extension.Ts,
|
||||
},
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("/sub/dir/foo"));
|
||||
assert.isDefined(cache.get("/sub/dir"));
|
||||
@@ -243,6 +245,7 @@ namespace ts {
|
||||
extension: Extension.Ts,
|
||||
},
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("/foo/bar"));
|
||||
assert.isDefined(cache.get("/foo"));
|
||||
@@ -257,6 +260,7 @@ namespace ts {
|
||||
extension: Extension.Ts,
|
||||
},
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("/foo"));
|
||||
assert.isUndefined(cache.get("/"));
|
||||
@@ -270,6 +274,7 @@ namespace ts {
|
||||
extension: Extension.Ts,
|
||||
},
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("c:/foo"));
|
||||
assert.isDefined(cache.get("c:/"));
|
||||
@@ -279,6 +284,7 @@ namespace ts {
|
||||
cache.set("/foo/bar/baz", {
|
||||
resolvedModule: undefined,
|
||||
failedLookupLocations: [],
|
||||
resolutionDiagnostics: [],
|
||||
});
|
||||
assert.isDefined(cache.get("/foo/bar/baz"));
|
||||
assert.isDefined(cache.get("/foo/bar"));
|
||||
|
||||
@@ -130,6 +130,26 @@ describe("unittests:: Public APIs:: getTypeAtLocation", () => {
|
||||
const type = checker.getTypeAtLocation(file);
|
||||
assert.equal(type.flags, ts.TypeFlags.Any);
|
||||
});
|
||||
|
||||
it("returns an errorType for VariableDeclaration with BindingPattern name", () => {
|
||||
const content = "const foo = [1];\n" + "const [a] = foo;";
|
||||
|
||||
const host = new fakes.CompilerHost(vfs.createFromFileSystem(
|
||||
Harness.IO,
|
||||
/*ignoreCase*/ true,
|
||||
{ documents: [new documents.TextDocument("/file.ts", content)], cwd: "/" }));
|
||||
|
||||
const program = ts.createProgram({
|
||||
host,
|
||||
rootNames: ["/file.ts"],
|
||||
options: { noLib: true }
|
||||
});
|
||||
|
||||
const checker = program.getTypeChecker();
|
||||
const file = program.getSourceFile("/file.ts")!;
|
||||
const [declaration] = (ts.findLast(file.statements, ts.isVariableStatement) as ts.VariableStatement).declarationList.declarations;
|
||||
assert.equal(checker.getTypeAtLocation(declaration).flags, ts.TypeFlags.Any);
|
||||
});
|
||||
});
|
||||
|
||||
describe("unittests:: Public APIs:: validateLocaleAndSetLanguage", () => {
|
||||
@@ -160,30 +180,34 @@ describe("unittests:: Public APIs:: validateLocaleAndSetLanguage", () => {
|
||||
});
|
||||
|
||||
describe("unittests:: Public APIs :: forEachChild of @param comments in JSDoc", () => {
|
||||
const content = `
|
||||
it("finds correct children", () => {
|
||||
const content = `
|
||||
/**
|
||||
* @param The {@link TypeReferencesInAedoc}.
|
||||
*/
|
||||
var x
|
||||
`;
|
||||
const sourceFile = ts.createSourceFile("/file.ts", content, ts.ScriptTarget.ESNext, /*setParentNodes*/ true);
|
||||
const paramTag = sourceFile.getChildren()[0].getChildren()[0].getChildren()[0].getChildren()[0];
|
||||
const kids = paramTag.getChildren();
|
||||
const seen: Set<ts.Node> = new Set();
|
||||
ts.forEachChild(paramTag, n => {
|
||||
assert.strictEqual(/*actual*/ false, seen.has(n), "Found a duplicate-added child");
|
||||
seen.add(n);
|
||||
const sourceFile = ts.createSourceFile("/file.ts", content, ts.ScriptTarget.ESNext, /*setParentNodes*/ true);
|
||||
const paramTag = sourceFile.getChildren()[0].getChildren()[0].getChildren()[0].getChildren()[0];
|
||||
const kids = paramTag.getChildren();
|
||||
const seen: Set<ts.Node> = new Set();
|
||||
ts.forEachChild(paramTag, n => {
|
||||
assert.strictEqual(/*actual*/ false, seen.has(n), "Found a duplicate-added child");
|
||||
seen.add(n);
|
||||
});
|
||||
assert.equal(5, kids.length);
|
||||
});
|
||||
assert.equal(5, kids.length);
|
||||
});
|
||||
|
||||
describe("unittests:: Public APIs:: getChild* methods on EndOfFileToken with JSDoc", () => {
|
||||
const content = `
|
||||
it("finds correct children", () => {
|
||||
const content = `
|
||||
/** jsdoc comment attached to EndOfFileToken */
|
||||
`;
|
||||
const sourceFile = ts.createSourceFile("/file.ts", content, ts.ScriptTarget.ESNext, /*setParentNodes*/ true);
|
||||
const endOfFileToken = sourceFile.getChildren()[1];
|
||||
assert.equal(endOfFileToken.getChildren().length, 1);
|
||||
assert.equal(endOfFileToken.getChildCount(), 1);
|
||||
assert.notEqual(endOfFileToken.getChildAt(0), /*expected*/ undefined);
|
||||
const sourceFile = ts.createSourceFile("/file.ts", content, ts.ScriptTarget.ESNext, /*setParentNodes*/ true);
|
||||
const endOfFileToken = sourceFile.getChildren()[1];
|
||||
assert.equal(endOfFileToken.getChildren().length, 1);
|
||||
assert.equal(endOfFileToken.getChildCount(), 1);
|
||||
assert.notEqual(endOfFileToken.getChildAt(0), /*expected*/ undefined);
|
||||
});
|
||||
});
|
||||
@@ -338,11 +338,11 @@ namespace ts {
|
||||
function verifyInvalidation(heading: string) {
|
||||
// Rebuild this project
|
||||
builder.invalidateProject(logicConfig.path as ResolvedConfigFilePath);
|
||||
builder.buildNextInvalidatedProject();
|
||||
builder.getNextInvalidatedProject()?.done();
|
||||
baselineState(`${heading}:: After rebuilding logicConfig`);
|
||||
|
||||
// Build downstream projects should update 'tests', but not 'core'
|
||||
builder.buildNextInvalidatedProject();
|
||||
builder.getNextInvalidatedProject()?.done();
|
||||
baselineState(`${heading}:: After building next project`);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,9 +48,7 @@ namespace ts.tscWatch {
|
||||
change: sys => sys.writeFile(coreFiles[0].path, coreFiles[0].content),
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build core
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build animals
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build zoo
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build solution
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build animals, zoo and solution
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -45,8 +45,7 @@ namespace ts.tscWatch {
|
||||
caption: "Append text",
|
||||
change: sys => sys.appendFile(`${projectRoot}/project1/index.ts`, "const bar = 10;"),
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build project1
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // Solution
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build project1 and solution
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -89,13 +89,6 @@ namespace ts.tscWatch {
|
||||
});
|
||||
});
|
||||
|
||||
const buildTests: TscWatchCompileChange = {
|
||||
caption: "Build Tests",
|
||||
change: noop,
|
||||
// Build tests
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRunAndVerifyNoTimeout,
|
||||
};
|
||||
|
||||
describe("validates the changes and watched files", () => {
|
||||
const newFileWithoutExtension = "newFile";
|
||||
const newFile: File = {
|
||||
@@ -104,10 +97,10 @@ namespace ts.tscWatch {
|
||||
};
|
||||
|
||||
function verifyProjectChanges(subScenario: string, allFilesGetter: () => readonly File[]) {
|
||||
const buildLogicOrUpdateTimeStamps: TscWatchCompileChange = {
|
||||
caption: "Build logic or update time stamps",
|
||||
const buildLogicAndTests: TscWatchCompileChange = {
|
||||
caption: "Build logic and tests",
|
||||
change: noop,
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Builds logic or updates timestamps
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRunAndVerifyNoTimeout,
|
||||
};
|
||||
|
||||
verifyTscWatch({
|
||||
@@ -121,12 +114,10 @@ namespace ts.tscWatch {
|
||||
changes: [
|
||||
changeCore(() => `${core[1].content}
|
||||
export class someClass { }`, "Make change to core"),
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests,
|
||||
buildLogicAndTests,
|
||||
// Another change requeues and builds it
|
||||
changeCore(() => core[1].content, "Revert core file"),
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests,
|
||||
buildLogicAndTests,
|
||||
{
|
||||
caption: "Make two changes",
|
||||
change: sys => {
|
||||
@@ -140,8 +131,7 @@ export class someClass2 { }`);
|
||||
},
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Builds core
|
||||
},
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests,
|
||||
buildLogicAndTests,
|
||||
]
|
||||
});
|
||||
|
||||
@@ -156,8 +146,6 @@ export class someClass2 { }`);
|
||||
changes: [
|
||||
changeCore(() => `${core[1].content}
|
||||
function foo() { }`, "Make local change to core"),
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests
|
||||
]
|
||||
});
|
||||
|
||||
@@ -174,12 +162,10 @@ function foo() { }`, "Make local change to core"),
|
||||
),
|
||||
changes: [
|
||||
changeNewFile(newFile.content),
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests,
|
||||
buildLogicAndTests,
|
||||
changeNewFile(`${newFile.content}
|
||||
export class someClass2 { }`),
|
||||
buildLogicOrUpdateTimeStamps,
|
||||
buildTests
|
||||
buildLogicAndTests,
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -223,7 +209,12 @@ export class someClass2 { }`),
|
||||
change: sys => sys.writeFile(logic[0].path, logic[0].content),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Builds logic
|
||||
},
|
||||
buildTests
|
||||
{
|
||||
caption: "Build Tests",
|
||||
change: noop,
|
||||
// Build tests
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRunAndVerifyNoTimeout,
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -488,8 +479,8 @@ let x: string = 10;`),
|
||||
change: sys => sys.writeFile(logic[1].path, `${logic[1].content}
|
||||
function someFn() { }`),
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build logic
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build tests
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build logic and updates tests
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
namespace ts.tscWatch {
|
||||
describe("unittests:: tsbuildWatch:: watchMode:: projectsBuilding", () => {
|
||||
function pkgs<T>(cb: (index: number) => T, count: number, startIndex?: number): T[] {
|
||||
const result: T[] = [];
|
||||
for (let index = startIndex || 0; count > 0; index++, count--) {
|
||||
result.push(cb(index));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function createPkgReference(index: number) {
|
||||
return { path: `./pkg${index}` };
|
||||
}
|
||||
function pkgFiles(index: number): File[] {
|
||||
return [
|
||||
{
|
||||
path: `${projectRoot}/pkg${index}/index.ts`,
|
||||
content: `export const pkg${index} = ${index};`
|
||||
},
|
||||
{
|
||||
path: `${projectRoot}/pkg${index}/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: { composite: true },
|
||||
references: index === 0 ?
|
||||
undefined :
|
||||
[{ path: `../pkg0` }]
|
||||
})
|
||||
}
|
||||
];
|
||||
}
|
||||
function solution(maxPkgs: number): File {
|
||||
return {
|
||||
path: `${projectRoot}/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
references: pkgs(createPkgReference, maxPkgs),
|
||||
files: [],
|
||||
})
|
||||
};
|
||||
}
|
||||
function checkBuildPkg(startIndex: number, count: number): TscWatchCompileChange {
|
||||
return {
|
||||
caption: `build ${pkgs(index => `pkg${index}`, count, startIndex).join(",")}`,
|
||||
change: noop,
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun,
|
||||
};
|
||||
}
|
||||
verifyTscWatch({
|
||||
scenario: "projectsBuilding",
|
||||
subScenario: `when there are 3 projects in a solution`,
|
||||
commandLineArgs: ["-b", "-w", "-v"],
|
||||
sys: () => createWatchedSystem(
|
||||
[libFile, ...flatMap(pkgs(pkgFiles, 3), identity), solution(3)],
|
||||
{ currentDirectory: projectRoot }
|
||||
),
|
||||
changes: [
|
||||
{
|
||||
caption: "dts doesn't change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst2 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Build pkg0 and update timestamps
|
||||
},
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 2),
|
||||
noopChange,
|
||||
]
|
||||
});
|
||||
verifyTscWatch({
|
||||
scenario: "projectsBuilding",
|
||||
subScenario: `when there are 5 projects in a solution`,
|
||||
commandLineArgs: ["-b", "-w", "-v"],
|
||||
sys: () => createWatchedSystem(
|
||||
[libFile, ...flatMap(pkgs(pkgFiles, 5), identity), solution(5)],
|
||||
{ currentDirectory: projectRoot }
|
||||
),
|
||||
changes: [
|
||||
{
|
||||
caption: "dts doesn't change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst2 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Build pkg0 and update timestamps
|
||||
},
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 4),
|
||||
noopChange,
|
||||
]
|
||||
});
|
||||
verifyTscWatch({
|
||||
scenario: "projectsBuilding",
|
||||
subScenario: `when there are 8 projects in a solution`,
|
||||
commandLineArgs: ["-b", "-w", "-v"],
|
||||
sys: () => createWatchedSystem(
|
||||
[libFile, ...flatMap(pkgs(pkgFiles, 8), identity), solution(8)],
|
||||
{ currentDirectory: projectRoot }
|
||||
),
|
||||
changes: [
|
||||
{
|
||||
caption: "dts doesn't change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst2 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Build pkg0 and update timestamps
|
||||
},
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 5),
|
||||
checkBuildPkg(6, 2),
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change2",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst3 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 5),
|
||||
{
|
||||
caption: "change while building",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst4 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(6, 2),
|
||||
noopChange,
|
||||
]
|
||||
});
|
||||
verifyTscWatch({
|
||||
scenario: "projectsBuilding",
|
||||
subScenario: `when there are 23 projects in a solution`,
|
||||
commandLineArgs: ["-b", "-w", "-v"],
|
||||
sys: () => createWatchedSystem(
|
||||
[libFile, ...flatMap(pkgs(pkgFiles, 23), identity), solution(23)],
|
||||
{ currentDirectory: projectRoot }
|
||||
),
|
||||
changes: [
|
||||
{
|
||||
caption: "dts doesn't change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst2 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun, // Build pkg0 and update timestamps
|
||||
},
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 5),
|
||||
checkBuildPkg(6, 5),
|
||||
checkBuildPkg(11, 5),
|
||||
checkBuildPkg(16, 5),
|
||||
checkBuildPkg(21, 3),
|
||||
noopChange,
|
||||
{
|
||||
caption: "dts change2",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst3 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 5),
|
||||
checkBuildPkg(6, 5),
|
||||
{
|
||||
caption: "change while building",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `const someConst4 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(11, 5),
|
||||
{
|
||||
caption: "change while building: dts changes",
|
||||
change: sys => sys.appendFile(`${projectRoot}/pkg0/index.ts`, `export const someConst5 = 10;`),
|
||||
timeouts: checkSingleTimeoutQueueLengthAndRun // Build pkg0
|
||||
},
|
||||
checkBuildPkg(1, 5),
|
||||
checkBuildPkg(6, 5),
|
||||
checkBuildPkg(11, 5),
|
||||
checkBuildPkg(16, 5),
|
||||
checkBuildPkg(21, 3),
|
||||
noopChange,
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -59,8 +59,7 @@ export function f22() { } // trailing`
|
||||
change: sys => sys.prependFile(sharedIndex.path, "export function fooBar() {}"),
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // Shared
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // webpack
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // solution
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // webpack and solution
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
namespace ts.tscWatch {
|
||||
describe("unittests:: tsbuildWatch:: watchMode:: with reexport when referenced project reexports definitions from another file", () => {
|
||||
function build(sys: WatchedSystem) {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/pure
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/main
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
}
|
||||
verifyTscWatch({
|
||||
scenario: "reexport",
|
||||
subScenario: "Reports errors correctly",
|
||||
@@ -26,12 +20,20 @@ namespace ts.tscWatch {
|
||||
{
|
||||
caption: "Introduce error",
|
||||
change: sys => replaceFileText(sys, `${TestFSWithWatch.tsbuildProjectsLocation}/reexport/src/pure/session.ts`, "// ", ""),
|
||||
timeouts: build,
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/pure
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/main and src
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
},
|
||||
},
|
||||
{
|
||||
caption: "Fix error",
|
||||
change: sys => replaceFileText(sys, `${TestFSWithWatch.tsbuildProjectsLocation}/reexport/src/pure/session.ts`, "bar: ", "// bar: "),
|
||||
timeouts: build
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/pure
|
||||
sys.checkTimeoutQueueLengthAndRun(1); // build src/main and src
|
||||
sys.checkTimeoutQueueLength(0);
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -40,7 +40,10 @@ namespace ts.tscWatch {
|
||||
{
|
||||
caption: "modify typing file",
|
||||
change: sys => sys.writeFile(typing.path, `${typing.content}export const typing1 = 10;`),
|
||||
timeouts: sys => pkgs(() => sys.checkTimeoutQueueLengthAndRun(1))
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1);
|
||||
checkSingleTimeoutQueueLengthAndRunAndVerifyNoTimeout(sys);
|
||||
}
|
||||
},
|
||||
{
|
||||
// Make change
|
||||
@@ -54,7 +57,10 @@ namespace ts.tscWatch {
|
||||
{
|
||||
caption: "modify typing file",
|
||||
change: sys => sys.writeFile(typing.path, typing.content),
|
||||
timeouts: sys => pkgs(() => sys.checkTimeoutQueueLengthAndRun(1))
|
||||
timeouts: sys => {
|
||||
sys.checkTimeoutQueueLengthAndRun(1);
|
||||
checkSingleTimeoutQueueLengthAndRunAndVerifyNoTimeout(sys);
|
||||
}
|
||||
},
|
||||
{
|
||||
// Make change to remove all watches
|
||||
@@ -68,7 +74,7 @@ namespace ts.tscWatch {
|
||||
{
|
||||
caption: "modify typing file",
|
||||
change: sys => sys.writeFile(typing.path, `${typing.content}export const typing1 = 10;`),
|
||||
timeouts: sys => pkgs(() => sys.checkTimeoutQueueLengthAndRun(1))
|
||||
timeouts: sys => sys.checkTimeoutQueueLength(0),
|
||||
},
|
||||
],
|
||||
watchOrSolution: solutionBuilder
|
||||
|
||||
@@ -400,7 +400,7 @@ namespace ts.projectSystem {
|
||||
|
||||
const response = executeSessionRequest<protocol.ReferencesRequest, protocol.ReferencesResponse>(session, protocol.CommandTypes.References, protocolFileLocationFromSubstring(userTs, "fnA()"));
|
||||
assert.deepEqual<protocol.ReferencesResponseBody | undefined>(response, {
|
||||
refs: [...referencesUserTs(userTs, /*isDefinition*/ undefined), referenceATs(aTs, /*isDefinition*/ true)], // Presently inconsistent across projects
|
||||
refs: [...referencesUserTs(userTs, /*isDefinition*/ undefined), referenceATs(aTs, /*isDefinition*/ undefined)],
|
||||
symbolName: "fnA",
|
||||
symbolStartOffset: protocolLocationFromSubstring(userTs.content, "fnA()").offset,
|
||||
symbolDisplayString: "function fnA(): void",
|
||||
@@ -455,7 +455,7 @@ namespace ts.projectSystem {
|
||||
},
|
||||
references: [
|
||||
makeReferencedSymbolEntry({ file: userTs, text: "fnA" }),
|
||||
makeReferencedSymbolEntry({ file: aTs, text: "fnA", isDefinition: true, isWriteAccess: true, contextText: "export function fnA() {}" }),
|
||||
makeReferencedSymbolEntry({ file: aTs, text: "fnA", isWriteAccess: true, contextText: "export function fnA() {}" }),
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -581,6 +581,126 @@ testCompositeFunction('why hello there', 42);`
|
||||
baselineTsserverLogs("projectReferences", `finding local reference doesnt load ancestor/sibling projects`, session);
|
||||
});
|
||||
|
||||
it("when finding references in overlapping projects", () => {
|
||||
const solutionLocation = "/user/username/projects/solution";
|
||||
const solutionConfig: File = {
|
||||
path: `${solutionLocation}/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
files: [],
|
||||
include: [],
|
||||
references: [
|
||||
{ path: "./a" },
|
||||
{ path: "./b" },
|
||||
{ path: "./c" },
|
||||
{ path: "./d" },
|
||||
]
|
||||
})
|
||||
};
|
||||
const aConfig: File = {
|
||||
path: `${solutionLocation}/a/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true,
|
||||
module: "none"
|
||||
},
|
||||
files: ["./index.ts"]
|
||||
})
|
||||
};
|
||||
const aFile: File = {
|
||||
path: `${solutionLocation}/a/index.ts`,
|
||||
content: `
|
||||
export interface I {
|
||||
M(): void;
|
||||
}`
|
||||
};
|
||||
|
||||
const bConfig: File = {
|
||||
path: `${solutionLocation}/b/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true
|
||||
},
|
||||
files: ["./index.ts"],
|
||||
references: [
|
||||
{ path: "../a" }
|
||||
]
|
||||
})
|
||||
};
|
||||
const bFile: File = {
|
||||
path: `${solutionLocation}/b/index.ts`,
|
||||
content: `
|
||||
import { I } from "../a";
|
||||
|
||||
export class B implements I {
|
||||
M() {}
|
||||
}`
|
||||
};
|
||||
|
||||
const cConfig: File = {
|
||||
path: `${solutionLocation}/c/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true
|
||||
},
|
||||
files: ["./index.ts"],
|
||||
references: [
|
||||
{ path: "../b" }
|
||||
]
|
||||
})
|
||||
};
|
||||
const cFile: File = {
|
||||
path: `${solutionLocation}/c/index.ts`,
|
||||
content: `
|
||||
import { I } from "../a";
|
||||
import { B } from "../b";
|
||||
|
||||
export const C: I = new B();
|
||||
`
|
||||
};
|
||||
|
||||
const dConfig: File = {
|
||||
path: `${solutionLocation}/d/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true
|
||||
},
|
||||
files: ["./index.ts"],
|
||||
references: [
|
||||
{ path: "../c" }
|
||||
]
|
||||
})
|
||||
};
|
||||
const dFile: File = {
|
||||
path: `${solutionLocation}/d/index.ts`,
|
||||
content: `
|
||||
import { I } from "../a";
|
||||
import { C } from "../c";
|
||||
|
||||
export const D: I = C;
|
||||
`
|
||||
};
|
||||
|
||||
const files = [libFile, solutionConfig, aConfig, aFile, bConfig, bFile, cConfig, cFile, dConfig, dFile, libFile];
|
||||
const host = createServerHost(files);
|
||||
const session = createSession(host, { logger: createLoggerWithInMemoryLogs() });
|
||||
openFilesForSession([bFile], session);
|
||||
|
||||
// The first search will trigger project loads
|
||||
session.executeCommandSeq<protocol.ReferencesRequest>({
|
||||
command: protocol.CommandTypes.References,
|
||||
arguments: protocolFileLocationFromSubstring(bFile, "I", { index: 1 })
|
||||
});
|
||||
|
||||
// The second search starts with the projects already loaded
|
||||
// Formerly, this would search some projects multiple times
|
||||
session.executeCommandSeq<protocol.ReferencesRequest>({
|
||||
command: protocol.CommandTypes.References,
|
||||
arguments: protocolFileLocationFromSubstring(bFile, "I", { index: 1 })
|
||||
});
|
||||
|
||||
baselineTsserverLogs("projectReferences", `finding references in overlapping projects`, session);
|
||||
});
|
||||
|
||||
describe("special handling of localness of the definitions for findAllRefs", () => {
|
||||
function verify(scenario: string, definition: string, usage: string, referenceTerm: string) {
|
||||
it(scenario, () => {
|
||||
|
||||
@@ -42,10 +42,10 @@ new Intl.DateTimeFormat().formatRange
|
||||
>formatRange : (startDate: number | bigint | Date, endDate: number | bigint | Date) => string
|
||||
|
||||
new Intl.DateTimeFormat().formatRangeToParts
|
||||
>new Intl.DateTimeFormat().formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeFormatPart[]
|
||||
>new Intl.DateTimeFormat().formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeRangeFormatPart[]
|
||||
>new Intl.DateTimeFormat() : Intl.DateTimeFormat
|
||||
>Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; }
|
||||
>Intl : typeof Intl
|
||||
>DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; }
|
||||
>formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeFormatPart[]
|
||||
>formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeRangeFormatPart[]
|
||||
|
||||
+9
-6
@@ -14,7 +14,7 @@ and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "4.7";
|
||||
const versionMajorMinor = "4.8";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
/**
|
||||
@@ -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;
|
||||
@@ -4510,6 +4511,8 @@ declare namespace ts {
|
||||
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
||||
function isStringLiteralLike(node: Node): node is StringLiteralLike;
|
||||
function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean;
|
||||
function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
const factory: NodeFactory;
|
||||
@@ -11337,9 +11340,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. */
|
||||
|
||||
+9
-6
@@ -14,7 +14,7 @@ and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "4.7";
|
||||
const versionMajorMinor = "4.8";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
/**
|
||||
@@ -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;
|
||||
@@ -4510,6 +4511,8 @@ declare namespace ts {
|
||||
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
||||
function isStringLiteralLike(node: Node): node is StringLiteralLike;
|
||||
function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean;
|
||||
function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
const factory: NodeFactory;
|
||||
@@ -7479,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. */
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
tests/cases/conformance/async/es2017/await_incorrectThisType.ts(40,1): error TS2684: The 'this' context of type 'EPromise<number, string>' is not assignable to method's 'this' of type 'EPromise<never, string>'.
|
||||
Type 'number' is not assignable to type 'never'.
|
||||
tests/cases/conformance/async/es2017/await_incorrectThisType.ts(43,5): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.
|
||||
The 'this' context of type 'EPromise<number, string>' is not assignable to method's 'this' of type 'EPromise<never, string>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/async/es2017/await_incorrectThisType.ts (2 errors) ====
|
||||
// https://github.com/microsoft/TypeScript/issues/47711
|
||||
type Either<E, A> = Left<E> | Right<A>;
|
||||
type Left<E> = { tag: 'Left', e: E };
|
||||
type Right<A> = { tag: 'Right', a: A };
|
||||
|
||||
const mkLeft = <E>(e: E): Either<E, never> => ({ tag: 'Left', e });
|
||||
const mkRight = <A>(a: A): Either<never, A> => ({ tag: 'Right', a });
|
||||
|
||||
class EPromise<E, A> implements PromiseLike<A> {
|
||||
static succeed<A>(a: A): EPromise<never, A> {
|
||||
return new EPromise(Promise.resolve(mkRight(a)));
|
||||
}
|
||||
|
||||
static fail<E>(e: E): EPromise<E, never> {
|
||||
return new EPromise(Promise.resolve(mkLeft(e)));
|
||||
}
|
||||
|
||||
constructor(readonly p: PromiseLike<Either<E, A>>) { }
|
||||
|
||||
then<B = A, B1 = never>(
|
||||
// EPromise can act as a Thenable only when `E` is `never`.
|
||||
this: EPromise<never, A>,
|
||||
onfulfilled?: ((value: A) => B | PromiseLike<B>) | null | undefined,
|
||||
onrejected?: ((reason: any) => B1 | PromiseLike<B1>) | null | undefined
|
||||
): PromiseLike<B | B1> {
|
||||
return this.p.then(
|
||||
// Casting to `Right<A>` is safe here because we've eliminated the possibility of `Left<E>`.
|
||||
either => onfulfilled?.((either as Right<A>).a) ?? (either as Right<A>).a as unknown as B,
|
||||
onrejected
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const withTypedFailure: EPromise<number, string> = EPromise.fail(1);
|
||||
|
||||
// Errors as expected:
|
||||
//
|
||||
// "The 'this' context of type 'EPromise<number, string>' is not assignable to method's
|
||||
// 'this' of type 'EPromise<never, string>"
|
||||
withTypedFailure.then(s => s.toUpperCase()).then(console.log);
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2684: The 'this' context of type 'EPromise<number, string>' is not assignable to method's 'this' of type 'EPromise<never, string>'.
|
||||
!!! error TS2684: Type 'number' is not assignable to type 'never'.
|
||||
|
||||
async function test() {
|
||||
await withTypedFailure;
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.
|
||||
!!! error TS1320: The 'this' context of type 'EPromise<number, string>' is not assignable to method's 'this' of type 'EPromise<never, string>'.
|
||||
}
|
||||
@@ -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
|
||||
|
||||
+1
-337
@@ -6,121 +6,9 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(17,14): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(18,14): error TS2367: This condition will always return 'false' since the types 'T' and 'U' have no overlap.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(19,14): error TS2367: This condition will always return 'true' since the types 'T' and 'U' have no overlap.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(22,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(23,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(24,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(25,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(26,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(27,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(28,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(30,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(31,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(32,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(33,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(34,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(35,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(36,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(39,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(40,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(41,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(42,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(43,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(44,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(45,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(47,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(48,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(49,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(50,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(51,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(52,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(53,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(56,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(57,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(58,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(59,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(60,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(61,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(62,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(64,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(65,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(66,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(67,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(68,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(69,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(70,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(73,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(74,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(75,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(76,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(77,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(78,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(79,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(81,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(82,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(83,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(84,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(85,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(86,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(87,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(90,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(91,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(92,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(93,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(94,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(95,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(96,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(98,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(99,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(100,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(101,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(102,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(103,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(104,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(107,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(108,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(109,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(110,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(111,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(112,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(113,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(115,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(116,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(117,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(118,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(119,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(120,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(121,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(124,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(125,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(126,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(127,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(128,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(129,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(130,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(132,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(133,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(134,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(135,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(136,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(137,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(138,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(141,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(142,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(143,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(144,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(145,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(146,16): error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(147,16): error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(149,16): error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(150,16): error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(151,16): error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(152,16): error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(153,16): error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(154,16): error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts(155,16): error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts (120 errors) ====
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipTypeParameter.ts (8 errors) ====
|
||||
enum E { a, b, c }
|
||||
|
||||
var a: boolean;
|
||||
@@ -159,361 +47,137 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso
|
||||
|
||||
// operator <
|
||||
var r1a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r1a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r1a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r1a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r1a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r1a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r1a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r1b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r1b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r1b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r1b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r1b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r1b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r1b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator >
|
||||
var r2a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r2a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r2a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r2a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r2a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r2a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r2a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r2b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r2b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r2b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r2b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r2b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r2b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r2b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator <=
|
||||
var r3a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r3a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r3a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r3a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r3a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r3a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r3a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r3b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r3b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r3b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r3b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r3b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r3b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r3b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator >=
|
||||
var r4a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r4a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r4a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r4a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r4a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r4a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r4a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r4b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r4b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r4b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r4b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r4b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r4b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r4b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator ==
|
||||
var r5a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r5a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r5a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r5a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r5a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r5a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r5a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r5b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r5b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r5b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r5b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r5b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r5b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r5b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator !=
|
||||
var r6a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r6a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r6a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r6a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r6a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r6a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r6a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r6b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r6b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r6b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r6b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r6b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r6b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r6b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator ===
|
||||
var r7a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r7a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r7a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r7a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r7a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r7a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r7a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r7b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r7b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r7b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r7b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r7b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r7b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r7b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
|
||||
// operator !==
|
||||
var r8a1 = t < a;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'.
|
||||
var r8a2 = t < b;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'.
|
||||
var r8a3 = t < c;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'.
|
||||
var r8a4 = t < d;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'.
|
||||
var r8a5 = t < e;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'.
|
||||
var r8a6 = t < f;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'.
|
||||
var r8a7 = t < g;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'.
|
||||
|
||||
var r8b1 = a < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'.
|
||||
var r8b2 = b < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'.
|
||||
var r8b3 = c < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'.
|
||||
var r8b4 = d < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'.
|
||||
var r8b5 = e < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'.
|
||||
var r8b6 = f < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'.
|
||||
var r8b7 = g < t;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'.
|
||||
}
|
||||
@@ -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,63 @@
|
||||
// === /tests/cases/fourslash/constructorFindAllReferences1.ts ===
|
||||
// export class C {
|
||||
// /*FIND ALL REFS*/public [|constructor|]() { }
|
||||
// public foo() { }
|
||||
// }
|
||||
//
|
||||
// new [|C|]().foo();
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences1.ts",
|
||||
"kind": "class",
|
||||
"name": "class C",
|
||||
"textSpan": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "C",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 68
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 28,
|
||||
"length": 11
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences1.ts",
|
||||
"contextSpan": {
|
||||
"start": 21,
|
||||
"length": 24
|
||||
},
|
||||
"isWriteAccess": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 74,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences1.ts",
|
||||
"isWriteAccess": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,63 @@
|
||||
// === /tests/cases/fourslash/constructorFindAllReferences2.ts ===
|
||||
// export class C {
|
||||
// /*FIND ALL REFS*/private [|constructor|]() { }
|
||||
// public foo() { }
|
||||
// }
|
||||
//
|
||||
// new [|C|]().foo();
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences2.ts",
|
||||
"kind": "class",
|
||||
"name": "class C",
|
||||
"textSpan": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "C",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 69
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 29,
|
||||
"length": 11
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences2.ts",
|
||||
"contextSpan": {
|
||||
"start": 21,
|
||||
"length": 25
|
||||
},
|
||||
"isWriteAccess": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 75,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences2.ts",
|
||||
"isWriteAccess": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,65 @@
|
||||
// === /tests/cases/fourslash/constructorFindAllReferences3.ts ===
|
||||
// export class C {
|
||||
// /*FIND ALL REFS*/[|constructor|]() { }
|
||||
// public foo() { }
|
||||
// }
|
||||
//
|
||||
// new [|C|]().foo();
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences3.ts",
|
||||
"kind": "class",
|
||||
"name": "class C",
|
||||
"textSpan": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "C",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 61
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 21,
|
||||
"length": 11
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences3.ts",
|
||||
"contextSpan": {
|
||||
"start": 21,
|
||||
"length": 17
|
||||
},
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 67,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,63 @@
|
||||
// === /tests/cases/fourslash/constructorFindAllReferences4.ts ===
|
||||
// export class C {
|
||||
// /*FIND ALL REFS*/protected [|constructor|]() { }
|
||||
// public foo() { }
|
||||
// }
|
||||
//
|
||||
// new [|C|]().foo();
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences4.ts",
|
||||
"kind": "class",
|
||||
"name": "class C",
|
||||
"textSpan": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "C",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 71
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 31,
|
||||
"length": 11
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences4.ts",
|
||||
"contextSpan": {
|
||||
"start": 21,
|
||||
"length": 27
|
||||
},
|
||||
"isWriteAccess": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 77,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/constructorFindAllReferences4.ts",
|
||||
"isWriteAccess": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -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
|
||||
|
||||
})
|
||||
|
||||
Loaded 100 of 600 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user