@typescript-deploys/pr-build 5.1.0-pr-52984-22 → 5.1.0-pr-53092-8
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 +10 -39
- package/lib/tsserver.js +175 -141
- package/lib/tsserverlibrary.d.ts +2 -7
- package/lib/tsserverlibrary.js +175 -142
- package/lib/typescript.js +58 -58
- package/lib/typingsInstaller.js +3 -36
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.1";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20230304`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -2624,41 +2624,8 @@ function tryGetWebPerformanceHooks() {
|
|
|
2624
2624
|
function tryGetNodePerformanceHooks() {
|
|
2625
2625
|
if (isNodeLikeSystem()) {
|
|
2626
2626
|
try {
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
if (hasRequiredAPI(nodePerformance, PerformanceObserver2)) {
|
|
2630
|
-
performance2 = nodePerformance;
|
|
2631
|
-
const version2 = new Version(process.versions.node);
|
|
2632
|
-
const range = new VersionRange("<12.16.3 || 13 <13.13");
|
|
2633
|
-
if (range.test(version2)) {
|
|
2634
|
-
performance2 = {
|
|
2635
|
-
get timeOrigin() {
|
|
2636
|
-
return nodePerformance.timeOrigin;
|
|
2637
|
-
},
|
|
2638
|
-
now() {
|
|
2639
|
-
return nodePerformance.now();
|
|
2640
|
-
},
|
|
2641
|
-
mark(name) {
|
|
2642
|
-
return nodePerformance.mark(name);
|
|
2643
|
-
},
|
|
2644
|
-
measure(name, start = "nodeStart", end) {
|
|
2645
|
-
if (end === void 0) {
|
|
2646
|
-
end = "__performance.measure-fix__";
|
|
2647
|
-
nodePerformance.mark(end);
|
|
2648
|
-
}
|
|
2649
|
-
nodePerformance.measure(name, start, end);
|
|
2650
|
-
if (end === "__performance.measure-fix__") {
|
|
2651
|
-
nodePerformance.clearMarks("__performance.measure-fix__");
|
|
2652
|
-
}
|
|
2653
|
-
},
|
|
2654
|
-
clearMarks(name) {
|
|
2655
|
-
return nodePerformance.clearMarks(name);
|
|
2656
|
-
},
|
|
2657
|
-
clearMeasures(name) {
|
|
2658
|
-
return nodePerformance.clearMeasures(name);
|
|
2659
|
-
}
|
|
2660
|
-
};
|
|
2661
|
-
}
|
|
2627
|
+
const { performance: performance2, PerformanceObserver: PerformanceObserver2 } = require("perf_hooks");
|
|
2628
|
+
if (hasRequiredAPI(performance2, PerformanceObserver2)) {
|
|
2662
2629
|
return {
|
|
2663
2630
|
// By default, only write native events when generating a cpu profile or using the v8 profiler.
|
|
2664
2631
|
shouldWriteNativeEvents: false,
|
|
@@ -69253,16 +69220,20 @@ function createTypeChecker(host) {
|
|
|
69253
69220
|
) : createTupleType([type], [8 /* Variadic */]);
|
|
69254
69221
|
}
|
|
69255
69222
|
function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
|
|
69223
|
+
const inConstContext = isConstTypeVariable(restType);
|
|
69256
69224
|
if (index >= argCount - 1) {
|
|
69257
69225
|
const arg = args[argCount - 1];
|
|
69258
69226
|
if (isSpreadArgument(arg)) {
|
|
69259
|
-
|
|
69227
|
+
const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
|
|
69228
|
+
if (isArrayLikeType(spreadType)) {
|
|
69229
|
+
return getMutableArrayOrTupleType(spreadType);
|
|
69230
|
+
}
|
|
69231
|
+
return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext);
|
|
69260
69232
|
}
|
|
69261
69233
|
}
|
|
69262
69234
|
const types = [];
|
|
69263
69235
|
const flags = [];
|
|
69264
69236
|
const names = [];
|
|
69265
|
-
const inConstContext = isConstTypeVariable(restType);
|
|
69266
69237
|
for (let i = index; i < argCount; i++) {
|
|
69267
69238
|
const arg = args[i];
|
|
69268
69239
|
if (isSpreadArgument(arg)) {
|
|
@@ -72057,7 +72028,7 @@ function createTypeChecker(host) {
|
|
|
72057
72028
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics() {
|
|
72058
72029
|
const functionFlags = getFunctionFlags(func);
|
|
72059
72030
|
const type = returnType && unwrapReturnType(returnType, functionFlags);
|
|
72060
|
-
if (type && maybeTypeOfKind(type,
|
|
72031
|
+
if (type && maybeTypeOfKind(type, 32768 /* Undefined */ | 16384 /* Void */ | 1 /* Any */)) {
|
|
72061
72032
|
return;
|
|
72062
72033
|
}
|
|
72063
72034
|
if (func.kind === 170 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 238 /* Block */ || !functionHasImplicitReturn(func)) {
|