typescript 4.4.1-rc → 4.4.2
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.dom.d.ts +6 -2
- package/lib/protocol.d.ts +2 -6
- package/lib/tsc.js +7 -6
- package/lib/tsserver.js +23 -24
- package/lib/tsserverlibrary.d.ts +3 -7
- package/lib/tsserverlibrary.js +23 -24
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +23 -18
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +23 -18
- package/lib/typingsInstaller.js +8 -6
- package/package.json +1 -1
package/lib/lib.dom.d.ts
CHANGED
|
@@ -6400,6 +6400,12 @@ interface HTMLDocument extends Document {
|
|
|
6400
6400
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
6401
6401
|
}
|
|
6402
6402
|
|
|
6403
|
+
/** @deprecated */
|
|
6404
|
+
declare var HTMLDocument: {
|
|
6405
|
+
prototype: HTMLDocument;
|
|
6406
|
+
new(): HTMLDocument;
|
|
6407
|
+
};
|
|
6408
|
+
|
|
6403
6409
|
interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
|
|
6404
6410
|
}
|
|
6405
6411
|
|
|
@@ -17201,7 +17207,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
|
|
|
17201
17207
|
|
|
17202
17208
|
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
|
|
17203
17209
|
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
|
|
17204
|
-
HTMLDocument: Document;
|
|
17205
17210
|
/** @deprecated This is a legacy alias of `navigator`. */
|
|
17206
17211
|
readonly clientInformation: Navigator;
|
|
17207
17212
|
/**
|
|
@@ -18266,7 +18271,6 @@ declare var Image: {
|
|
|
18266
18271
|
declare var Option: {
|
|
18267
18272
|
new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
|
|
18268
18273
|
};
|
|
18269
|
-
declare var HTMLDocument: Document;
|
|
18270
18274
|
/** @deprecated This is a legacy alias of `navigator`. */
|
|
18271
18275
|
declare var clientInformation: Navigator;
|
|
18272
18276
|
/**
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1954,11 +1954,7 @@ declare namespace ts.server.protocol {
|
|
|
1954
1954
|
interface SignatureHelpResponse extends Response {
|
|
1955
1955
|
body?: SignatureHelpItems;
|
|
1956
1956
|
}
|
|
1957
|
-
|
|
1958
|
-
Type = "Type",
|
|
1959
|
-
Parameter = "Parameter",
|
|
1960
|
-
Enum = "Enum"
|
|
1961
|
-
}
|
|
1957
|
+
type InlayHintKind = "Type" | "Parameter" | "Enum";
|
|
1962
1958
|
interface InlayHintsRequestArgs extends FileRequestArgs {
|
|
1963
1959
|
/**
|
|
1964
1960
|
* Start position of the span.
|
|
@@ -1976,7 +1972,7 @@ declare namespace ts.server.protocol {
|
|
|
1976
1972
|
interface InlayHintItem {
|
|
1977
1973
|
text: string;
|
|
1978
1974
|
position: Location;
|
|
1979
|
-
kind
|
|
1975
|
+
kind: InlayHintKind;
|
|
1980
1976
|
whitespaceBefore?: boolean;
|
|
1981
1977
|
whitespaceAfter?: boolean;
|
|
1982
1978
|
}
|
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.4";
|
|
72
|
-
ts.version = "4.4.
|
|
72
|
+
ts.version = "4.4.2";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -16439,6 +16439,10 @@ var ts;
|
|
|
16439
16439
|
return false;
|
|
16440
16440
|
}
|
|
16441
16441
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
16442
|
+
function isInfinityOrNaNString(name) {
|
|
16443
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
16444
|
+
}
|
|
16445
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
16442
16446
|
})(ts || (ts = {}));
|
|
16443
16447
|
var ts;
|
|
16444
16448
|
(function (ts) {
|
|
@@ -58343,9 +58347,6 @@ var ts;
|
|
|
58343
58347
|
function isNumericComputedName(name) {
|
|
58344
58348
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296);
|
|
58345
58349
|
}
|
|
58346
|
-
function isInfinityOrNaNString(name) {
|
|
58347
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
58348
|
-
}
|
|
58349
58350
|
function isNumericLiteralName(name) {
|
|
58350
58351
|
return (+name).toString() === name;
|
|
58351
58352
|
}
|
|
@@ -67453,7 +67454,7 @@ var ts;
|
|
|
67453
67454
|
}
|
|
67454
67455
|
else {
|
|
67455
67456
|
var text = ts.getTextOfPropertyName(member.name);
|
|
67456
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
67457
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
67457
67458
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
67458
67459
|
}
|
|
67459
67460
|
}
|
|
@@ -67546,7 +67547,7 @@ var ts;
|
|
|
67546
67547
|
return evaluate(expr.expression);
|
|
67547
67548
|
case 79:
|
|
67548
67549
|
var identifier = expr;
|
|
67549
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
67550
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
67550
67551
|
return +(identifier.escapedText);
|
|
67551
67552
|
}
|
|
67552
67553
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = "4.4.
|
|
103
|
+
ts.version = "4.4.2";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -20671,6 +20671,11 @@ var ts;
|
|
|
20671
20671
|
return false;
|
|
20672
20672
|
}
|
|
20673
20673
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
20674
|
+
/* @internal */
|
|
20675
|
+
function isInfinityOrNaNString(name) {
|
|
20676
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
20677
|
+
}
|
|
20678
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
20674
20679
|
})(ts || (ts = {}));
|
|
20675
20680
|
/* @internal */
|
|
20676
20681
|
var ts;
|
|
@@ -69868,9 +69873,6 @@ var ts;
|
|
|
69868
69873
|
// but this behavior is consistent with checkIndexedAccess
|
|
69869
69874
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
|
|
69870
69875
|
}
|
|
69871
|
-
function isInfinityOrNaNString(name) {
|
|
69872
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
69873
|
-
}
|
|
69874
69876
|
function isNumericLiteralName(name) {
|
|
69875
69877
|
// The intent of numeric names is that
|
|
69876
69878
|
// - they are names with text in a numeric form, and that
|
|
@@ -80543,7 +80545,7 @@ var ts;
|
|
|
80543
80545
|
}
|
|
80544
80546
|
else {
|
|
80545
80547
|
var text = ts.getTextOfPropertyName(member.name);
|
|
80546
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
80548
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
80547
80549
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80548
80550
|
}
|
|
80549
80551
|
}
|
|
@@ -80643,7 +80645,7 @@ var ts;
|
|
|
80643
80645
|
return evaluate(expr.expression);
|
|
80644
80646
|
case 79 /* Identifier */:
|
|
80645
80647
|
var identifier = expr;
|
|
80646
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
80648
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
80647
80649
|
return +(identifier.escapedText);
|
|
80648
80650
|
}
|
|
80649
80651
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
|
@@ -124907,7 +124909,7 @@ var ts;
|
|
|
124907
124909
|
if (ts.isJsxExpression(node)) {
|
|
124908
124910
|
inJSXElement = false;
|
|
124909
124911
|
}
|
|
124910
|
-
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
|
|
124912
|
+
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
|
|
124911
124913
|
var symbol = typeChecker.getSymbolAtLocation(node);
|
|
124912
124914
|
if (symbol) {
|
|
124913
124915
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
@@ -125039,9 +125041,6 @@ var ts;
|
|
|
125039
125041
|
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
|
|
125040
125042
|
return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
|
|
125041
125043
|
}
|
|
125042
|
-
function isInfinityOrNaNString(name) {
|
|
125043
|
-
return name === "Infinity" || name === "NaN";
|
|
125044
|
-
}
|
|
125045
125044
|
var tokenFromDeclarationMapping = new ts.Map([
|
|
125046
125045
|
[252 /* VariableDeclaration */, 7 /* variable */],
|
|
125047
125046
|
[162 /* Parameter */, 6 /* parameter */],
|
|
@@ -137104,7 +137103,7 @@ var ts;
|
|
|
137104
137103
|
for (var i = 0; i < args.length; ++i) {
|
|
137105
137104
|
var originalArg = args[i];
|
|
137106
137105
|
var arg = ts.skipParentheses(originalArg);
|
|
137107
|
-
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !
|
|
137106
|
+
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
137108
137107
|
continue;
|
|
137109
137108
|
}
|
|
137110
137109
|
var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
|
|
@@ -137142,17 +137141,20 @@ var ts;
|
|
|
137142
137141
|
var regex = leadingParameterNameCommentRegexFactory(name);
|
|
137143
137142
|
return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
|
|
137144
137143
|
}
|
|
137145
|
-
function
|
|
137144
|
+
function isHintableLiteral(node) {
|
|
137146
137145
|
switch (node.kind) {
|
|
137147
|
-
case 217 /* PrefixUnaryExpression */:
|
|
137148
|
-
|
|
137146
|
+
case 217 /* PrefixUnaryExpression */: {
|
|
137147
|
+
var operand = node.operand;
|
|
137148
|
+
return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
|
|
137149
|
+
}
|
|
137149
137150
|
case 110 /* TrueKeyword */:
|
|
137150
137151
|
case 95 /* FalseKeyword */:
|
|
137151
|
-
case
|
|
137152
|
-
case 211 /* FunctionExpression */:
|
|
137153
|
-
case 203 /* ObjectLiteralExpression */:
|
|
137154
|
-
case 202 /* ArrayLiteralExpression */:
|
|
137152
|
+
case 104 /* NullKeyword */:
|
|
137155
137153
|
return true;
|
|
137154
|
+
case 79 /* Identifier */: {
|
|
137155
|
+
var name = node.escapedText;
|
|
137156
|
+
return isUndefined(name) || ts.isInfinityOrNaNString(name);
|
|
137157
|
+
}
|
|
137156
137158
|
}
|
|
137157
137159
|
return ts.isLiteralExpression(node);
|
|
137158
137160
|
}
|
|
@@ -137232,6 +137234,9 @@ var ts;
|
|
|
137232
137234
|
printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
|
|
137233
137235
|
});
|
|
137234
137236
|
}
|
|
137237
|
+
function isUndefined(name) {
|
|
137238
|
+
return name === "undefined";
|
|
137239
|
+
}
|
|
137235
137240
|
}
|
|
137236
137241
|
InlayHints.provideInlayHints = provideInlayHints;
|
|
137237
137242
|
})(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
|
|
@@ -160088,12 +160093,6 @@ var ts;
|
|
|
160088
160093
|
/** Completion was re-triggered as the current completion list is incomplete. */
|
|
160089
160094
|
CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
160090
160095
|
})(CompletionTriggerKind = protocol.CompletionTriggerKind || (protocol.CompletionTriggerKind = {}));
|
|
160091
|
-
var InlayHintKind;
|
|
160092
|
-
(function (InlayHintKind) {
|
|
160093
|
-
InlayHintKind["Type"] = "Type";
|
|
160094
|
-
InlayHintKind["Parameter"] = "Parameter";
|
|
160095
|
-
InlayHintKind["Enum"] = "Enum";
|
|
160096
|
-
})(InlayHintKind = protocol.InlayHintKind || (protocol.InlayHintKind = {}));
|
|
160097
160096
|
var IndentStyle;
|
|
160098
160097
|
(function (IndentStyle) {
|
|
160099
160098
|
IndentStyle["None"] = "None";
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -5886,7 +5886,7 @@ declare namespace ts {
|
|
|
5886
5886
|
interface InlayHint {
|
|
5887
5887
|
text: string;
|
|
5888
5888
|
position: number;
|
|
5889
|
-
kind
|
|
5889
|
+
kind: InlayHintKind;
|
|
5890
5890
|
whitespaceBefore?: boolean;
|
|
5891
5891
|
whitespaceAfter?: boolean;
|
|
5892
5892
|
}
|
|
@@ -8739,11 +8739,7 @@ declare namespace ts.server.protocol {
|
|
|
8739
8739
|
interface SignatureHelpResponse extends Response {
|
|
8740
8740
|
body?: SignatureHelpItems;
|
|
8741
8741
|
}
|
|
8742
|
-
|
|
8743
|
-
Type = "Type",
|
|
8744
|
-
Parameter = "Parameter",
|
|
8745
|
-
Enum = "Enum"
|
|
8746
|
-
}
|
|
8742
|
+
type InlayHintKind = "Type" | "Parameter" | "Enum";
|
|
8747
8743
|
interface InlayHintsRequestArgs extends FileRequestArgs {
|
|
8748
8744
|
/**
|
|
8749
8745
|
* Start position of the span.
|
|
@@ -8761,7 +8757,7 @@ declare namespace ts.server.protocol {
|
|
|
8761
8757
|
interface InlayHintItem {
|
|
8762
8758
|
text: string;
|
|
8763
8759
|
position: Location;
|
|
8764
|
-
kind
|
|
8760
|
+
kind: InlayHintKind;
|
|
8765
8761
|
whitespaceBefore?: boolean;
|
|
8766
8762
|
whitespaceAfter?: boolean;
|
|
8767
8763
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "4.4.
|
|
297
|
+
ts.version = "4.4.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -20865,6 +20865,11 @@ var ts;
|
|
|
20865
20865
|
return false;
|
|
20866
20866
|
}
|
|
20867
20867
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
20868
|
+
/* @internal */
|
|
20869
|
+
function isInfinityOrNaNString(name) {
|
|
20870
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
20871
|
+
}
|
|
20872
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
20868
20873
|
})(ts || (ts = {}));
|
|
20869
20874
|
/* @internal */
|
|
20870
20875
|
var ts;
|
|
@@ -70062,9 +70067,6 @@ var ts;
|
|
|
70062
70067
|
// but this behavior is consistent with checkIndexedAccess
|
|
70063
70068
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
|
|
70064
70069
|
}
|
|
70065
|
-
function isInfinityOrNaNString(name) {
|
|
70066
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
70067
|
-
}
|
|
70068
70070
|
function isNumericLiteralName(name) {
|
|
70069
70071
|
// The intent of numeric names is that
|
|
70070
70072
|
// - they are names with text in a numeric form, and that
|
|
@@ -80737,7 +80739,7 @@ var ts;
|
|
|
80737
80739
|
}
|
|
80738
80740
|
else {
|
|
80739
80741
|
var text = ts.getTextOfPropertyName(member.name);
|
|
80740
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
80742
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
80741
80743
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80742
80744
|
}
|
|
80743
80745
|
}
|
|
@@ -80837,7 +80839,7 @@ var ts;
|
|
|
80837
80839
|
return evaluate(expr.expression);
|
|
80838
80840
|
case 79 /* Identifier */:
|
|
80839
80841
|
var identifier = expr;
|
|
80840
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
80842
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
80841
80843
|
return +(identifier.escapedText);
|
|
80842
80844
|
}
|
|
80843
80845
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
|
@@ -125489,7 +125491,7 @@ var ts;
|
|
|
125489
125491
|
if (ts.isJsxExpression(node)) {
|
|
125490
125492
|
inJSXElement = false;
|
|
125491
125493
|
}
|
|
125492
|
-
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
|
|
125494
|
+
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
|
|
125493
125495
|
var symbol = typeChecker.getSymbolAtLocation(node);
|
|
125494
125496
|
if (symbol) {
|
|
125495
125497
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
@@ -125621,9 +125623,6 @@ var ts;
|
|
|
125621
125623
|
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
|
|
125622
125624
|
return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
|
|
125623
125625
|
}
|
|
125624
|
-
function isInfinityOrNaNString(name) {
|
|
125625
|
-
return name === "Infinity" || name === "NaN";
|
|
125626
|
-
}
|
|
125627
125626
|
var tokenFromDeclarationMapping = new ts.Map([
|
|
125628
125627
|
[252 /* VariableDeclaration */, 7 /* variable */],
|
|
125629
125628
|
[162 /* Parameter */, 6 /* parameter */],
|
|
@@ -137686,7 +137685,7 @@ var ts;
|
|
|
137686
137685
|
for (var i = 0; i < args.length; ++i) {
|
|
137687
137686
|
var originalArg = args[i];
|
|
137688
137687
|
var arg = ts.skipParentheses(originalArg);
|
|
137689
|
-
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !
|
|
137688
|
+
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
137690
137689
|
continue;
|
|
137691
137690
|
}
|
|
137692
137691
|
var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
|
|
@@ -137724,17 +137723,20 @@ var ts;
|
|
|
137724
137723
|
var regex = leadingParameterNameCommentRegexFactory(name);
|
|
137725
137724
|
return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
|
|
137726
137725
|
}
|
|
137727
|
-
function
|
|
137726
|
+
function isHintableLiteral(node) {
|
|
137728
137727
|
switch (node.kind) {
|
|
137729
|
-
case 217 /* PrefixUnaryExpression */:
|
|
137730
|
-
|
|
137728
|
+
case 217 /* PrefixUnaryExpression */: {
|
|
137729
|
+
var operand = node.operand;
|
|
137730
|
+
return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
|
|
137731
|
+
}
|
|
137731
137732
|
case 110 /* TrueKeyword */:
|
|
137732
137733
|
case 95 /* FalseKeyword */:
|
|
137733
|
-
case
|
|
137734
|
-
case 211 /* FunctionExpression */:
|
|
137735
|
-
case 203 /* ObjectLiteralExpression */:
|
|
137736
|
-
case 202 /* ArrayLiteralExpression */:
|
|
137734
|
+
case 104 /* NullKeyword */:
|
|
137737
137735
|
return true;
|
|
137736
|
+
case 79 /* Identifier */: {
|
|
137737
|
+
var name = node.escapedText;
|
|
137738
|
+
return isUndefined(name) || ts.isInfinityOrNaNString(name);
|
|
137739
|
+
}
|
|
137738
137740
|
}
|
|
137739
137741
|
return ts.isLiteralExpression(node);
|
|
137740
137742
|
}
|
|
@@ -137814,6 +137816,9 @@ var ts;
|
|
|
137814
137816
|
printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
|
|
137815
137817
|
});
|
|
137816
137818
|
}
|
|
137819
|
+
function isUndefined(name) {
|
|
137820
|
+
return name === "undefined";
|
|
137821
|
+
}
|
|
137817
137822
|
}
|
|
137818
137823
|
InlayHints.provideInlayHints = provideInlayHints;
|
|
137819
137824
|
})(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
|
|
@@ -160282,12 +160287,6 @@ var ts;
|
|
|
160282
160287
|
/** Completion was re-triggered as the current completion list is incomplete. */
|
|
160283
160288
|
CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
160284
160289
|
})(CompletionTriggerKind = protocol.CompletionTriggerKind || (protocol.CompletionTriggerKind = {}));
|
|
160285
|
-
var InlayHintKind;
|
|
160286
|
-
(function (InlayHintKind) {
|
|
160287
|
-
InlayHintKind["Type"] = "Type";
|
|
160288
|
-
InlayHintKind["Parameter"] = "Parameter";
|
|
160289
|
-
InlayHintKind["Enum"] = "Enum";
|
|
160290
|
-
})(InlayHintKind = protocol.InlayHintKind || (protocol.InlayHintKind = {}));
|
|
160291
160290
|
var IndentStyle;
|
|
160292
160291
|
(function (IndentStyle) {
|
|
160293
160292
|
IndentStyle["None"] = "None";
|
package/lib/typescript.d.ts
CHANGED
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "4.4.
|
|
297
|
+
ts.version = "4.4.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -20865,6 +20865,11 @@ var ts;
|
|
|
20865
20865
|
return false;
|
|
20866
20866
|
}
|
|
20867
20867
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
20868
|
+
/* @internal */
|
|
20869
|
+
function isInfinityOrNaNString(name) {
|
|
20870
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
20871
|
+
}
|
|
20872
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
20868
20873
|
})(ts || (ts = {}));
|
|
20869
20874
|
/* @internal */
|
|
20870
20875
|
var ts;
|
|
@@ -70062,9 +70067,6 @@ var ts;
|
|
|
70062
70067
|
// but this behavior is consistent with checkIndexedAccess
|
|
70063
70068
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
|
|
70064
70069
|
}
|
|
70065
|
-
function isInfinityOrNaNString(name) {
|
|
70066
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
70067
|
-
}
|
|
70068
70070
|
function isNumericLiteralName(name) {
|
|
70069
70071
|
// The intent of numeric names is that
|
|
70070
70072
|
// - they are names with text in a numeric form, and that
|
|
@@ -80737,7 +80739,7 @@ var ts;
|
|
|
80737
80739
|
}
|
|
80738
80740
|
else {
|
|
80739
80741
|
var text = ts.getTextOfPropertyName(member.name);
|
|
80740
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
80742
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
80741
80743
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80742
80744
|
}
|
|
80743
80745
|
}
|
|
@@ -80837,7 +80839,7 @@ var ts;
|
|
|
80837
80839
|
return evaluate(expr.expression);
|
|
80838
80840
|
case 79 /* Identifier */:
|
|
80839
80841
|
var identifier = expr;
|
|
80840
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
80842
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
80841
80843
|
return +(identifier.escapedText);
|
|
80842
80844
|
}
|
|
80843
80845
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
|
@@ -125489,7 +125491,7 @@ var ts;
|
|
|
125489
125491
|
if (ts.isJsxExpression(node)) {
|
|
125490
125492
|
inJSXElement = false;
|
|
125491
125493
|
}
|
|
125492
|
-
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
|
|
125494
|
+
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
|
|
125493
125495
|
var symbol = typeChecker.getSymbolAtLocation(node);
|
|
125494
125496
|
if (symbol) {
|
|
125495
125497
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
@@ -125621,9 +125623,6 @@ var ts;
|
|
|
125621
125623
|
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
|
|
125622
125624
|
return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
|
|
125623
125625
|
}
|
|
125624
|
-
function isInfinityOrNaNString(name) {
|
|
125625
|
-
return name === "Infinity" || name === "NaN";
|
|
125626
|
-
}
|
|
125627
125626
|
var tokenFromDeclarationMapping = new ts.Map([
|
|
125628
125627
|
[252 /* VariableDeclaration */, 7 /* variable */],
|
|
125629
125628
|
[162 /* Parameter */, 6 /* parameter */],
|
|
@@ -137686,7 +137685,7 @@ var ts;
|
|
|
137686
137685
|
for (var i = 0; i < args.length; ++i) {
|
|
137687
137686
|
var originalArg = args[i];
|
|
137688
137687
|
var arg = ts.skipParentheses(originalArg);
|
|
137689
|
-
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !
|
|
137688
|
+
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
137690
137689
|
continue;
|
|
137691
137690
|
}
|
|
137692
137691
|
var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
|
|
@@ -137724,17 +137723,20 @@ var ts;
|
|
|
137724
137723
|
var regex = leadingParameterNameCommentRegexFactory(name);
|
|
137725
137724
|
return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
|
|
137726
137725
|
}
|
|
137727
|
-
function
|
|
137726
|
+
function isHintableLiteral(node) {
|
|
137728
137727
|
switch (node.kind) {
|
|
137729
|
-
case 217 /* PrefixUnaryExpression */:
|
|
137730
|
-
|
|
137728
|
+
case 217 /* PrefixUnaryExpression */: {
|
|
137729
|
+
var operand = node.operand;
|
|
137730
|
+
return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
|
|
137731
|
+
}
|
|
137731
137732
|
case 110 /* TrueKeyword */:
|
|
137732
137733
|
case 95 /* FalseKeyword */:
|
|
137733
|
-
case
|
|
137734
|
-
case 211 /* FunctionExpression */:
|
|
137735
|
-
case 203 /* ObjectLiteralExpression */:
|
|
137736
|
-
case 202 /* ArrayLiteralExpression */:
|
|
137734
|
+
case 104 /* NullKeyword */:
|
|
137737
137735
|
return true;
|
|
137736
|
+
case 79 /* Identifier */: {
|
|
137737
|
+
var name = node.escapedText;
|
|
137738
|
+
return isUndefined(name) || ts.isInfinityOrNaNString(name);
|
|
137739
|
+
}
|
|
137738
137740
|
}
|
|
137739
137741
|
return ts.isLiteralExpression(node);
|
|
137740
137742
|
}
|
|
@@ -137814,6 +137816,9 @@ var ts;
|
|
|
137814
137816
|
printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
|
|
137815
137817
|
});
|
|
137816
137818
|
}
|
|
137819
|
+
function isUndefined(name) {
|
|
137820
|
+
return name === "undefined";
|
|
137821
|
+
}
|
|
137817
137822
|
}
|
|
137818
137823
|
InlayHints.provideInlayHints = provideInlayHints;
|
|
137819
137824
|
})(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "4.4.
|
|
297
|
+
ts.version = "4.4.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -20865,6 +20865,11 @@ var ts;
|
|
|
20865
20865
|
return false;
|
|
20866
20866
|
}
|
|
20867
20867
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
20868
|
+
/* @internal */
|
|
20869
|
+
function isInfinityOrNaNString(name) {
|
|
20870
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
20871
|
+
}
|
|
20872
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
20868
20873
|
})(ts || (ts = {}));
|
|
20869
20874
|
/* @internal */
|
|
20870
20875
|
var ts;
|
|
@@ -70062,9 +70067,6 @@ var ts;
|
|
|
70062
70067
|
// but this behavior is consistent with checkIndexedAccess
|
|
70063
70068
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
|
|
70064
70069
|
}
|
|
70065
|
-
function isInfinityOrNaNString(name) {
|
|
70066
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
70067
|
-
}
|
|
70068
70070
|
function isNumericLiteralName(name) {
|
|
70069
70071
|
// The intent of numeric names is that
|
|
70070
70072
|
// - they are names with text in a numeric form, and that
|
|
@@ -80737,7 +80739,7 @@ var ts;
|
|
|
80737
80739
|
}
|
|
80738
80740
|
else {
|
|
80739
80741
|
var text = ts.getTextOfPropertyName(member.name);
|
|
80740
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
80742
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
80741
80743
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80742
80744
|
}
|
|
80743
80745
|
}
|
|
@@ -80837,7 +80839,7 @@ var ts;
|
|
|
80837
80839
|
return evaluate(expr.expression);
|
|
80838
80840
|
case 79 /* Identifier */:
|
|
80839
80841
|
var identifier = expr;
|
|
80840
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
80842
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
80841
80843
|
return +(identifier.escapedText);
|
|
80842
80844
|
}
|
|
80843
80845
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
|
@@ -125489,7 +125491,7 @@ var ts;
|
|
|
125489
125491
|
if (ts.isJsxExpression(node)) {
|
|
125490
125492
|
inJSXElement = false;
|
|
125491
125493
|
}
|
|
125492
|
-
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
|
|
125494
|
+
if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
|
|
125493
125495
|
var symbol = typeChecker.getSymbolAtLocation(node);
|
|
125494
125496
|
if (symbol) {
|
|
125495
125497
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
@@ -125621,9 +125623,6 @@ var ts;
|
|
|
125621
125623
|
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
|
|
125622
125624
|
return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
|
|
125623
125625
|
}
|
|
125624
|
-
function isInfinityOrNaNString(name) {
|
|
125625
|
-
return name === "Infinity" || name === "NaN";
|
|
125626
|
-
}
|
|
125627
125626
|
var tokenFromDeclarationMapping = new ts.Map([
|
|
125628
125627
|
[252 /* VariableDeclaration */, 7 /* variable */],
|
|
125629
125628
|
[162 /* Parameter */, 6 /* parameter */],
|
|
@@ -137686,7 +137685,7 @@ var ts;
|
|
|
137686
137685
|
for (var i = 0; i < args.length; ++i) {
|
|
137687
137686
|
var originalArg = args[i];
|
|
137688
137687
|
var arg = ts.skipParentheses(originalArg);
|
|
137689
|
-
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !
|
|
137688
|
+
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
|
137690
137689
|
continue;
|
|
137691
137690
|
}
|
|
137692
137691
|
var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
|
|
@@ -137724,17 +137723,20 @@ var ts;
|
|
|
137724
137723
|
var regex = leadingParameterNameCommentRegexFactory(name);
|
|
137725
137724
|
return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
|
|
137726
137725
|
}
|
|
137727
|
-
function
|
|
137726
|
+
function isHintableLiteral(node) {
|
|
137728
137727
|
switch (node.kind) {
|
|
137729
|
-
case 217 /* PrefixUnaryExpression */:
|
|
137730
|
-
|
|
137728
|
+
case 217 /* PrefixUnaryExpression */: {
|
|
137729
|
+
var operand = node.operand;
|
|
137730
|
+
return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
|
|
137731
|
+
}
|
|
137731
137732
|
case 110 /* TrueKeyword */:
|
|
137732
137733
|
case 95 /* FalseKeyword */:
|
|
137733
|
-
case
|
|
137734
|
-
case 211 /* FunctionExpression */:
|
|
137735
|
-
case 203 /* ObjectLiteralExpression */:
|
|
137736
|
-
case 202 /* ArrayLiteralExpression */:
|
|
137734
|
+
case 104 /* NullKeyword */:
|
|
137737
137735
|
return true;
|
|
137736
|
+
case 79 /* Identifier */: {
|
|
137737
|
+
var name = node.escapedText;
|
|
137738
|
+
return isUndefined(name) || ts.isInfinityOrNaNString(name);
|
|
137739
|
+
}
|
|
137738
137740
|
}
|
|
137739
137741
|
return ts.isLiteralExpression(node);
|
|
137740
137742
|
}
|
|
@@ -137814,6 +137816,9 @@ var ts;
|
|
|
137814
137816
|
printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
|
|
137815
137817
|
});
|
|
137816
137818
|
}
|
|
137819
|
+
function isUndefined(name) {
|
|
137820
|
+
return name === "undefined";
|
|
137821
|
+
}
|
|
137817
137822
|
}
|
|
137818
137823
|
InlayHints.provideInlayHints = provideInlayHints;
|
|
137819
137824
|
})(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "4.4.
|
|
92
|
+
ts.version = "4.4.2";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -20660,6 +20660,11 @@ var ts;
|
|
|
20660
20660
|
return false;
|
|
20661
20661
|
}
|
|
20662
20662
|
ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
|
|
20663
|
+
/* @internal */
|
|
20664
|
+
function isInfinityOrNaNString(name) {
|
|
20665
|
+
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
20666
|
+
}
|
|
20667
|
+
ts.isInfinityOrNaNString = isInfinityOrNaNString;
|
|
20663
20668
|
})(ts || (ts = {}));
|
|
20664
20669
|
/* @internal */
|
|
20665
20670
|
var ts;
|
|
@@ -69857,9 +69862,6 @@ var ts;
|
|
|
69857
69862
|
// but this behavior is consistent with checkIndexedAccess
|
|
69858
69863
|
return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
|
|
69859
69864
|
}
|
|
69860
|
-
function isInfinityOrNaNString(name) {
|
|
69861
|
-
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
69862
|
-
}
|
|
69863
69865
|
function isNumericLiteralName(name) {
|
|
69864
69866
|
// The intent of numeric names is that
|
|
69865
69867
|
// - they are names with text in a numeric form, and that
|
|
@@ -80532,7 +80534,7 @@ var ts;
|
|
|
80532
80534
|
}
|
|
80533
80535
|
else {
|
|
80534
80536
|
var text = ts.getTextOfPropertyName(member.name);
|
|
80535
|
-
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
|
|
80537
|
+
if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
|
|
80536
80538
|
error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80537
80539
|
}
|
|
80538
80540
|
}
|
|
@@ -80632,7 +80634,7 @@ var ts;
|
|
|
80632
80634
|
return evaluate(expr.expression);
|
|
80633
80635
|
case 79 /* Identifier */:
|
|
80634
80636
|
var identifier = expr;
|
|
80635
|
-
if (isInfinityOrNaNString(identifier.escapedText)) {
|
|
80637
|
+
if (ts.isInfinityOrNaNString(identifier.escapedText)) {
|
|
80636
80638
|
return +(identifier.escapedText);
|
|
80637
80639
|
}
|
|
80638
80640
|
return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.4.
|
|
5
|
+
"version": "4.4.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|