typescript 4.6.0-dev.20220101 → 4.6.0-dev.20220105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es2020.intl.d.ts +1 -0
- package/lib/tsc.js +67 -44
- package/lib/tsserver.js +172 -99
- package/lib/tsserverlibrary.d.ts +4 -3
- package/lib/tsserverlibrary.js +172 -99
- package/lib/typescript.d.ts +4 -3
- package/lib/typescript.js +171 -98
- package/lib/typescriptServices.d.ts +4 -3
- package/lib/typescriptServices.js +171 -98
- package/lib/typingsInstaller.js +114 -69
- package/package.json +1 -1
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -297,6 +297,7 @@ declare namespace Intl {
|
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
interface DisplayNamesOptions {
|
|
300
|
+
locale: UnicodeBCP47LocaleIdentifier;
|
|
300
301
|
localeMatcher: RelativeTimeFormatLocaleMatcher;
|
|
301
302
|
style: RelativeTimeFormatStyle;
|
|
302
303
|
type: "language" | "region" | "script" | "currency";
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220105";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -17785,7 +17785,7 @@ var ts;
|
|
|
17785
17785
|
result.push(createModifier(144));
|
|
17786
17786
|
if (flags & 256)
|
|
17787
17787
|
result.push(createModifier(131));
|
|
17788
|
-
return result;
|
|
17788
|
+
return result.length ? result : undefined;
|
|
17789
17789
|
}
|
|
17790
17790
|
function createQualifiedName(left, right) {
|
|
17791
17791
|
var node = createBaseNode(160);
|
|
@@ -21036,32 +21036,36 @@ var ts;
|
|
|
21036
21036
|
}
|
|
21037
21037
|
function updateModifiers(node, modifiers) {
|
|
21038
21038
|
var _a;
|
|
21039
|
+
var modifierArray;
|
|
21039
21040
|
if (typeof modifiers === "number") {
|
|
21040
|
-
|
|
21041
|
-
}
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21041
|
+
modifierArray = createModifiersFromModifierFlags(modifiers);
|
|
21042
|
+
}
|
|
21043
|
+
else {
|
|
21044
|
+
modifierArray = modifiers;
|
|
21045
|
+
}
|
|
21046
|
+
return ts.isParameter(node) ? updateParameterDeclaration(node, node.decorators, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) :
|
|
21047
|
+
ts.isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) :
|
|
21048
|
+
ts.isPropertyDeclaration(node) ? updatePropertyDeclaration(node, node.decorators, modifierArray, node.name, (_a = node.questionToken) !== null && _a !== void 0 ? _a : node.exclamationToken, node.type, node.initializer) :
|
|
21049
|
+
ts.isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) :
|
|
21050
|
+
ts.isMethodDeclaration(node) ? updateMethodDeclaration(node, node.decorators, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21051
|
+
ts.isConstructorDeclaration(node) ? updateConstructorDeclaration(node, node.decorators, modifierArray, node.parameters, node.body) :
|
|
21052
|
+
ts.isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, node.decorators, modifierArray, node.name, node.parameters, node.type, node.body) :
|
|
21053
|
+
ts.isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, node.decorators, modifierArray, node.name, node.parameters, node.body) :
|
|
21054
|
+
ts.isIndexSignatureDeclaration(node) ? updateIndexSignature(node, node.decorators, modifierArray, node.parameters, node.type) :
|
|
21055
|
+
ts.isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21056
|
+
ts.isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) :
|
|
21057
|
+
ts.isClassExpression(node) ? updateClassExpression(node, node.decorators, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21058
|
+
ts.isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) :
|
|
21059
|
+
ts.isFunctionDeclaration(node) ? updateFunctionDeclaration(node, node.decorators, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21060
|
+
ts.isClassDeclaration(node) ? updateClassDeclaration(node, node.decorators, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21061
|
+
ts.isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, node.decorators, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21062
|
+
ts.isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, node.decorators, modifierArray, node.name, node.typeParameters, node.type) :
|
|
21063
|
+
ts.isEnumDeclaration(node) ? updateEnumDeclaration(node, node.decorators, modifierArray, node.name, node.members) :
|
|
21064
|
+
ts.isModuleDeclaration(node) ? updateModuleDeclaration(node, node.decorators, modifierArray, node.name, node.body) :
|
|
21065
|
+
ts.isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, node.decorators, modifierArray, node.isTypeOnly, node.name, node.moduleReference) :
|
|
21066
|
+
ts.isImportDeclaration(node) ? updateImportDeclaration(node, node.decorators, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) :
|
|
21067
|
+
ts.isExportAssignment(node) ? updateExportAssignment(node, node.decorators, modifierArray, node.expression) :
|
|
21068
|
+
ts.isExportDeclaration(node) ? updateExportDeclaration(node, node.decorators, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) :
|
|
21065
21069
|
ts.Debug.assertNever(node);
|
|
21066
21070
|
}
|
|
21067
21071
|
function asNodeArray(array) {
|
|
@@ -56269,7 +56273,8 @@ var ts;
|
|
|
56269
56273
|
return access.kind === 205 ? access.name.escapedText :
|
|
56270
56274
|
access.kind === 206 && ts.isStringOrNumericLiteralLike(access.argumentExpression) ? ts.escapeLeadingUnderscores(access.argumentExpression.text) :
|
|
56271
56275
|
access.kind === 202 && (propertyName = getDestructuringPropertyName(access)) ? ts.escapeLeadingUnderscores(propertyName) :
|
|
56272
|
-
|
|
56276
|
+
access.kind === 163 ? ("" + access.parent.parameters.indexOf(access)) :
|
|
56277
|
+
undefined;
|
|
56273
56278
|
}
|
|
56274
56279
|
function containsMatchingReference(source, target) {
|
|
56275
56280
|
while (ts.isAccessExpression(source)) {
|
|
@@ -57470,11 +57475,11 @@ var ts;
|
|
|
57470
57475
|
return result;
|
|
57471
57476
|
}
|
|
57472
57477
|
function getCandidateDiscriminantPropertyAccess(expr) {
|
|
57473
|
-
if (ts.isBindingPattern(reference)) {
|
|
57478
|
+
if (ts.isBindingPattern(reference) || ts.isFunctionExpressionOrArrowFunction(reference)) {
|
|
57474
57479
|
if (ts.isIdentifier(expr)) {
|
|
57475
57480
|
var symbol = getResolvedSymbol(expr);
|
|
57476
57481
|
var declaration = symbol.valueDeclaration;
|
|
57477
|
-
if (declaration && ts.isBindingElement(declaration) &&
|
|
57482
|
+
if (declaration && (ts.isBindingElement(declaration) || ts.isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) {
|
|
57478
57483
|
return declaration;
|
|
57479
57484
|
}
|
|
57480
57485
|
}
|
|
@@ -58159,18 +58164,34 @@ var ts;
|
|
|
58159
58164
|
}
|
|
58160
58165
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
58161
58166
|
var declaration = symbol.valueDeclaration;
|
|
58162
|
-
if (declaration
|
|
58163
|
-
|
|
58164
|
-
|
|
58165
|
-
|
|
58166
|
-
|
|
58167
|
-
links.flags
|
|
58168
|
-
|
|
58169
|
-
|
|
58170
|
-
|
|
58171
|
-
|
|
58172
|
-
|
|
58173
|
-
|
|
58167
|
+
if (declaration) {
|
|
58168
|
+
if (ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
58169
|
+
var parent = declaration.parent.parent;
|
|
58170
|
+
if (parent.kind === 253 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 163) {
|
|
58171
|
+
var links = getNodeLinks(location);
|
|
58172
|
+
if (!(links.flags & 268435456)) {
|
|
58173
|
+
links.flags |= 268435456;
|
|
58174
|
+
var parentType = getTypeForBindingElementParent(parent);
|
|
58175
|
+
links.flags &= ~268435456;
|
|
58176
|
+
if (parentType && parentType.flags & 1048576 && !(parent.kind === 163 && isSymbolAssigned(symbol))) {
|
|
58177
|
+
var pattern = declaration.parent;
|
|
58178
|
+
var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, undefined, location.flowNode);
|
|
58179
|
+
return getBindingElementTypeFromParentType(declaration, narrowedType);
|
|
58180
|
+
}
|
|
58181
|
+
}
|
|
58182
|
+
}
|
|
58183
|
+
}
|
|
58184
|
+
if (ts.isParameter(declaration) && !declaration.type && !declaration.initializer && !declaration.dotDotDotToken) {
|
|
58185
|
+
var func = declaration.parent;
|
|
58186
|
+
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
58187
|
+
var contextualSignature = getContextualSignature(func);
|
|
58188
|
+
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
58189
|
+
var restType = getTypeOfSymbol(contextualSignature.parameters[0]);
|
|
58190
|
+
if (restType.flags & 1048576 && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
58191
|
+
var narrowedType = getFlowTypeOfReference(func, restType, restType, undefined, location.flowNode);
|
|
58192
|
+
var index = func.parameters.indexOf(declaration) - (ts.getThisParameter(func) ? 1 : 0);
|
|
58193
|
+
return getIndexedAccessType(narrowedType, getNumberLiteralType(index));
|
|
58194
|
+
}
|
|
58174
58195
|
}
|
|
58175
58196
|
}
|
|
58176
58197
|
}
|
|
@@ -89528,7 +89549,7 @@ var ts;
|
|
|
89528
89549
|
emitPlaceholder(hint, node, snippet);
|
|
89529
89550
|
break;
|
|
89530
89551
|
case 0:
|
|
89531
|
-
emitTabStop(snippet);
|
|
89552
|
+
emitTabStop(hint, node, snippet);
|
|
89532
89553
|
break;
|
|
89533
89554
|
}
|
|
89534
89555
|
}
|
|
@@ -89537,7 +89558,9 @@ var ts;
|
|
|
89537
89558
|
pipelineEmitWithHintWorker(hint, node, false);
|
|
89538
89559
|
nonEscapingWrite("}");
|
|
89539
89560
|
}
|
|
89540
|
-
function emitTabStop(snippet) {
|
|
89561
|
+
function emitTabStop(hint, node, snippet) {
|
|
89562
|
+
ts.Debug.assert(node.kind === 235, "A tab stop cannot be attached to a node of kind " + ts.Debug.formatSyntaxKind(node.kind) + ".");
|
|
89563
|
+
ts.Debug.assert(hint !== 5, "A tab stop cannot be attached to an embedded statement.");
|
|
89541
89564
|
nonEscapingWrite("$" + snippet.order);
|
|
89542
89565
|
}
|
|
89543
89566
|
function emitIdentifier(node) {
|