@typescript-deploys/pr-build 5.5.0-pr-57912-2 → 5.5.0-pr-57909-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 +36 -30
- package/lib/typescript.js +36 -30
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -2556,43 +2556,49 @@ function formatComparator(comparator) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
|
|
2558
2558
|
// src/compiler/performanceCore.ts
|
|
2559
|
-
function
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2559
|
+
function tryGetPerformance() {
|
|
2560
|
+
if (isNodeLikeSystem()) {
|
|
2561
|
+
try {
|
|
2562
|
+
const { performance: performance2 } = require("perf_hooks");
|
|
2563
|
+
return {
|
|
2564
|
+
shouldWriteNativeEvents: false,
|
|
2565
|
+
performance: performance2
|
|
2566
|
+
};
|
|
2567
|
+
} catch {
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
if (typeof performance === "object") {
|
|
2564
2571
|
return {
|
|
2565
|
-
// For now we always write native performance events when running in the browser. We may
|
|
2566
|
-
// make this conditional in the future if we find that native web performance hooks
|
|
2567
|
-
// in the browser also slow down compilation.
|
|
2568
2572
|
shouldWriteNativeEvents: true,
|
|
2569
|
-
performance
|
|
2570
|
-
PerformanceObserver
|
|
2573
|
+
performance
|
|
2571
2574
|
};
|
|
2572
2575
|
}
|
|
2576
|
+
return void 0;
|
|
2573
2577
|
}
|
|
2574
|
-
function
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2578
|
+
function tryGetPerformanceHooks() {
|
|
2579
|
+
const p = tryGetPerformance();
|
|
2580
|
+
if (!p)
|
|
2581
|
+
return void 0;
|
|
2582
|
+
const { shouldWriteNativeEvents, performance: performance2 } = p;
|
|
2583
|
+
const hooks = {
|
|
2584
|
+
shouldWriteNativeEvents,
|
|
2585
|
+
performance: void 0,
|
|
2586
|
+
performanceTime: void 0
|
|
2587
|
+
};
|
|
2588
|
+
if (typeof performance2.timeOrigin === "number" && typeof performance2.now === "function") {
|
|
2589
|
+
hooks.performanceTime = performance2;
|
|
2590
|
+
}
|
|
2591
|
+
if (hooks.performanceTime && typeof performance2.mark === "function" && typeof performance2.measure === "function" && typeof performance2.clearMarks === "function" && typeof performance2.clearMeasures === "function") {
|
|
2592
|
+
hooks.performance = performance2;
|
|
2588
2593
|
}
|
|
2594
|
+
return hooks;
|
|
2589
2595
|
}
|
|
2590
|
-
var nativePerformanceHooks =
|
|
2591
|
-
var
|
|
2596
|
+
var nativePerformanceHooks = tryGetPerformanceHooks();
|
|
2597
|
+
var nativePerformanceTime = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performanceTime;
|
|
2592
2598
|
function tryGetNativePerformanceHooks() {
|
|
2593
2599
|
return nativePerformanceHooks;
|
|
2594
2600
|
}
|
|
2595
|
-
var timestamp =
|
|
2601
|
+
var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;
|
|
2596
2602
|
|
|
2597
2603
|
// src/compiler/perfLogger.ts
|
|
2598
2604
|
var etwModule;
|
|
@@ -2693,7 +2699,7 @@ function enable(system = sys) {
|
|
|
2693
2699
|
if (!enabled) {
|
|
2694
2700
|
enabled = true;
|
|
2695
2701
|
perfHooks || (perfHooks = tryGetNativePerformanceHooks());
|
|
2696
|
-
if (perfHooks) {
|
|
2702
|
+
if (perfHooks == null ? void 0 : perfHooks.performance) {
|
|
2697
2703
|
timeorigin = perfHooks.performance.timeOrigin;
|
|
2698
2704
|
if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) {
|
|
2699
2705
|
performanceImpl = perfHooks.performance;
|
|
@@ -65035,7 +65041,7 @@ function createTypeChecker(host) {
|
|
|
65035
65041
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
65036
65042
|
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
65037
65043
|
if (inferredCovariantType || inferredContravariantType) {
|
|
65038
|
-
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) =>
|
|
65044
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType))));
|
|
65039
65045
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
65040
65046
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
65041
65047
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
@@ -73898,7 +73904,7 @@ function createTypeChecker(host) {
|
|
|
73898
73904
|
/*contextFlags*/
|
|
73899
73905
|
void 0
|
|
73900
73906
|
);
|
|
73901
|
-
const returnType2 = contextualReturnType &&
|
|
73907
|
+
const returnType2 = contextualReturnType && (unwrapReturnType(contextualReturnType, functionFlags) || voidType).flags & 32768 /* Undefined */ ? undefinedType : voidType;
|
|
73902
73908
|
return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, returnType2) : (
|
|
73903
73909
|
// Async function
|
|
73904
73910
|
returnType2
|
package/lib/typescript.js
CHANGED
|
@@ -5262,43 +5262,49 @@ function formatComparator(comparator) {
|
|
|
5262
5262
|
}
|
|
5263
5263
|
|
|
5264
5264
|
// src/compiler/performanceCore.ts
|
|
5265
|
-
function
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5265
|
+
function tryGetPerformance() {
|
|
5266
|
+
if (isNodeLikeSystem()) {
|
|
5267
|
+
try {
|
|
5268
|
+
const { performance: performance2 } = require("perf_hooks");
|
|
5269
|
+
return {
|
|
5270
|
+
shouldWriteNativeEvents: false,
|
|
5271
|
+
performance: performance2
|
|
5272
|
+
};
|
|
5273
|
+
} catch {
|
|
5274
|
+
}
|
|
5275
|
+
}
|
|
5276
|
+
if (typeof performance === "object") {
|
|
5270
5277
|
return {
|
|
5271
|
-
// For now we always write native performance events when running in the browser. We may
|
|
5272
|
-
// make this conditional in the future if we find that native web performance hooks
|
|
5273
|
-
// in the browser also slow down compilation.
|
|
5274
5278
|
shouldWriteNativeEvents: true,
|
|
5275
|
-
performance
|
|
5276
|
-
PerformanceObserver
|
|
5279
|
+
performance
|
|
5277
5280
|
};
|
|
5278
5281
|
}
|
|
5282
|
+
return void 0;
|
|
5279
5283
|
}
|
|
5280
|
-
function
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5284
|
+
function tryGetPerformanceHooks() {
|
|
5285
|
+
const p = tryGetPerformance();
|
|
5286
|
+
if (!p)
|
|
5287
|
+
return void 0;
|
|
5288
|
+
const { shouldWriteNativeEvents, performance: performance2 } = p;
|
|
5289
|
+
const hooks = {
|
|
5290
|
+
shouldWriteNativeEvents,
|
|
5291
|
+
performance: void 0,
|
|
5292
|
+
performanceTime: void 0
|
|
5293
|
+
};
|
|
5294
|
+
if (typeof performance2.timeOrigin === "number" && typeof performance2.now === "function") {
|
|
5295
|
+
hooks.performanceTime = performance2;
|
|
5296
|
+
}
|
|
5297
|
+
if (hooks.performanceTime && typeof performance2.mark === "function" && typeof performance2.measure === "function" && typeof performance2.clearMarks === "function" && typeof performance2.clearMeasures === "function") {
|
|
5298
|
+
hooks.performance = performance2;
|
|
5294
5299
|
}
|
|
5300
|
+
return hooks;
|
|
5295
5301
|
}
|
|
5296
|
-
var nativePerformanceHooks =
|
|
5297
|
-
var
|
|
5302
|
+
var nativePerformanceHooks = tryGetPerformanceHooks();
|
|
5303
|
+
var nativePerformanceTime = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performanceTime;
|
|
5298
5304
|
function tryGetNativePerformanceHooks() {
|
|
5299
5305
|
return nativePerformanceHooks;
|
|
5300
5306
|
}
|
|
5301
|
-
var timestamp =
|
|
5307
|
+
var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;
|
|
5302
5308
|
|
|
5303
5309
|
// src/compiler/perfLogger.ts
|
|
5304
5310
|
var etwModule;
|
|
@@ -5418,7 +5424,7 @@ function enable(system = sys) {
|
|
|
5418
5424
|
if (!enabled) {
|
|
5419
5425
|
enabled = true;
|
|
5420
5426
|
perfHooks || (perfHooks = tryGetNativePerformanceHooks());
|
|
5421
|
-
if (perfHooks) {
|
|
5427
|
+
if (perfHooks == null ? void 0 : perfHooks.performance) {
|
|
5422
5428
|
timeorigin = perfHooks.performance.timeOrigin;
|
|
5423
5429
|
if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) {
|
|
5424
5430
|
performanceImpl = perfHooks.performance;
|
|
@@ -69797,7 +69803,7 @@ function createTypeChecker(host) {
|
|
|
69797
69803
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
69798
69804
|
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
69799
69805
|
if (inferredCovariantType || inferredContravariantType) {
|
|
69800
|
-
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) =>
|
|
69806
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType))));
|
|
69801
69807
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
69802
69808
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
69803
69809
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
@@ -78660,7 +78666,7 @@ function createTypeChecker(host) {
|
|
|
78660
78666
|
/*contextFlags*/
|
|
78661
78667
|
void 0
|
|
78662
78668
|
);
|
|
78663
|
-
const returnType2 = contextualReturnType &&
|
|
78669
|
+
const returnType2 = contextualReturnType && (unwrapReturnType(contextualReturnType, functionFlags) || voidType).flags & 32768 /* Undefined */ ? undefinedType : voidType;
|
|
78664
78670
|
return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, returnType2) : (
|
|
78665
78671
|
// Async function
|
|
78666
78672
|
returnType2
|
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-
|
|
5
|
+
"version": "5.5.0-pr-57909-8",
|
|
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": "9ec4eed05462d40e11f8f84b69735e6ab4471407"
|
|
117
117
|
}
|