typescript 4.9.0-dev.20220908 → 4.9.0-dev.20220911
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/tsc.js +5 -1
- package/lib/tsserver.js +13 -2
- package/lib/tsserverlibrary.js +13 -2
- package/lib/typescript.js +13 -2
- package/lib/typescriptServices.js +13 -2
- package/lib/typingsInstaller.js +7 -1
- package/package.json +2 -2
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.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -49218,6 +49218,10 @@ var ts;
|
|
|
49218
49218
|
return mapType(type, getLowerBoundOfKeyType);
|
|
49219
49219
|
}
|
|
49220
49220
|
if (type.flags & 2097152) {
|
|
49221
|
+
var types = type.types;
|
|
49222
|
+
if (types.length === 2 && !!(types[0].flags & (4 | 8 | 64)) && types[1] === emptyTypeLiteralType) {
|
|
49223
|
+
return type;
|
|
49224
|
+
}
|
|
49221
49225
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
49222
49226
|
}
|
|
49223
49227
|
return type;
|
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -59379,6 +59379,12 @@ var ts;
|
|
|
59379
59379
|
return mapType(type, getLowerBoundOfKeyType);
|
|
59380
59380
|
}
|
|
59381
59381
|
if (type.flags & 2097152 /* TypeFlags.Intersection */) {
|
|
59382
|
+
// Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
|
|
59383
|
+
// and bigint & {} intersections that are used to prevent subtype reduction in union types.
|
|
59384
|
+
var types = type.types;
|
|
59385
|
+
if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
|
|
59386
|
+
return type;
|
|
59387
|
+
}
|
|
59382
59388
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
59383
59389
|
}
|
|
59384
59390
|
return type;
|
|
@@ -148419,7 +148425,7 @@ var ts;
|
|
|
148419
148425
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
|
|
148420
148426
|
// in other cases there should be no space between '?' and next token
|
|
148421
148427
|
rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148422
|
-
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148428
|
+
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
|
|
148423
148429
|
rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148424
148430
|
rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
|
|
148425
148431
|
// Special handling of unary operators.
|
|
@@ -149089,6 +149095,11 @@ var ts;
|
|
|
149089
149095
|
function isSemicolonInsertionContext(context) {
|
|
149090
149096
|
return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
|
|
149091
149097
|
}
|
|
149098
|
+
function isNotPropertyAccessOnIntegerLiteral(context) {
|
|
149099
|
+
return !ts.isPropertyAccessExpression(context.contextNode)
|
|
149100
|
+
|| !ts.isNumericLiteral(context.contextNode.expression)
|
|
149101
|
+
|| context.contextNode.expression.getText().indexOf(".") !== -1;
|
|
149102
|
+
}
|
|
149092
149103
|
})(formatting = ts.formatting || (ts.formatting = {}));
|
|
149093
149104
|
})(ts || (ts = {}));
|
|
149094
149105
|
/* @internal */
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -108,7 +108,7 @@ var ts;
|
|
|
108
108
|
// The following is baselined as a literal template type without intervention
|
|
109
109
|
/** The version of the TypeScript compiler release */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
111
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
111
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
112
112
|
/* @internal */
|
|
113
113
|
var Comparison;
|
|
114
114
|
(function (Comparison) {
|
|
@@ -59378,6 +59378,12 @@ var ts;
|
|
|
59378
59378
|
return mapType(type, getLowerBoundOfKeyType);
|
|
59379
59379
|
}
|
|
59380
59380
|
if (type.flags & 2097152 /* TypeFlags.Intersection */) {
|
|
59381
|
+
// Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
|
|
59382
|
+
// and bigint & {} intersections that are used to prevent subtype reduction in union types.
|
|
59383
|
+
var types = type.types;
|
|
59384
|
+
if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
|
|
59385
|
+
return type;
|
|
59386
|
+
}
|
|
59381
59387
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
59382
59388
|
}
|
|
59383
59389
|
return type;
|
|
@@ -148837,7 +148843,7 @@ var ts;
|
|
|
148837
148843
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
|
|
148838
148844
|
// in other cases there should be no space between '?' and next token
|
|
148839
148845
|
rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148840
|
-
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148846
|
+
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
|
|
148841
148847
|
rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148842
148848
|
rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
|
|
148843
148849
|
// Special handling of unary operators.
|
|
@@ -149507,6 +149513,11 @@ var ts;
|
|
|
149507
149513
|
function isSemicolonInsertionContext(context) {
|
|
149508
149514
|
return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
|
|
149509
149515
|
}
|
|
149516
|
+
function isNotPropertyAccessOnIntegerLiteral(context) {
|
|
149517
|
+
return !ts.isPropertyAccessExpression(context.contextNode)
|
|
149518
|
+
|| !ts.isNumericLiteral(context.contextNode.expression)
|
|
149519
|
+
|| context.contextNode.expression.getText().indexOf(".") !== -1;
|
|
149520
|
+
}
|
|
149510
149521
|
})(formatting = ts.formatting || (ts.formatting = {}));
|
|
149511
149522
|
})(ts || (ts = {}));
|
|
149512
149523
|
/* @internal */
|
package/lib/typescript.js
CHANGED
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -59369,6 +59369,12 @@ var ts;
|
|
|
59369
59369
|
return mapType(type, getLowerBoundOfKeyType);
|
|
59370
59370
|
}
|
|
59371
59371
|
if (type.flags & 2097152 /* TypeFlags.Intersection */) {
|
|
59372
|
+
// Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
|
|
59373
|
+
// and bigint & {} intersections that are used to prevent subtype reduction in union types.
|
|
59374
|
+
var types = type.types;
|
|
59375
|
+
if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
|
|
59376
|
+
return type;
|
|
59377
|
+
}
|
|
59372
59378
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
59373
59379
|
}
|
|
59374
59380
|
return type;
|
|
@@ -148828,7 +148834,7 @@ var ts;
|
|
|
148828
148834
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
|
|
148829
148835
|
// in other cases there should be no space between '?' and next token
|
|
148830
148836
|
rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148831
|
-
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148837
|
+
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
|
|
148832
148838
|
rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148833
148839
|
rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
|
|
148834
148840
|
// Special handling of unary operators.
|
|
@@ -149498,6 +149504,11 @@ var ts;
|
|
|
149498
149504
|
function isSemicolonInsertionContext(context) {
|
|
149499
149505
|
return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
|
|
149500
149506
|
}
|
|
149507
|
+
function isNotPropertyAccessOnIntegerLiteral(context) {
|
|
149508
|
+
return !ts.isPropertyAccessExpression(context.contextNode)
|
|
149509
|
+
|| !ts.isNumericLiteral(context.contextNode.expression)
|
|
149510
|
+
|| context.contextNode.expression.getText().indexOf(".") !== -1;
|
|
149511
|
+
}
|
|
149501
149512
|
})(formatting = ts.formatting || (ts.formatting = {}));
|
|
149502
149513
|
})(ts || (ts = {}));
|
|
149503
149514
|
/* @internal */
|
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -59369,6 +59369,12 @@ var ts;
|
|
|
59369
59369
|
return mapType(type, getLowerBoundOfKeyType);
|
|
59370
59370
|
}
|
|
59371
59371
|
if (type.flags & 2097152 /* TypeFlags.Intersection */) {
|
|
59372
|
+
// Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
|
|
59373
|
+
// and bigint & {} intersections that are used to prevent subtype reduction in union types.
|
|
59374
|
+
var types = type.types;
|
|
59375
|
+
if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
|
|
59376
|
+
return type;
|
|
59377
|
+
}
|
|
59372
59378
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
59373
59379
|
}
|
|
59374
59380
|
return type;
|
|
@@ -148828,7 +148834,7 @@ var ts;
|
|
|
148828
148834
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
|
|
148829
148835
|
// in other cases there should be no space between '?' and next token
|
|
148830
148836
|
rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148831
|
-
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148837
|
+
rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
|
|
148832
148838
|
rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
|
|
148833
148839
|
rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
|
|
148834
148840
|
// Special handling of unary operators.
|
|
@@ -149498,6 +149504,11 @@ var ts;
|
|
|
149498
149504
|
function isSemicolonInsertionContext(context) {
|
|
149499
149505
|
return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
|
|
149500
149506
|
}
|
|
149507
|
+
function isNotPropertyAccessOnIntegerLiteral(context) {
|
|
149508
|
+
return !ts.isPropertyAccessExpression(context.contextNode)
|
|
149509
|
+
|| !ts.isNumericLiteral(context.contextNode.expression)
|
|
149510
|
+
|| context.contextNode.expression.getText().indexOf(".") !== -1;
|
|
149511
|
+
}
|
|
149501
149512
|
})(formatting = ts.formatting || (ts.formatting = {}));
|
|
149502
149513
|
})(ts || (ts = {}));
|
|
149503
149514
|
/* @internal */
|
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 = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220911");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -59359,6 +59359,12 @@ var ts;
|
|
|
59359
59359
|
return mapType(type, getLowerBoundOfKeyType);
|
|
59360
59360
|
}
|
|
59361
59361
|
if (type.flags & 2097152 /* TypeFlags.Intersection */) {
|
|
59362
|
+
// Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
|
|
59363
|
+
// and bigint & {} intersections that are used to prevent subtype reduction in union types.
|
|
59364
|
+
var types = type.types;
|
|
59365
|
+
if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
|
|
59366
|
+
return type;
|
|
59367
|
+
}
|
|
59362
59368
|
return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
|
|
59363
59369
|
}
|
|
59364
59370
|
return type;
|
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.9.0-dev.
|
|
5
|
+
"version": "4.9.0-dev.20220911",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"ms": "^2.1.3",
|
|
92
92
|
"node-fetch": "^2.6.7",
|
|
93
93
|
"source-map-support": "latest",
|
|
94
|
-
"typescript": "^4.8.
|
|
94
|
+
"typescript": "^4.8.3",
|
|
95
95
|
"vinyl": "latest",
|
|
96
96
|
"which": "^2.0.2",
|
|
97
97
|
"xml2js": "^0.4.23"
|