typescript 5.8.0-dev.20250117 → 5.8.0-dev.20250118
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 -7
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +21 -19
- 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.8";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250118`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -18875,7 +18875,7 @@ function isValidBigIntString(s, roundTripOnly) {
|
|
18875
18875
|
return success && result === 10 /* BigIntLiteral */ && scanner.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) }));
|
18876
18876
|
}
|
18877
18877
|
function isValidTypeOnlyAliasUseSite(useSite) {
|
18878
|
-
return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
18878
|
+
return !!(useSite.flags & 33554432 /* Ambient */) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
18879
18879
|
}
|
18880
18880
|
function isShorthandPropertyNameUseSite(useSite) {
|
18881
18881
|
return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
|
@@ -35209,6 +35209,7 @@ var Parser;
|
|
35209
35209
|
const node = factory2.createExpressionWithTypeArguments(expression, typeArguments);
|
35210
35210
|
const res = finishNode(node, pos);
|
35211
35211
|
if (usedBrace) {
|
35212
|
+
skipWhitespace();
|
35212
35213
|
parseExpected(20 /* CloseBraceToken */);
|
35213
35214
|
}
|
35214
35215
|
return res;
|
@@ -46455,6 +46456,7 @@ function createTypeChecker(host) {
|
|
46455
46456
|
getNumberLiteralType,
|
46456
46457
|
getBigIntType: () => bigintType,
|
46457
46458
|
getBigIntLiteralType,
|
46459
|
+
getUnknownType: () => unknownType,
|
46458
46460
|
createPromiseType,
|
46459
46461
|
createArrayType,
|
46460
46462
|
getElementTypeOfArrayType,
|
@@ -112823,11 +112825,7 @@ function createGetIsolatedDeclarationErrors(resolver) {
|
|
112823
112825
|
if (isSetAccessor(node.parent)) {
|
112824
112826
|
return createAccessorTypeError(node.parent);
|
112825
112827
|
}
|
112826
|
-
const addUndefined = resolver.requiresAddingImplicitUndefined(
|
112827
|
-
node,
|
112828
|
-
/*enclosingDeclaration*/
|
112829
|
-
void 0
|
112830
|
-
);
|
112828
|
+
const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
|
112831
112829
|
if (!addUndefined && node.initializer) {
|
112832
112830
|
return createExpressionError(node.initializer);
|
112833
112831
|
}
|
package/lib/typescript.d.ts
CHANGED
@@ -6288,6 +6288,7 @@ declare namespace ts {
|
|
6288
6288
|
getBigIntType(): Type;
|
6289
6289
|
getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
|
6290
6290
|
getBooleanType(): Type;
|
6291
|
+
getUnknownType(): Type;
|
6291
6292
|
getFalseType(): Type;
|
6292
6293
|
getTrueType(): Type;
|
6293
6294
|
getVoidType(): Type;
|
package/lib/typescript.js
CHANGED
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2285
2285
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
2287
2287
|
var versionMajorMinor = "5.8";
|
2288
|
-
var version = `${versionMajorMinor}.0-dev.
|
2288
|
+
var version = `${versionMajorMinor}.0-dev.20250118`;
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -22865,7 +22865,7 @@ function isValidBigIntString(s, roundTripOnly) {
|
|
22865
22865
|
return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
|
22866
22866
|
}
|
22867
22867
|
function isValidTypeOnlyAliasUseSite(useSite) {
|
22868
|
-
return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
22868
|
+
return !!(useSite.flags & 33554432 /* Ambient */) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
22869
22869
|
}
|
22870
22870
|
function isShorthandPropertyNameUseSite(useSite) {
|
22871
22871
|
return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
|
@@ -39469,6 +39469,7 @@ var Parser;
|
|
39469
39469
|
const node = factory2.createExpressionWithTypeArguments(expression, typeArguments);
|
39470
39470
|
const res = finishNode(node, pos);
|
39471
39471
|
if (usedBrace) {
|
39472
|
+
skipWhitespace();
|
39472
39473
|
parseExpected(20 /* CloseBraceToken */);
|
39473
39474
|
}
|
39474
39475
|
return res;
|
@@ -51065,6 +51066,7 @@ function createTypeChecker(host) {
|
|
51065
51066
|
getNumberLiteralType,
|
51066
51067
|
getBigIntType: () => bigintType,
|
51067
51068
|
getBigIntLiteralType,
|
51069
|
+
getUnknownType: () => unknownType,
|
51068
51070
|
createPromiseType,
|
51069
51071
|
createArrayType,
|
51070
51072
|
getElementTypeOfArrayType,
|
@@ -117615,11 +117617,7 @@ function createGetIsolatedDeclarationErrors(resolver) {
|
|
117615
117617
|
if (isSetAccessor(node.parent)) {
|
117616
117618
|
return createAccessorTypeError(node.parent);
|
117617
117619
|
}
|
117618
|
-
const addUndefined = resolver.requiresAddingImplicitUndefined(
|
117619
|
-
node,
|
117620
|
-
/*enclosingDeclaration*/
|
117621
|
-
void 0
|
117622
|
-
);
|
117620
|
+
const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
|
117623
117621
|
if (!addUndefined && node.initializer) {
|
117624
117622
|
return createExpressionError(node.initializer);
|
117625
117623
|
}
|
@@ -161637,6 +161635,8 @@ registerCodeFix({
|
|
161637
161635
|
break;
|
161638
161636
|
} else if (canDeleteEntireVariableStatement(sourceFile, token)) {
|
161639
161637
|
deleteEntireVariableStatement(changes, sourceFile, token.parent);
|
161638
|
+
} else if (isIdentifier(token) && isFunctionDeclaration(token.parent)) {
|
161639
|
+
deleteFunctionLikeDeclaration(changes, sourceFile, token.parent);
|
161640
161640
|
} else {
|
161641
161641
|
tryDeleteDeclaration(
|
161642
161642
|
sourceFile,
|
@@ -173126,7 +173126,7 @@ var Core;
|
|
173126
173126
|
} else {
|
173127
173127
|
addIfImplementation(body);
|
173128
173128
|
}
|
173129
|
-
} else if (isAssertionExpression(typeHavingNode)) {
|
173129
|
+
} else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression(typeHavingNode)) {
|
173130
173130
|
addIfImplementation(typeHavingNode.expression);
|
173131
173131
|
}
|
173132
173132
|
}
|
@@ -174358,22 +174358,24 @@ function provideInlayHints(context) {
|
|
174358
174358
|
if (!signature) {
|
174359
174359
|
return;
|
174360
174360
|
}
|
174361
|
-
|
174362
|
-
|
174363
|
-
if (
|
174364
|
-
|
174365
|
-
}
|
174366
|
-
const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(param);
|
174367
|
-
if (effectiveTypeAnnotation) {
|
174368
|
-
continue;
|
174361
|
+
let pos = 0;
|
174362
|
+
for (const param of node.parameters) {
|
174363
|
+
if (isHintableDeclaration(param)) {
|
174364
|
+
addParameterTypeHint(param, parameterIsThisKeyword(param) ? signature.thisParameter : signature.parameters[pos]);
|
174369
174365
|
}
|
174370
|
-
|
174371
|
-
if (!typeHints) {
|
174366
|
+
if (parameterIsThisKeyword(param)) {
|
174372
174367
|
continue;
|
174373
174368
|
}
|
174374
|
-
|
174369
|
+
pos++;
|
174375
174370
|
}
|
174376
174371
|
}
|
174372
|
+
function addParameterTypeHint(node, symbol) {
|
174373
|
+
const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(node);
|
174374
|
+
if (effectiveTypeAnnotation || symbol === void 0) return;
|
174375
|
+
const typeHints = getParameterDeclarationTypeHints(symbol);
|
174376
|
+
if (typeHints === void 0) return;
|
174377
|
+
addTypeHints(typeHints, node.questionToken ? node.questionToken.end : node.name.end);
|
174378
|
+
}
|
174377
174379
|
function getParameterDeclarationTypeHints(symbol) {
|
174378
174380
|
const valueDeclaration = symbol.valueDeclaration;
|
174379
174381
|
if (!valueDeclaration || !isParameter(valueDeclaration)) {
|
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.8.0-dev.
|
5
|
+
"version": "5.8.0-dev.20250118",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "8da951cbb629b648753454872df4e1754982aef1"
|
120
120
|
}
|