@typescript-deploys/pr-build 5.3.0-pr-53714-29 → 5.3.0-pr-55793-6
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 +29 -10
- package/lib/tsserver.js +34 -10
- package/lib/typescript.js +34 -10
- package/lib/typingsInstaller.js +9 -2
- 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.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230920`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -16423,7 +16423,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
|
16423
16423
|
return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
|
|
16424
16424
|
}
|
|
16425
16425
|
function getCompilerOptionValue(options, option) {
|
|
16426
|
-
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
16426
|
+
return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
|
|
16427
16427
|
}
|
|
16428
16428
|
function getJSXTransformEnabled(options) {
|
|
16429
16429
|
const jsx = options.jsx;
|
|
@@ -34183,7 +34183,8 @@ var commandOptionsWithoutBuild = [
|
|
|
34183
34183
|
{
|
|
34184
34184
|
name: "allowJs",
|
|
34185
34185
|
type: "boolean",
|
|
34186
|
-
|
|
34186
|
+
allowJsFlag: true,
|
|
34187
|
+
affectsBuildInfo: true,
|
|
34187
34188
|
showInSimplifiedHelpView: true,
|
|
34188
34189
|
category: Diagnostics.JavaScript_Support,
|
|
34189
34190
|
description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
@@ -34193,6 +34194,8 @@ var commandOptionsWithoutBuild = [
|
|
|
34193
34194
|
name: "checkJs",
|
|
34194
34195
|
type: "boolean",
|
|
34195
34196
|
affectsModuleResolution: true,
|
|
34197
|
+
affectsSemanticDiagnostics: true,
|
|
34198
|
+
affectsBuildInfo: true,
|
|
34196
34199
|
showInSimplifiedHelpView: true,
|
|
34197
34200
|
category: Diagnostics.JavaScript_Support,
|
|
34198
34201
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -34205,6 +34208,10 @@ var commandOptionsWithoutBuild = [
|
|
|
34205
34208
|
affectsEmit: true,
|
|
34206
34209
|
affectsBuildInfo: true,
|
|
34207
34210
|
affectsModuleResolution: true,
|
|
34211
|
+
// The checker emits an error when it sees JSX but this option is not set in compilerOptions.
|
|
34212
|
+
// This is effectively a semantic error, so mark this option as affecting semantic diagnostics
|
|
34213
|
+
// so we know to refresh errors when this option is changed.
|
|
34214
|
+
affectsSemanticDiagnostics: true,
|
|
34208
34215
|
paramType: Diagnostics.KIND,
|
|
34209
34216
|
showInSimplifiedHelpView: true,
|
|
34210
34217
|
category: Diagnostics.Language_and_Environment,
|
|
@@ -54201,7 +54208,7 @@ function createTypeChecker(host) {
|
|
|
54201
54208
|
}
|
|
54202
54209
|
function isConstTypeVariable(type, depth = 0) {
|
|
54203
54210
|
var _a;
|
|
54204
|
-
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags &
|
|
54211
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
54205
54212
|
}
|
|
54206
54213
|
function getConstraintOfIndexedAccess(type) {
|
|
54207
54214
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -59697,8 +59704,16 @@ function createTypeChecker(host) {
|
|
|
59697
59704
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
59698
59705
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
59699
59706
|
for (let i = 0; i < paramCount; i++) {
|
|
59700
|
-
const sourceType = i === restIndex ?
|
|
59701
|
-
|
|
59707
|
+
const sourceType = i === restIndex ? getMutableArrayOrTupleType(
|
|
59708
|
+
getRestTypeAtPosition(source, i),
|
|
59709
|
+
/*forceVariadic*/
|
|
59710
|
+
false
|
|
59711
|
+
) : tryGetTypeAtPosition(source, i);
|
|
59712
|
+
const targetType = i === restIndex ? getMutableArrayOrTupleType(
|
|
59713
|
+
getRestTypeAtPosition(target, i),
|
|
59714
|
+
/*forceVariadic*/
|
|
59715
|
+
false
|
|
59716
|
+
) : tryGetTypeAtPosition(target, i);
|
|
59702
59717
|
if (sourceType && targetType) {
|
|
59703
59718
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
59704
59719
|
const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
|
|
@@ -70218,14 +70233,14 @@ function createTypeChecker(host) {
|
|
|
70218
70233
|
}
|
|
70219
70234
|
return getInferredTypes(context);
|
|
70220
70235
|
}
|
|
70221
|
-
function getMutableArrayOrTupleType(type) {
|
|
70222
|
-
return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
70236
|
+
function getMutableArrayOrTupleType(type, forceVariadic) {
|
|
70237
|
+
return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
70223
70238
|
getElementTypes(type),
|
|
70224
70239
|
type.target.elementFlags,
|
|
70225
70240
|
/*readonly*/
|
|
70226
70241
|
false,
|
|
70227
70242
|
type.target.labeledElementDeclarations
|
|
70228
|
-
) : createTupleType([type], [8 /* Variadic */]);
|
|
70243
|
+
) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
|
|
70229
70244
|
}
|
|
70230
70245
|
function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
|
|
70231
70246
|
const inConstContext = isConstTypeVariable(restType);
|
|
@@ -70234,7 +70249,11 @@ function createTypeChecker(host) {
|
|
|
70234
70249
|
if (isSpreadArgument(arg)) {
|
|
70235
70250
|
const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
|
|
70236
70251
|
if (isArrayLikeType(spreadType)) {
|
|
70237
|
-
return getMutableArrayOrTupleType(
|
|
70252
|
+
return getMutableArrayOrTupleType(
|
|
70253
|
+
spreadType,
|
|
70254
|
+
/*forceVariadic*/
|
|
70255
|
+
true
|
|
70256
|
+
);
|
|
70238
70257
|
}
|
|
70239
70258
|
return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
|
|
70240
70259
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-insiders.20230920`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -20572,7 +20572,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
|
20572
20572
|
return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
|
|
20573
20573
|
}
|
|
20574
20574
|
function getCompilerOptionValue(options, option) {
|
|
20575
|
-
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
20575
|
+
return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
|
|
20576
20576
|
}
|
|
20577
20577
|
function getJSXTransformEnabled(options) {
|
|
20578
20578
|
const jsx = options.jsx;
|
|
@@ -38577,7 +38577,8 @@ var commandOptionsWithoutBuild = [
|
|
|
38577
38577
|
{
|
|
38578
38578
|
name: "allowJs",
|
|
38579
38579
|
type: "boolean",
|
|
38580
|
-
|
|
38580
|
+
allowJsFlag: true,
|
|
38581
|
+
affectsBuildInfo: true,
|
|
38581
38582
|
showInSimplifiedHelpView: true,
|
|
38582
38583
|
category: Diagnostics.JavaScript_Support,
|
|
38583
38584
|
description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
@@ -38587,6 +38588,8 @@ var commandOptionsWithoutBuild = [
|
|
|
38587
38588
|
name: "checkJs",
|
|
38588
38589
|
type: "boolean",
|
|
38589
38590
|
affectsModuleResolution: true,
|
|
38591
|
+
affectsSemanticDiagnostics: true,
|
|
38592
|
+
affectsBuildInfo: true,
|
|
38590
38593
|
showInSimplifiedHelpView: true,
|
|
38591
38594
|
category: Diagnostics.JavaScript_Support,
|
|
38592
38595
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -38599,6 +38602,10 @@ var commandOptionsWithoutBuild = [
|
|
|
38599
38602
|
affectsEmit: true,
|
|
38600
38603
|
affectsBuildInfo: true,
|
|
38601
38604
|
affectsModuleResolution: true,
|
|
38605
|
+
// The checker emits an error when it sees JSX but this option is not set in compilerOptions.
|
|
38606
|
+
// This is effectively a semantic error, so mark this option as affecting semantic diagnostics
|
|
38607
|
+
// so we know to refresh errors when this option is changed.
|
|
38608
|
+
affectsSemanticDiagnostics: true,
|
|
38602
38609
|
paramType: Diagnostics.KIND,
|
|
38603
38610
|
showInSimplifiedHelpView: true,
|
|
38604
38611
|
category: Diagnostics.Language_and_Environment,
|
|
@@ -58901,7 +58908,7 @@ function createTypeChecker(host) {
|
|
|
58901
58908
|
}
|
|
58902
58909
|
function isConstTypeVariable(type, depth = 0) {
|
|
58903
58910
|
var _a;
|
|
58904
|
-
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags &
|
|
58911
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
58905
58912
|
}
|
|
58906
58913
|
function getConstraintOfIndexedAccess(type) {
|
|
58907
58914
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -64397,8 +64404,16 @@ function createTypeChecker(host) {
|
|
|
64397
64404
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
64398
64405
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
64399
64406
|
for (let i = 0; i < paramCount; i++) {
|
|
64400
|
-
const sourceType = i === restIndex ?
|
|
64401
|
-
|
|
64407
|
+
const sourceType = i === restIndex ? getMutableArrayOrTupleType(
|
|
64408
|
+
getRestTypeAtPosition(source, i),
|
|
64409
|
+
/*forceVariadic*/
|
|
64410
|
+
false
|
|
64411
|
+
) : tryGetTypeAtPosition(source, i);
|
|
64412
|
+
const targetType = i === restIndex ? getMutableArrayOrTupleType(
|
|
64413
|
+
getRestTypeAtPosition(target, i),
|
|
64414
|
+
/*forceVariadic*/
|
|
64415
|
+
false
|
|
64416
|
+
) : tryGetTypeAtPosition(target, i);
|
|
64402
64417
|
if (sourceType && targetType) {
|
|
64403
64418
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
64404
64419
|
const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
|
|
@@ -74918,14 +74933,14 @@ function createTypeChecker(host) {
|
|
|
74918
74933
|
}
|
|
74919
74934
|
return getInferredTypes(context);
|
|
74920
74935
|
}
|
|
74921
|
-
function getMutableArrayOrTupleType(type) {
|
|
74922
|
-
return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
74936
|
+
function getMutableArrayOrTupleType(type, forceVariadic) {
|
|
74937
|
+
return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
74923
74938
|
getElementTypes(type),
|
|
74924
74939
|
type.target.elementFlags,
|
|
74925
74940
|
/*readonly*/
|
|
74926
74941
|
false,
|
|
74927
74942
|
type.target.labeledElementDeclarations
|
|
74928
|
-
) : createTupleType([type], [8 /* Variadic */]);
|
|
74943
|
+
) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
|
|
74929
74944
|
}
|
|
74930
74945
|
function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
|
|
74931
74946
|
const inConstContext = isConstTypeVariable(restType);
|
|
@@ -74934,7 +74949,11 @@ function createTypeChecker(host) {
|
|
|
74934
74949
|
if (isSpreadArgument(arg)) {
|
|
74935
74950
|
const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
|
|
74936
74951
|
if (isArrayLikeType(spreadType)) {
|
|
74937
|
-
return getMutableArrayOrTupleType(
|
|
74952
|
+
return getMutableArrayOrTupleType(
|
|
74953
|
+
spreadType,
|
|
74954
|
+
/*forceVariadic*/
|
|
74955
|
+
true
|
|
74956
|
+
);
|
|
74938
74957
|
}
|
|
74939
74958
|
return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
|
|
74940
74959
|
}
|
|
@@ -165337,6 +165356,11 @@ function getJsDocTagsFromDeclarations(declarations, checker) {
|
|
|
165337
165356
|
}
|
|
165338
165357
|
for (const tag of tags) {
|
|
165339
165358
|
infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });
|
|
165359
|
+
if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) {
|
|
165360
|
+
forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => {
|
|
165361
|
+
infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) });
|
|
165362
|
+
});
|
|
165363
|
+
}
|
|
165340
165364
|
}
|
|
165341
165365
|
});
|
|
165342
165366
|
return infos;
|
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.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230920`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -17860,7 +17860,7 @@ ${lanes.join("\n")}
|
|
|
17860
17860
|
return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
|
|
17861
17861
|
}
|
|
17862
17862
|
function getCompilerOptionValue(options, option) {
|
|
17863
|
-
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
17863
|
+
return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
|
|
17864
17864
|
}
|
|
17865
17865
|
function getJSXTransformEnabled(options) {
|
|
17866
17866
|
const jsx = options.jsx;
|
|
@@ -38060,7 +38060,8 @@ ${lanes.join("\n")}
|
|
|
38060
38060
|
{
|
|
38061
38061
|
name: "allowJs",
|
|
38062
38062
|
type: "boolean",
|
|
38063
|
-
|
|
38063
|
+
allowJsFlag: true,
|
|
38064
|
+
affectsBuildInfo: true,
|
|
38064
38065
|
showInSimplifiedHelpView: true,
|
|
38065
38066
|
category: Diagnostics.JavaScript_Support,
|
|
38066
38067
|
description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
@@ -38070,6 +38071,8 @@ ${lanes.join("\n")}
|
|
|
38070
38071
|
name: "checkJs",
|
|
38071
38072
|
type: "boolean",
|
|
38072
38073
|
affectsModuleResolution: true,
|
|
38074
|
+
affectsSemanticDiagnostics: true,
|
|
38075
|
+
affectsBuildInfo: true,
|
|
38073
38076
|
showInSimplifiedHelpView: true,
|
|
38074
38077
|
category: Diagnostics.JavaScript_Support,
|
|
38075
38078
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -38082,6 +38085,10 @@ ${lanes.join("\n")}
|
|
|
38082
38085
|
affectsEmit: true,
|
|
38083
38086
|
affectsBuildInfo: true,
|
|
38084
38087
|
affectsModuleResolution: true,
|
|
38088
|
+
// The checker emits an error when it sees JSX but this option is not set in compilerOptions.
|
|
38089
|
+
// This is effectively a semantic error, so mark this option as affecting semantic diagnostics
|
|
38090
|
+
// so we know to refresh errors when this option is changed.
|
|
38091
|
+
affectsSemanticDiagnostics: true,
|
|
38085
38092
|
paramType: Diagnostics.KIND,
|
|
38086
38093
|
showInSimplifiedHelpView: true,
|
|
38087
38094
|
category: Diagnostics.Language_and_Environment,
|
|
@@ -56667,7 +56674,7 @@ ${lanes.join("\n")}
|
|
|
56667
56674
|
}
|
|
56668
56675
|
function isConstTypeVariable(type, depth = 0) {
|
|
56669
56676
|
var _a;
|
|
56670
|
-
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags &
|
|
56677
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
56671
56678
|
}
|
|
56672
56679
|
function getConstraintOfIndexedAccess(type) {
|
|
56673
56680
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -62163,8 +62170,16 @@ ${lanes.join("\n")}
|
|
|
62163
62170
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
62164
62171
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
62165
62172
|
for (let i = 0; i < paramCount; i++) {
|
|
62166
|
-
const sourceType = i === restIndex ?
|
|
62167
|
-
|
|
62173
|
+
const sourceType = i === restIndex ? getMutableArrayOrTupleType(
|
|
62174
|
+
getRestTypeAtPosition(source, i),
|
|
62175
|
+
/*forceVariadic*/
|
|
62176
|
+
false
|
|
62177
|
+
) : tryGetTypeAtPosition(source, i);
|
|
62178
|
+
const targetType = i === restIndex ? getMutableArrayOrTupleType(
|
|
62179
|
+
getRestTypeAtPosition(target, i),
|
|
62180
|
+
/*forceVariadic*/
|
|
62181
|
+
false
|
|
62182
|
+
) : tryGetTypeAtPosition(target, i);
|
|
62168
62183
|
if (sourceType && targetType) {
|
|
62169
62184
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
62170
62185
|
const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
|
|
@@ -72684,14 +72699,14 @@ ${lanes.join("\n")}
|
|
|
72684
72699
|
}
|
|
72685
72700
|
return getInferredTypes(context);
|
|
72686
72701
|
}
|
|
72687
|
-
function getMutableArrayOrTupleType(type) {
|
|
72688
|
-
return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
72702
|
+
function getMutableArrayOrTupleType(type, forceVariadic) {
|
|
72703
|
+
return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
|
|
72689
72704
|
getElementTypes(type),
|
|
72690
72705
|
type.target.elementFlags,
|
|
72691
72706
|
/*readonly*/
|
|
72692
72707
|
false,
|
|
72693
72708
|
type.target.labeledElementDeclarations
|
|
72694
|
-
) : createTupleType([type], [8 /* Variadic */]);
|
|
72709
|
+
) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
|
|
72695
72710
|
}
|
|
72696
72711
|
function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
|
|
72697
72712
|
const inConstContext = isConstTypeVariable(restType);
|
|
@@ -72700,7 +72715,11 @@ ${lanes.join("\n")}
|
|
|
72700
72715
|
if (isSpreadArgument(arg)) {
|
|
72701
72716
|
const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
|
|
72702
72717
|
if (isArrayLikeType(spreadType)) {
|
|
72703
|
-
return getMutableArrayOrTupleType(
|
|
72718
|
+
return getMutableArrayOrTupleType(
|
|
72719
|
+
spreadType,
|
|
72720
|
+
/*forceVariadic*/
|
|
72721
|
+
true
|
|
72722
|
+
);
|
|
72704
72723
|
}
|
|
72705
72724
|
return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
|
|
72706
72725
|
}
|
|
@@ -164610,6 +164629,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164610
164629
|
}
|
|
164611
164630
|
for (const tag of tags) {
|
|
164612
164631
|
infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });
|
|
164632
|
+
if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) {
|
|
164633
|
+
forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => {
|
|
164634
|
+
infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) });
|
|
164635
|
+
});
|
|
164636
|
+
}
|
|
164613
164637
|
}
|
|
164614
164638
|
});
|
|
164615
164639
|
return infos;
|
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.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230920`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -26005,7 +26005,8 @@ var commandOptionsWithoutBuild = [
|
|
|
26005
26005
|
{
|
|
26006
26006
|
name: "allowJs",
|
|
26007
26007
|
type: "boolean",
|
|
26008
|
-
|
|
26008
|
+
allowJsFlag: true,
|
|
26009
|
+
affectsBuildInfo: true,
|
|
26009
26010
|
showInSimplifiedHelpView: true,
|
|
26010
26011
|
category: Diagnostics.JavaScript_Support,
|
|
26011
26012
|
description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
@@ -26015,6 +26016,8 @@ var commandOptionsWithoutBuild = [
|
|
|
26015
26016
|
name: "checkJs",
|
|
26016
26017
|
type: "boolean",
|
|
26017
26018
|
affectsModuleResolution: true,
|
|
26019
|
+
affectsSemanticDiagnostics: true,
|
|
26020
|
+
affectsBuildInfo: true,
|
|
26018
26021
|
showInSimplifiedHelpView: true,
|
|
26019
26022
|
category: Diagnostics.JavaScript_Support,
|
|
26020
26023
|
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
@@ -26027,6 +26030,10 @@ var commandOptionsWithoutBuild = [
|
|
|
26027
26030
|
affectsEmit: true,
|
|
26028
26031
|
affectsBuildInfo: true,
|
|
26029
26032
|
affectsModuleResolution: true,
|
|
26033
|
+
// The checker emits an error when it sees JSX but this option is not set in compilerOptions.
|
|
26034
|
+
// This is effectively a semantic error, so mark this option as affecting semantic diagnostics
|
|
26035
|
+
// so we know to refresh errors when this option is changed.
|
|
26036
|
+
affectsSemanticDiagnostics: true,
|
|
26030
26037
|
paramType: Diagnostics.KIND,
|
|
26031
26038
|
showInSimplifiedHelpView: true,
|
|
26032
26039
|
category: Diagnostics.Language_and_Environment,
|
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.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-55793-6",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "090f760a7fea5adf2a8e4d1e6483f7140cdf90a2"
|
|
118
118
|
}
|