@typescript-deploys/pr-build 5.5.0-pr-57465-103 → 5.5.0-pr-57465-110
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 +23 -12
- package/lib/tsserver.js +23 -12
- package/lib/typescript.js +23 -12
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240315`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -47787,6 +47787,7 @@ function createTypeChecker(host) {
|
|
|
47787
47787
|
function createNodeBuilder() {
|
|
47788
47788
|
return {
|
|
47789
47789
|
typeToTypeNode: (type, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeToTypeNodeHelper(type, context)),
|
|
47790
|
+
typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context)),
|
|
47790
47791
|
indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper(
|
|
47791
47792
|
indexInfo,
|
|
47792
47793
|
context,
|
|
@@ -48913,10 +48914,7 @@ function createTypeChecker(host) {
|
|
|
48913
48914
|
let returnTypeNode;
|
|
48914
48915
|
const typePredicate = getTypePredicateOfSignature(signature);
|
|
48915
48916
|
if (typePredicate) {
|
|
48916
|
-
|
|
48917
|
-
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
48918
|
-
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
48919
|
-
returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
48917
|
+
returnTypeNode = typePredicateToTypePredicateNodeHelper(typePredicate, context);
|
|
48920
48918
|
} else {
|
|
48921
48919
|
const returnType = getReturnTypeOfSignature(signature);
|
|
48922
48920
|
if (returnType && !(suppressAny && isTypeAny(returnType))) {
|
|
@@ -49042,6 +49040,12 @@ function createTypeChecker(host) {
|
|
|
49042
49040
|
const constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
|
|
49043
49041
|
return typeParameterToDeclarationWithConstraint(type, context, constraintNode);
|
|
49044
49042
|
}
|
|
49043
|
+
function typePredicateToTypePredicateNodeHelper(typePredicate, context) {
|
|
49044
|
+
const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0;
|
|
49045
|
+
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
49046
|
+
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
49047
|
+
return factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
49048
|
+
}
|
|
49045
49049
|
function getEffectiveParameterDeclaration(parameterSymbol) {
|
|
49046
49050
|
const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);
|
|
49047
49051
|
if (parameterDeclaration) {
|
|
@@ -51403,12 +51407,8 @@ function createTypeChecker(host) {
|
|
|
51403
51407
|
function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) {
|
|
51404
51408
|
return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker);
|
|
51405
51409
|
function typePredicateToStringWorker(writer2) {
|
|
51406
|
-
const
|
|
51407
|
-
|
|
51408
|
-
typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(),
|
|
51409
|
-
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
51410
|
-
// TODO: GH#18217
|
|
51411
|
-
);
|
|
51410
|
+
const nodeBuilderFlags = toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */;
|
|
51411
|
+
const predicate = nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, nodeBuilderFlags);
|
|
51412
51412
|
const printer = createPrinterWithRemoveComments();
|
|
51413
51413
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
51414
51414
|
printer.writeNode(
|
|
@@ -57855,6 +57855,7 @@ function createTypeChecker(host) {
|
|
|
57855
57855
|
return links.resolvedType;
|
|
57856
57856
|
}
|
|
57857
57857
|
function getTemplateLiteralType(texts, types) {
|
|
57858
|
+
var _a, _b;
|
|
57858
57859
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
57859
57860
|
if (unionIndex >= 0) {
|
|
57860
57861
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -57862,6 +57863,9 @@ function createTypeChecker(host) {
|
|
|
57862
57863
|
if (contains(types, wildcardType)) {
|
|
57863
57864
|
return wildcardType;
|
|
57864
57865
|
}
|
|
57866
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
57867
|
+
return types[0];
|
|
57868
|
+
}
|
|
57865
57869
|
const newTypes = [];
|
|
57866
57870
|
const newTexts = [];
|
|
57867
57871
|
let text = texts[0];
|
|
@@ -71514,7 +71518,10 @@ function createTypeChecker(host) {
|
|
|
71514
71518
|
return Debug.fail();
|
|
71515
71519
|
}
|
|
71516
71520
|
function getDecoratorArgumentCount(node, signature) {
|
|
71517
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
71521
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
71522
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
71523
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
71524
|
+
);
|
|
71518
71525
|
}
|
|
71519
71526
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
71520
71527
|
switch (node.parent.kind) {
|
|
@@ -82922,6 +82929,10 @@ function createTypeChecker(host) {
|
|
|
82922
82929
|
return factory.createToken(133 /* AnyKeyword */);
|
|
82923
82930
|
}
|
|
82924
82931
|
const signature = getSignatureFromDeclaration(signatureDeclaration);
|
|
82932
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
82933
|
+
if (typePredicate) {
|
|
82934
|
+
return nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
82935
|
+
}
|
|
82925
82936
|
return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
82926
82937
|
}
|
|
82927
82938
|
function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.5";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20240315`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -52540,6 +52540,7 @@ function createTypeChecker(host) {
|
|
|
52540
52540
|
function createNodeBuilder() {
|
|
52541
52541
|
return {
|
|
52542
52542
|
typeToTypeNode: (type, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeToTypeNodeHelper(type, context)),
|
|
52543
|
+
typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context)),
|
|
52543
52544
|
indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper(
|
|
52544
52545
|
indexInfo,
|
|
52545
52546
|
context,
|
|
@@ -53666,10 +53667,7 @@ function createTypeChecker(host) {
|
|
|
53666
53667
|
let returnTypeNode;
|
|
53667
53668
|
const typePredicate = getTypePredicateOfSignature(signature);
|
|
53668
53669
|
if (typePredicate) {
|
|
53669
|
-
|
|
53670
|
-
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
53671
|
-
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
53672
|
-
returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
53670
|
+
returnTypeNode = typePredicateToTypePredicateNodeHelper(typePredicate, context);
|
|
53673
53671
|
} else {
|
|
53674
53672
|
const returnType = getReturnTypeOfSignature(signature);
|
|
53675
53673
|
if (returnType && !(suppressAny && isTypeAny(returnType))) {
|
|
@@ -53795,6 +53793,12 @@ function createTypeChecker(host) {
|
|
|
53795
53793
|
const constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
|
|
53796
53794
|
return typeParameterToDeclarationWithConstraint(type, context, constraintNode);
|
|
53797
53795
|
}
|
|
53796
|
+
function typePredicateToTypePredicateNodeHelper(typePredicate, context) {
|
|
53797
|
+
const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0;
|
|
53798
|
+
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
53799
|
+
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
53800
|
+
return factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
53801
|
+
}
|
|
53798
53802
|
function getEffectiveParameterDeclaration(parameterSymbol) {
|
|
53799
53803
|
const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);
|
|
53800
53804
|
if (parameterDeclaration) {
|
|
@@ -56156,12 +56160,8 @@ function createTypeChecker(host) {
|
|
|
56156
56160
|
function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) {
|
|
56157
56161
|
return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker);
|
|
56158
56162
|
function typePredicateToStringWorker(writer2) {
|
|
56159
|
-
const
|
|
56160
|
-
|
|
56161
|
-
typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(),
|
|
56162
|
-
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
56163
|
-
// TODO: GH#18217
|
|
56164
|
-
);
|
|
56163
|
+
const nodeBuilderFlags = toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */;
|
|
56164
|
+
const predicate = nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, nodeBuilderFlags);
|
|
56165
56165
|
const printer = createPrinterWithRemoveComments();
|
|
56166
56166
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
56167
56167
|
printer.writeNode(
|
|
@@ -62608,6 +62608,7 @@ function createTypeChecker(host) {
|
|
|
62608
62608
|
return links.resolvedType;
|
|
62609
62609
|
}
|
|
62610
62610
|
function getTemplateLiteralType(texts, types) {
|
|
62611
|
+
var _a, _b;
|
|
62611
62612
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
62612
62613
|
if (unionIndex >= 0) {
|
|
62613
62614
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -62615,6 +62616,9 @@ function createTypeChecker(host) {
|
|
|
62615
62616
|
if (contains(types, wildcardType)) {
|
|
62616
62617
|
return wildcardType;
|
|
62617
62618
|
}
|
|
62619
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
62620
|
+
return types[0];
|
|
62621
|
+
}
|
|
62618
62622
|
const newTypes = [];
|
|
62619
62623
|
const newTexts = [];
|
|
62620
62624
|
let text = texts[0];
|
|
@@ -76267,7 +76271,10 @@ function createTypeChecker(host) {
|
|
|
76267
76271
|
return Debug.fail();
|
|
76268
76272
|
}
|
|
76269
76273
|
function getDecoratorArgumentCount(node, signature) {
|
|
76270
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
76274
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
76275
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
76276
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
76277
|
+
);
|
|
76271
76278
|
}
|
|
76272
76279
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
76273
76280
|
switch (node.parent.kind) {
|
|
@@ -87675,6 +87682,10 @@ function createTypeChecker(host) {
|
|
|
87675
87682
|
return factory.createToken(133 /* AnyKeyword */);
|
|
87676
87683
|
}
|
|
87677
87684
|
const signature = getSignatureFromDeclaration(signatureDeclaration);
|
|
87685
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
87686
|
+
if (typePredicate) {
|
|
87687
|
+
return nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
87688
|
+
}
|
|
87678
87689
|
return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
87679
87690
|
}
|
|
87680
87691
|
function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) {
|
package/lib/typescript.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.5";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20240315`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -52540,6 +52540,7 @@ function createTypeChecker(host) {
|
|
|
52540
52540
|
function createNodeBuilder() {
|
|
52541
52541
|
return {
|
|
52542
52542
|
typeToTypeNode: (type, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeToTypeNodeHelper(type, context)),
|
|
52543
|
+
typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context)),
|
|
52543
52544
|
indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper(
|
|
52544
52545
|
indexInfo,
|
|
52545
52546
|
context,
|
|
@@ -53666,10 +53667,7 @@ function createTypeChecker(host) {
|
|
|
53666
53667
|
let returnTypeNode;
|
|
53667
53668
|
const typePredicate = getTypePredicateOfSignature(signature);
|
|
53668
53669
|
if (typePredicate) {
|
|
53669
|
-
|
|
53670
|
-
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
53671
|
-
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
53672
|
-
returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
53670
|
+
returnTypeNode = typePredicateToTypePredicateNodeHelper(typePredicate, context);
|
|
53673
53671
|
} else {
|
|
53674
53672
|
const returnType = getReturnTypeOfSignature(signature);
|
|
53675
53673
|
if (returnType && !(suppressAny && isTypeAny(returnType))) {
|
|
@@ -53795,6 +53793,12 @@ function createTypeChecker(host) {
|
|
|
53795
53793
|
const constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
|
|
53796
53794
|
return typeParameterToDeclarationWithConstraint(type, context, constraintNode);
|
|
53797
53795
|
}
|
|
53796
|
+
function typePredicateToTypePredicateNodeHelper(typePredicate, context) {
|
|
53797
|
+
const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0;
|
|
53798
|
+
const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();
|
|
53799
|
+
const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);
|
|
53800
|
+
return factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);
|
|
53801
|
+
}
|
|
53798
53802
|
function getEffectiveParameterDeclaration(parameterSymbol) {
|
|
53799
53803
|
const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);
|
|
53800
53804
|
if (parameterDeclaration) {
|
|
@@ -56156,12 +56160,8 @@ function createTypeChecker(host) {
|
|
|
56156
56160
|
function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) {
|
|
56157
56161
|
return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker);
|
|
56158
56162
|
function typePredicateToStringWorker(writer2) {
|
|
56159
|
-
const
|
|
56160
|
-
|
|
56161
|
-
typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(),
|
|
56162
|
-
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
56163
|
-
// TODO: GH#18217
|
|
56164
|
-
);
|
|
56163
|
+
const nodeBuilderFlags = toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */;
|
|
56164
|
+
const predicate = nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, nodeBuilderFlags);
|
|
56165
56165
|
const printer = createPrinterWithRemoveComments();
|
|
56166
56166
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
56167
56167
|
printer.writeNode(
|
|
@@ -62608,6 +62608,7 @@ function createTypeChecker(host) {
|
|
|
62608
62608
|
return links.resolvedType;
|
|
62609
62609
|
}
|
|
62610
62610
|
function getTemplateLiteralType(texts, types) {
|
|
62611
|
+
var _a, _b;
|
|
62611
62612
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
62612
62613
|
if (unionIndex >= 0) {
|
|
62613
62614
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -62615,6 +62616,9 @@ function createTypeChecker(host) {
|
|
|
62615
62616
|
if (contains(types, wildcardType)) {
|
|
62616
62617
|
return wildcardType;
|
|
62617
62618
|
}
|
|
62619
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
62620
|
+
return types[0];
|
|
62621
|
+
}
|
|
62618
62622
|
const newTypes = [];
|
|
62619
62623
|
const newTexts = [];
|
|
62620
62624
|
let text = texts[0];
|
|
@@ -76267,7 +76271,10 @@ function createTypeChecker(host) {
|
|
|
76267
76271
|
return Debug.fail();
|
|
76268
76272
|
}
|
|
76269
76273
|
function getDecoratorArgumentCount(node, signature) {
|
|
76270
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
76274
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
76275
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
76276
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
76277
|
+
);
|
|
76271
76278
|
}
|
|
76272
76279
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
76273
76280
|
switch (node.parent.kind) {
|
|
@@ -87675,6 +87682,10 @@ function createTypeChecker(host) {
|
|
|
87675
87682
|
return factory.createToken(133 /* AnyKeyword */);
|
|
87676
87683
|
}
|
|
87677
87684
|
const signature = getSignatureFromDeclaration(signatureDeclaration);
|
|
87685
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
87686
|
+
if (typePredicate) {
|
|
87687
|
+
return nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
87688
|
+
}
|
|
87678
87689
|
return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker);
|
|
87679
87690
|
}
|
|
87680
87691
|
function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) {
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.5";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240315`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-pr-57465-
|
|
5
|
+
"version": "5.5.0-pr-57465-110",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "01415c5cd4c5e5a3e6a73d00dd2fd7061aa8cf0c"
|
|
117
117
|
}
|