typescript 5.4.0-dev.20240112 → 5.4.0-dev.20240114
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.es5.d.ts +5 -0
- package/lib/tsc.js +102 -286
- package/lib/tsserver.js +102 -286
- package/lib/typescript.js +102 -286
- package/lib/typingsInstaller.js +3 -2
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20240114`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -50422,16 +50422,12 @@ ${lanes.join("\n")}
|
|
|
50422
50422
|
}
|
|
50423
50423
|
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
|
|
50424
50424
|
let aliasesToMakeVisible;
|
|
50425
|
-
let bindingElementToMakeVisible;
|
|
50426
50425
|
if (!every(filter(symbol.declarations, (d) => d.kind !== 80 /* Identifier */), getIsDeclarationVisible)) {
|
|
50427
50426
|
return void 0;
|
|
50428
50427
|
}
|
|
50429
|
-
return { accessibility: 0 /* Accessible */, aliasesToMakeVisible
|
|
50428
|
+
return { accessibility: 0 /* Accessible */, aliasesToMakeVisible };
|
|
50430
50429
|
function getIsDeclarationVisible(declaration) {
|
|
50431
50430
|
var _a, _b;
|
|
50432
|
-
if (isBindingElement(declaration) && findAncestor(declaration, isParameter)) {
|
|
50433
|
-
bindingElementToMakeVisible = declaration;
|
|
50434
|
-
}
|
|
50435
50431
|
if (!isDeclarationVisible(declaration)) {
|
|
50436
50432
|
const anyImportSyntax = getAnyImportSyntax(declaration);
|
|
50437
50433
|
if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export
|
|
@@ -50942,7 +50938,13 @@ ${lanes.join("\n")}
|
|
|
50942
50938
|
return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2));
|
|
50943
50939
|
}
|
|
50944
50940
|
if (type.flags & 33554432 /* Substitution */) {
|
|
50945
|
-
|
|
50941
|
+
const typeNode = typeToTypeNodeHelper(type.baseType, context);
|
|
50942
|
+
const noInferSymbol = isNoInferType(type) && getGlobalTypeSymbol(
|
|
50943
|
+
"NoInfer",
|
|
50944
|
+
/*reportErrors*/
|
|
50945
|
+
false
|
|
50946
|
+
);
|
|
50947
|
+
return noInferSymbol ? symbolToTypeNode(noInferSymbol, context, 788968 /* Type */, [typeNode]) : typeNode;
|
|
50946
50948
|
}
|
|
50947
50949
|
return Debug.fail("Should be unreachable.");
|
|
50948
50950
|
function conditionalTypeToTypeNode(type2) {
|
|
@@ -58912,8 +58914,11 @@ ${lanes.join("\n")}
|
|
|
58912
58914
|
}
|
|
58913
58915
|
function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
|
|
58914
58916
|
const type = getDeclaredTypeOfSymbol(symbol);
|
|
58915
|
-
if (type === intrinsicMarkerType
|
|
58916
|
-
|
|
58917
|
+
if (type === intrinsicMarkerType) {
|
|
58918
|
+
const typeKind = intrinsicTypeKinds.get(symbol.escapedName);
|
|
58919
|
+
if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
|
|
58920
|
+
return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
|
|
58921
|
+
}
|
|
58917
58922
|
}
|
|
58918
58923
|
const links = getSymbolLinks(symbol);
|
|
58919
58924
|
const typeParameters = links.typeParameters;
|
|
@@ -59067,10 +59072,19 @@ ${lanes.join("\n")}
|
|
|
59067
59072
|
}
|
|
59068
59073
|
return links.resolvedJSDocType;
|
|
59069
59074
|
}
|
|
59075
|
+
function getNoInferType(type) {
|
|
59076
|
+
return isNoInferTargetType(type) ? getOrCreateSubstitutionType(type, unknownType) : type;
|
|
59077
|
+
}
|
|
59078
|
+
function isNoInferTargetType(type) {
|
|
59079
|
+
return !!(type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, isNoInferTargetType) || type.flags & 33554432 /* Substitution */ && !isNoInferType(type) && isNoInferTargetType(type.baseType) || type.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(type) || type.flags & (465829888 /* Instantiable */ & ~33554432 /* Substitution */) && !isPatternLiteralType(type));
|
|
59080
|
+
}
|
|
59081
|
+
function isNoInferType(type) {
|
|
59082
|
+
return !!(type.flags & 33554432 /* Substitution */ && type.constraint.flags & 2 /* Unknown */);
|
|
59083
|
+
}
|
|
59070
59084
|
function getSubstitutionType(baseType, constraint) {
|
|
59071
|
-
|
|
59072
|
-
|
|
59073
|
-
|
|
59085
|
+
return constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */ ? baseType : getOrCreateSubstitutionType(baseType, constraint);
|
|
59086
|
+
}
|
|
59087
|
+
function getOrCreateSubstitutionType(baseType, constraint) {
|
|
59074
59088
|
const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;
|
|
59075
59089
|
const cached = substitutionTypes.get(id);
|
|
59076
59090
|
if (cached) {
|
|
@@ -59083,7 +59097,7 @@ ${lanes.join("\n")}
|
|
|
59083
59097
|
return result;
|
|
59084
59098
|
}
|
|
59085
59099
|
function getSubstitutionIntersection(substitutionType) {
|
|
59086
|
-
return getIntersectionType([substitutionType.constraint, substitutionType.baseType]);
|
|
59100
|
+
return isNoInferType(substitutionType) ? substitutionType.baseType : getIntersectionType([substitutionType.constraint, substitutionType.baseType]);
|
|
59087
59101
|
}
|
|
59088
59102
|
function isUnaryTupleTypeNode(node) {
|
|
59089
59103
|
return node.kind === 189 /* TupleType */ && node.elements.length === 1;
|
|
@@ -60612,7 +60626,7 @@ ${lanes.join("\n")}
|
|
|
60612
60626
|
}
|
|
60613
60627
|
function getIndexType(type, indexFlags = defaultIndexFlags) {
|
|
60614
60628
|
type = getReducedType(type);
|
|
60615
|
-
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
|
|
60629
|
+
return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags);
|
|
60616
60630
|
}
|
|
60617
60631
|
function getExtractStringType(type) {
|
|
60618
60632
|
if (keyofStringsOnly) {
|
|
@@ -62355,6 +62369,9 @@ ${lanes.join("\n")}
|
|
|
62355
62369
|
}
|
|
62356
62370
|
if (flags & 33554432 /* Substitution */) {
|
|
62357
62371
|
const newBaseType = instantiateType(type.baseType, mapper);
|
|
62372
|
+
if (isNoInferType(type)) {
|
|
62373
|
+
return getNoInferType(newBaseType);
|
|
62374
|
+
}
|
|
62358
62375
|
const newConstraint = instantiateType(type.constraint, mapper);
|
|
62359
62376
|
if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) {
|
|
62360
62377
|
return getSubstitutionType(newBaseType, newConstraint);
|
|
@@ -67147,7 +67164,7 @@ ${lanes.join("\n")}
|
|
|
67147
67164
|
let expandingFlags = 0 /* None */;
|
|
67148
67165
|
inferFromTypes(originalSource, originalTarget);
|
|
67149
67166
|
function inferFromTypes(source, target) {
|
|
67150
|
-
if (!couldContainTypeVariables(target)) {
|
|
67167
|
+
if (!couldContainTypeVariables(target) || isNoInferType(target)) {
|
|
67151
67168
|
return;
|
|
67152
67169
|
}
|
|
67153
67170
|
if (source === wildcardType || source === blockedStringType) {
|
|
@@ -67196,6 +67213,9 @@ ${lanes.join("\n")}
|
|
|
67196
67213
|
}
|
|
67197
67214
|
}
|
|
67198
67215
|
if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) {
|
|
67216
|
+
if (isNoInferType(target)) {
|
|
67217
|
+
return;
|
|
67218
|
+
}
|
|
67199
67219
|
target = getActualTypeVariable(target);
|
|
67200
67220
|
}
|
|
67201
67221
|
if (target.flags & 8650752 /* TypeVariable */) {
|
|
@@ -87971,7 +87991,8 @@ ${lanes.join("\n")}
|
|
|
87971
87991
|
Uppercase: 0 /* Uppercase */,
|
|
87972
87992
|
Lowercase: 1 /* Lowercase */,
|
|
87973
87993
|
Capitalize: 2 /* Capitalize */,
|
|
87974
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
87994
|
+
Uncapitalize: 3 /* Uncapitalize */,
|
|
87995
|
+
NoInfer: 4 /* NoInfer */
|
|
87975
87996
|
}));
|
|
87976
87997
|
SymbolLinks = class {
|
|
87977
87998
|
};
|
|
@@ -111469,7 +111490,6 @@ ${lanes.join("\n")}
|
|
|
111469
111490
|
let lateStatementReplacementMap;
|
|
111470
111491
|
let suppressNewDiagnosticContexts;
|
|
111471
111492
|
let exportedModulesFromDeclarationEmit;
|
|
111472
|
-
const usedBindingElementAliases = /* @__PURE__ */ new Map();
|
|
111473
111493
|
const { factory: factory2 } = context;
|
|
111474
111494
|
const host = context.getEmitHost();
|
|
111475
111495
|
const symbolTracker = {
|
|
@@ -111535,17 +111555,6 @@ ${lanes.join("\n")}
|
|
|
111535
111555
|
}
|
|
111536
111556
|
}
|
|
111537
111557
|
}
|
|
111538
|
-
if (symbolAccessibilityResult.bindingElementToMakeVisible) {
|
|
111539
|
-
const bindingElement = symbolAccessibilityResult.bindingElementToMakeVisible;
|
|
111540
|
-
const parameter = findAncestor(bindingElement, isParameter);
|
|
111541
|
-
Debug.assert(parameter !== void 0);
|
|
111542
|
-
const parent2 = getOriginalNode(parameter.parent);
|
|
111543
|
-
let aliases = usedBindingElementAliases.get(parent2);
|
|
111544
|
-
if (!aliases) {
|
|
111545
|
-
usedBindingElementAliases.set(parent2, aliases = /* @__PURE__ */ new Map());
|
|
111546
|
-
}
|
|
111547
|
-
aliases.set(getOriginalNode(bindingElement), bindingElement.name);
|
|
111548
|
-
}
|
|
111549
111558
|
} else {
|
|
111550
111559
|
const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult);
|
|
111551
111560
|
if (errorInfo) {
|
|
@@ -111878,7 +111887,7 @@ ${lanes.join("\n")}
|
|
|
111878
111887
|
});
|
|
111879
111888
|
return ret;
|
|
111880
111889
|
}
|
|
111881
|
-
function
|
|
111890
|
+
function filterBindingPatternInitializers(name) {
|
|
111882
111891
|
if (name.kind === 80 /* Identifier */) {
|
|
111883
111892
|
return name;
|
|
111884
111893
|
} else {
|
|
@@ -111895,180 +111904,15 @@ ${lanes.join("\n")}
|
|
|
111895
111904
|
if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) {
|
|
111896
111905
|
checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration);
|
|
111897
111906
|
}
|
|
111898
|
-
if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !isIdentifierANonContextualKeyword(elem.propertyName)) {
|
|
111899
|
-
return factory2.updateBindingElement(
|
|
111900
|
-
elem,
|
|
111901
|
-
elem.dotDotDotToken,
|
|
111902
|
-
/*propertyName*/
|
|
111903
|
-
void 0,
|
|
111904
|
-
elem.propertyName,
|
|
111905
|
-
shouldPrintWithInitializer(elem) ? elem.initializer : void 0
|
|
111906
|
-
);
|
|
111907
|
-
}
|
|
111908
111907
|
return factory2.updateBindingElement(
|
|
111909
111908
|
elem,
|
|
111910
111909
|
elem.dotDotDotToken,
|
|
111911
111910
|
elem.propertyName,
|
|
111912
|
-
|
|
111911
|
+
filterBindingPatternInitializers(elem.name),
|
|
111913
111912
|
shouldPrintWithInitializer(elem) ? elem.initializer : void 0
|
|
111914
111913
|
);
|
|
111915
111914
|
}
|
|
111916
111915
|
}
|
|
111917
|
-
function ensureBindingAliasesInParameterList(input, updatedNode) {
|
|
111918
|
-
const original = getOriginalNode(input);
|
|
111919
|
-
const params = updatedNode.parameters;
|
|
111920
|
-
const aliases = usedBindingElementAliases.get(original);
|
|
111921
|
-
if (!aliases) {
|
|
111922
|
-
return updatedNode;
|
|
111923
|
-
}
|
|
111924
|
-
usedBindingElementAliases.delete(original);
|
|
111925
|
-
const newParams = map(params, addUsedBindingPatternsToParameter);
|
|
111926
|
-
const newParamsNodeArray = factory2.createNodeArray(newParams, params.hasTrailingComma);
|
|
111927
|
-
switch (updatedNode.kind) {
|
|
111928
|
-
case 174 /* MethodDeclaration */:
|
|
111929
|
-
return factory2.updateMethodDeclaration(
|
|
111930
|
-
updatedNode,
|
|
111931
|
-
updatedNode.modifiers,
|
|
111932
|
-
updatedNode.asteriskToken,
|
|
111933
|
-
updatedNode.name,
|
|
111934
|
-
updatedNode.questionToken,
|
|
111935
|
-
updatedNode.typeParameters,
|
|
111936
|
-
newParamsNodeArray,
|
|
111937
|
-
updatedNode.type,
|
|
111938
|
-
updatedNode.body
|
|
111939
|
-
);
|
|
111940
|
-
case 176 /* Constructor */:
|
|
111941
|
-
return factory2.updateConstructorDeclaration(
|
|
111942
|
-
updatedNode,
|
|
111943
|
-
updatedNode.modifiers,
|
|
111944
|
-
newParamsNodeArray,
|
|
111945
|
-
updatedNode.body
|
|
111946
|
-
);
|
|
111947
|
-
case 177 /* GetAccessor */:
|
|
111948
|
-
return factory2.updateGetAccessorDeclaration(
|
|
111949
|
-
updatedNode,
|
|
111950
|
-
updatedNode.modifiers,
|
|
111951
|
-
updatedNode.name,
|
|
111952
|
-
newParamsNodeArray,
|
|
111953
|
-
updatedNode.type,
|
|
111954
|
-
updatedNode.body
|
|
111955
|
-
);
|
|
111956
|
-
case 178 /* SetAccessor */:
|
|
111957
|
-
return factory2.updateSetAccessorDeclaration(
|
|
111958
|
-
updatedNode,
|
|
111959
|
-
updatedNode.modifiers,
|
|
111960
|
-
updatedNode.name,
|
|
111961
|
-
newParamsNodeArray,
|
|
111962
|
-
updatedNode.body
|
|
111963
|
-
);
|
|
111964
|
-
case 219 /* ArrowFunction */:
|
|
111965
|
-
return factory2.updateArrowFunction(
|
|
111966
|
-
updatedNode,
|
|
111967
|
-
updatedNode.modifiers,
|
|
111968
|
-
updatedNode.typeParameters,
|
|
111969
|
-
newParamsNodeArray,
|
|
111970
|
-
updatedNode.type,
|
|
111971
|
-
updatedNode.equalsGreaterThanToken,
|
|
111972
|
-
updatedNode.body
|
|
111973
|
-
);
|
|
111974
|
-
case 262 /* FunctionDeclaration */:
|
|
111975
|
-
return factory2.updateFunctionDeclaration(
|
|
111976
|
-
updatedNode,
|
|
111977
|
-
updatedNode.modifiers,
|
|
111978
|
-
updatedNode.asteriskToken,
|
|
111979
|
-
updatedNode.name,
|
|
111980
|
-
updatedNode.typeParameters,
|
|
111981
|
-
newParamsNodeArray,
|
|
111982
|
-
updatedNode.type,
|
|
111983
|
-
updatedNode.body
|
|
111984
|
-
);
|
|
111985
|
-
case 179 /* CallSignature */:
|
|
111986
|
-
return factory2.updateCallSignature(
|
|
111987
|
-
updatedNode,
|
|
111988
|
-
updatedNode.typeParameters,
|
|
111989
|
-
newParamsNodeArray,
|
|
111990
|
-
updatedNode.type
|
|
111991
|
-
);
|
|
111992
|
-
case 173 /* MethodSignature */:
|
|
111993
|
-
return factory2.updateMethodSignature(
|
|
111994
|
-
updatedNode,
|
|
111995
|
-
updatedNode.modifiers,
|
|
111996
|
-
updatedNode.name,
|
|
111997
|
-
updatedNode.questionToken,
|
|
111998
|
-
updatedNode.typeParameters,
|
|
111999
|
-
newParamsNodeArray,
|
|
112000
|
-
updatedNode.type
|
|
112001
|
-
);
|
|
112002
|
-
case 180 /* ConstructSignature */:
|
|
112003
|
-
return factory2.updateConstructSignature(
|
|
112004
|
-
updatedNode,
|
|
112005
|
-
updatedNode.typeParameters,
|
|
112006
|
-
newParamsNodeArray,
|
|
112007
|
-
updatedNode.type
|
|
112008
|
-
);
|
|
112009
|
-
case 184 /* FunctionType */:
|
|
112010
|
-
return factory2.updateFunctionTypeNode(
|
|
112011
|
-
updatedNode,
|
|
112012
|
-
updatedNode.typeParameters,
|
|
112013
|
-
newParamsNodeArray,
|
|
112014
|
-
updatedNode.type
|
|
112015
|
-
);
|
|
112016
|
-
case 185 /* ConstructorType */:
|
|
112017
|
-
return factory2.updateConstructorTypeNode(
|
|
112018
|
-
updatedNode,
|
|
112019
|
-
updatedNode.modifiers,
|
|
112020
|
-
updatedNode.typeParameters,
|
|
112021
|
-
newParamsNodeArray,
|
|
112022
|
-
updatedNode.type
|
|
112023
|
-
);
|
|
112024
|
-
default:
|
|
112025
|
-
Debug.assertNever(updatedNode);
|
|
112026
|
-
}
|
|
112027
|
-
function addUsedBindingPatternsToParameter(p) {
|
|
112028
|
-
return factory2.updateParameterDeclaration(
|
|
112029
|
-
p,
|
|
112030
|
-
p.modifiers,
|
|
112031
|
-
p.dotDotDotToken,
|
|
112032
|
-
addUsedBindingPatternAliases(p.name),
|
|
112033
|
-
p.questionToken,
|
|
112034
|
-
p.type,
|
|
112035
|
-
p.initializer
|
|
112036
|
-
);
|
|
112037
|
-
}
|
|
112038
|
-
function addUsedBindingPatternAliases(name) {
|
|
112039
|
-
if (name.kind === 80 /* Identifier */) {
|
|
112040
|
-
return name;
|
|
112041
|
-
} else {
|
|
112042
|
-
if (name.kind === 207 /* ArrayBindingPattern */) {
|
|
112043
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
112044
|
-
} else {
|
|
112045
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
112046
|
-
}
|
|
112047
|
-
}
|
|
112048
|
-
function visitBindingElement(elem) {
|
|
112049
|
-
if (elem.kind === 232 /* OmittedExpression */) {
|
|
112050
|
-
return elem;
|
|
112051
|
-
}
|
|
112052
|
-
const usedAlias = aliases.get(getOriginalNode(elem));
|
|
112053
|
-
if (usedAlias && !elem.propertyName) {
|
|
112054
|
-
return factory2.updateBindingElement(
|
|
112055
|
-
elem,
|
|
112056
|
-
elem.dotDotDotToken,
|
|
112057
|
-
elem.name,
|
|
112058
|
-
usedAlias,
|
|
112059
|
-
elem.initializer
|
|
112060
|
-
);
|
|
112061
|
-
}
|
|
112062
|
-
return factory2.updateBindingElement(
|
|
112063
|
-
elem,
|
|
112064
|
-
elem.dotDotDotToken,
|
|
112065
|
-
elem.propertyName,
|
|
112066
|
-
addUsedBindingPatternAliases(elem.name),
|
|
112067
|
-
elem.initializer
|
|
112068
|
-
);
|
|
112069
|
-
}
|
|
112070
|
-
}
|
|
112071
|
-
}
|
|
112072
111916
|
function ensureParameter(p, modifierMask, type) {
|
|
112073
111917
|
let oldDiag;
|
|
112074
111918
|
if (!suppressNewDiagnosticContexts) {
|
|
@@ -112079,7 +111923,7 @@ ${lanes.join("\n")}
|
|
|
112079
111923
|
p,
|
|
112080
111924
|
maskModifiers(factory2, p, modifierMask),
|
|
112081
111925
|
p.dotDotDotToken,
|
|
112082
|
-
|
|
111926
|
+
filterBindingPatternInitializers(p.name),
|
|
112083
111927
|
resolver.isOptionalParameter(p) ? p.questionToken || factory2.createToken(58 /* QuestionToken */) : void 0,
|
|
112084
111928
|
ensureType(
|
|
112085
111929
|
p,
|
|
@@ -112455,25 +112299,19 @@ ${lanes.join("\n")}
|
|
|
112455
112299
|
return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments));
|
|
112456
112300
|
}
|
|
112457
112301
|
case 180 /* ConstructSignature */:
|
|
112458
|
-
return cleanup(
|
|
112302
|
+
return cleanup(factory2.updateConstructSignature(
|
|
112459
112303
|
input,
|
|
112460
|
-
|
|
112461
|
-
|
|
112462
|
-
|
|
112463
|
-
updateParamsList(input, input.parameters),
|
|
112464
|
-
ensureType(input, input.type)
|
|
112465
|
-
)
|
|
112304
|
+
ensureTypeParams(input, input.typeParameters),
|
|
112305
|
+
updateParamsList(input, input.parameters),
|
|
112306
|
+
ensureType(input, input.type)
|
|
112466
112307
|
));
|
|
112467
112308
|
case 176 /* Constructor */: {
|
|
112468
|
-
const ctor =
|
|
112469
|
-
|
|
112470
|
-
|
|
112471
|
-
|
|
112472
|
-
|
|
112473
|
-
|
|
112474
|
-
/*body*/
|
|
112475
|
-
void 0
|
|
112476
|
-
)
|
|
112309
|
+
const ctor = factory2.createConstructorDeclaration(
|
|
112310
|
+
/*modifiers*/
|
|
112311
|
+
ensureModifiers(input),
|
|
112312
|
+
updateParamsList(input, input.parameters, 0 /* None */),
|
|
112313
|
+
/*body*/
|
|
112314
|
+
void 0
|
|
112477
112315
|
);
|
|
112478
112316
|
return cleanup(ctor);
|
|
112479
112317
|
}
|
|
@@ -112484,20 +112322,17 @@ ${lanes.join("\n")}
|
|
|
112484
112322
|
void 0
|
|
112485
112323
|
);
|
|
112486
112324
|
}
|
|
112487
|
-
const sig =
|
|
112488
|
-
input,
|
|
112489
|
-
|
|
112490
|
-
|
|
112491
|
-
|
|
112492
|
-
|
|
112493
|
-
|
|
112494
|
-
|
|
112495
|
-
|
|
112496
|
-
|
|
112497
|
-
|
|
112498
|
-
/*body*/
|
|
112499
|
-
void 0
|
|
112500
|
-
)
|
|
112325
|
+
const sig = factory2.createMethodDeclaration(
|
|
112326
|
+
ensureModifiers(input),
|
|
112327
|
+
/*asteriskToken*/
|
|
112328
|
+
void 0,
|
|
112329
|
+
input.name,
|
|
112330
|
+
input.questionToken,
|
|
112331
|
+
ensureTypeParams(input, input.typeParameters),
|
|
112332
|
+
updateParamsList(input, input.parameters),
|
|
112333
|
+
ensureType(input, input.type),
|
|
112334
|
+
/*body*/
|
|
112335
|
+
void 0
|
|
112501
112336
|
);
|
|
112502
112337
|
return cleanup(sig);
|
|
112503
112338
|
}
|
|
@@ -112509,17 +112344,14 @@ ${lanes.join("\n")}
|
|
|
112509
112344
|
);
|
|
112510
112345
|
}
|
|
112511
112346
|
const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input));
|
|
112512
|
-
return cleanup(
|
|
112347
|
+
return cleanup(factory2.updateGetAccessorDeclaration(
|
|
112513
112348
|
input,
|
|
112514
|
-
|
|
112515
|
-
|
|
112516
|
-
|
|
112517
|
-
|
|
112518
|
-
|
|
112519
|
-
|
|
112520
|
-
/*body*/
|
|
112521
|
-
void 0
|
|
112522
|
-
)
|
|
112349
|
+
ensureModifiers(input),
|
|
112350
|
+
input.name,
|
|
112351
|
+
updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),
|
|
112352
|
+
ensureType(input, accessorType),
|
|
112353
|
+
/*body*/
|
|
112354
|
+
void 0
|
|
112523
112355
|
));
|
|
112524
112356
|
}
|
|
112525
112357
|
case 178 /* SetAccessor */: {
|
|
@@ -112529,16 +112361,13 @@ ${lanes.join("\n")}
|
|
|
112529
112361
|
void 0
|
|
112530
112362
|
);
|
|
112531
112363
|
}
|
|
112532
|
-
return cleanup(
|
|
112364
|
+
return cleanup(factory2.updateSetAccessorDeclaration(
|
|
112533
112365
|
input,
|
|
112534
|
-
|
|
112535
|
-
|
|
112536
|
-
|
|
112537
|
-
|
|
112538
|
-
|
|
112539
|
-
/*body*/
|
|
112540
|
-
void 0
|
|
112541
|
-
)
|
|
112366
|
+
ensureModifiers(input),
|
|
112367
|
+
input.name,
|
|
112368
|
+
updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),
|
|
112369
|
+
/*body*/
|
|
112370
|
+
void 0
|
|
112542
112371
|
));
|
|
112543
112372
|
}
|
|
112544
112373
|
case 172 /* PropertyDeclaration */:
|
|
@@ -112577,29 +112406,25 @@ ${lanes.join("\n")}
|
|
|
112577
112406
|
void 0
|
|
112578
112407
|
);
|
|
112579
112408
|
}
|
|
112580
|
-
return cleanup(
|
|
112409
|
+
return cleanup(factory2.updateMethodSignature(
|
|
112581
112410
|
input,
|
|
112582
|
-
|
|
112583
|
-
|
|
112584
|
-
|
|
112585
|
-
|
|
112586
|
-
|
|
112587
|
-
|
|
112588
|
-
updateParamsList(input, input.parameters),
|
|
112589
|
-
ensureType(input, input.type)
|
|
112590
|
-
)
|
|
112411
|
+
ensureModifiers(input),
|
|
112412
|
+
input.name,
|
|
112413
|
+
input.questionToken,
|
|
112414
|
+
ensureTypeParams(input, input.typeParameters),
|
|
112415
|
+
updateParamsList(input, input.parameters),
|
|
112416
|
+
ensureType(input, input.type)
|
|
112591
112417
|
));
|
|
112592
112418
|
}
|
|
112593
112419
|
case 179 /* CallSignature */: {
|
|
112594
|
-
return cleanup(
|
|
112595
|
-
input,
|
|
112420
|
+
return cleanup(
|
|
112596
112421
|
factory2.updateCallSignature(
|
|
112597
112422
|
input,
|
|
112598
112423
|
ensureTypeParams(input, input.typeParameters),
|
|
112599
112424
|
updateParamsList(input, input.parameters),
|
|
112600
112425
|
ensureType(input, input.type)
|
|
112601
112426
|
)
|
|
112602
|
-
)
|
|
112427
|
+
);
|
|
112603
112428
|
}
|
|
112604
112429
|
case 181 /* IndexSignature */: {
|
|
112605
112430
|
return cleanup(factory2.updateIndexSignature(
|
|
@@ -112653,26 +112478,20 @@ ${lanes.join("\n")}
|
|
|
112653
112478
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
112654
112479
|
}
|
|
112655
112480
|
case 184 /* FunctionType */: {
|
|
112656
|
-
return cleanup(
|
|
112481
|
+
return cleanup(factory2.updateFunctionTypeNode(
|
|
112657
112482
|
input,
|
|
112658
|
-
|
|
112659
|
-
|
|
112660
|
-
|
|
112661
|
-
updateParamsList(input, input.parameters),
|
|
112662
|
-
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
112663
|
-
)
|
|
112483
|
+
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
112484
|
+
updateParamsList(input, input.parameters),
|
|
112485
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
112664
112486
|
));
|
|
112665
112487
|
}
|
|
112666
112488
|
case 185 /* ConstructorType */: {
|
|
112667
|
-
return cleanup(
|
|
112489
|
+
return cleanup(factory2.updateConstructorTypeNode(
|
|
112668
112490
|
input,
|
|
112669
|
-
|
|
112670
|
-
|
|
112671
|
-
|
|
112672
|
-
|
|
112673
|
-
updateParamsList(input, input.parameters),
|
|
112674
|
-
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
112675
|
-
)
|
|
112491
|
+
ensureModifiers(input),
|
|
112492
|
+
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
112493
|
+
updateParamsList(input, input.parameters),
|
|
112494
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
112676
112495
|
));
|
|
112677
112496
|
}
|
|
112678
112497
|
case 205 /* ImportType */: {
|
|
@@ -112858,20 +112677,17 @@ ${lanes.join("\n")}
|
|
|
112858
112677
|
));
|
|
112859
112678
|
}
|
|
112860
112679
|
case 262 /* FunctionDeclaration */: {
|
|
112861
|
-
const clean2 = cleanup(
|
|
112680
|
+
const clean2 = cleanup(factory2.updateFunctionDeclaration(
|
|
112862
112681
|
input,
|
|
112863
|
-
|
|
112864
|
-
|
|
112865
|
-
|
|
112866
|
-
|
|
112867
|
-
|
|
112868
|
-
|
|
112869
|
-
|
|
112870
|
-
|
|
112871
|
-
|
|
112872
|
-
/*body*/
|
|
112873
|
-
void 0
|
|
112874
|
-
)
|
|
112682
|
+
ensureModifiers(input),
|
|
112683
|
+
/*asteriskToken*/
|
|
112684
|
+
void 0,
|
|
112685
|
+
input.name,
|
|
112686
|
+
ensureTypeParams(input, input.typeParameters),
|
|
112687
|
+
updateParamsList(input, input.parameters),
|
|
112688
|
+
ensureType(input, input.type),
|
|
112689
|
+
/*body*/
|
|
112690
|
+
void 0
|
|
112875
112691
|
));
|
|
112876
112692
|
if (clean2 && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
|
|
112877
112693
|
const props = resolver.getPropertiesOfContainerFunction(input);
|
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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20240114`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -29517,7 +29517,8 @@ var intrinsicTypeKinds = new Map(Object.entries({
|
|
|
29517
29517
|
Uppercase: 0 /* Uppercase */,
|
|
29518
29518
|
Lowercase: 1 /* Lowercase */,
|
|
29519
29519
|
Capitalize: 2 /* Capitalize */,
|
|
29520
|
-
Uncapitalize: 3 /* Uncapitalize
|
|
29520
|
+
Uncapitalize: 3 /* Uncapitalize */,
|
|
29521
|
+
NoInfer: 4 /* NoInfer */
|
|
29521
29522
|
}));
|
|
29522
29523
|
function getNodeId(node) {
|
|
29523
29524
|
if (!node.id) {
|
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": "5.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20240114",
|
|
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": "23faef92703556567ddbcb9afb893f4ba638fc20"
|
|
117
117
|
}
|