@typescript-deploys/pr-build 5.5.0-pr-58001-5 → 5.5.0-pr-58025-3
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/README.md +1 -1
- package/lib/lib.es5.d.ts +1 -1
- package/lib/tsc.js +149 -42
- package/lib/typescript.d.ts +225 -0
- package/lib/typescript.js +289 -165
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI)
|
|
5
5
|
[](https://www.npmjs.com/package/typescript)
|
|
6
6
|
[](https://www.npmjs.com/package/typescript)
|
|
7
|
-
[](https://
|
|
7
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -818,7 +818,7 @@ interface Date {
|
|
|
818
818
|
getMilliseconds(): number;
|
|
819
819
|
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
|
|
820
820
|
getUTCMilliseconds(): number;
|
|
821
|
-
/** Gets the difference in minutes between the time on the local computer
|
|
821
|
+
/** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */
|
|
822
822
|
getTimezoneOffset(): number;
|
|
823
823
|
/**
|
|
824
824
|
* Sets the date and time value in the Date object.
|
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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240401`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -3924,6 +3924,7 @@ var commentPragmas = {
|
|
|
3924
3924
|
kind: 4 /* MultiLine */
|
|
3925
3925
|
}
|
|
3926
3926
|
};
|
|
3927
|
+
var _optionsType = [void 0][0];
|
|
3927
3928
|
|
|
3928
3929
|
// src/compiler/sys.ts
|
|
3929
3930
|
function generateDjb2Hash(data) {
|
|
@@ -7154,6 +7155,9 @@ var Diagnostics = {
|
|
|
7154
7155
|
There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
|
|
7155
7156
|
Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: diag(6279, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),
|
|
7156
7157
|
There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: diag(6280, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),
|
|
7158
|
+
package_json_has_a_peerDependencies_field: diag(6281, 3 /* Message */, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."),
|
|
7159
|
+
Found_peerDependency_0_with_1_version: diag(6282, 3 /* Message */, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."),
|
|
7160
|
+
Failed_to_find_peerDependency_0: diag(6283, 3 /* Message */, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."),
|
|
7157
7161
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
7158
7162
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
7159
7163
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -11572,13 +11576,13 @@ function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, pack
|
|
|
11572
11576
|
return result;
|
|
11573
11577
|
}
|
|
11574
11578
|
function packageIdIsEqual(a, b) {
|
|
11575
|
-
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
|
|
11579
|
+
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version && a.peerDependencies === b.peerDependencies;
|
|
11576
11580
|
}
|
|
11577
11581
|
function packageIdToPackageName({ name, subModuleName }) {
|
|
11578
11582
|
return subModuleName ? `${name}/${subModuleName}` : name;
|
|
11579
11583
|
}
|
|
11580
11584
|
function packageIdToString(packageId) {
|
|
11581
|
-
return `${packageIdToPackageName(packageId)}@${packageId.version}`;
|
|
11585
|
+
return `${packageIdToPackageName(packageId)}@${packageId.version}${packageId.peerDependencies ?? ""}`;
|
|
11582
11586
|
}
|
|
11583
11587
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
11584
11588
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
@@ -33834,13 +33838,16 @@ var compileOnSaveCommandLineOption = {
|
|
|
33834
33838
|
type: "boolean",
|
|
33835
33839
|
defaultValueDescription: false
|
|
33836
33840
|
};
|
|
33837
|
-
|
|
33841
|
+
function strongMap(input) {
|
|
33842
|
+
return new Map(Object.entries(input));
|
|
33843
|
+
}
|
|
33844
|
+
var jsxOptionMap = strongMap({
|
|
33838
33845
|
"preserve": 1 /* Preserve */,
|
|
33839
33846
|
"react-native": 3 /* ReactNative */,
|
|
33840
33847
|
"react": 2 /* React */,
|
|
33841
33848
|
"react-jsx": 4 /* ReactJSX */,
|
|
33842
33849
|
"react-jsxdev": 5 /* ReactJSXDev */
|
|
33843
|
-
})
|
|
33850
|
+
});
|
|
33844
33851
|
var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => ["" + value, key]));
|
|
33845
33852
|
var libEntries = [
|
|
33846
33853
|
// JavaScript only
|
|
@@ -33938,38 +33945,38 @@ var libMap = new Map(libEntries);
|
|
|
33938
33945
|
var optionsForWatch = [
|
|
33939
33946
|
{
|
|
33940
33947
|
name: "watchFile",
|
|
33941
|
-
type:
|
|
33948
|
+
type: strongMap({
|
|
33942
33949
|
fixedpollinginterval: 0 /* FixedPollingInterval */,
|
|
33943
33950
|
prioritypollinginterval: 1 /* PriorityPollingInterval */,
|
|
33944
33951
|
dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
|
|
33945
33952
|
fixedchunksizepolling: 3 /* FixedChunkSizePolling */,
|
|
33946
33953
|
usefsevents: 4 /* UseFsEvents */,
|
|
33947
33954
|
usefseventsonparentdirectory: 5 /* UseFsEventsOnParentDirectory */
|
|
33948
|
-
})
|
|
33955
|
+
}),
|
|
33949
33956
|
category: Diagnostics.Watch_and_Build_Modes,
|
|
33950
33957
|
description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
33951
33958
|
defaultValueDescription: 4 /* UseFsEvents */
|
|
33952
33959
|
},
|
|
33953
33960
|
{
|
|
33954
33961
|
name: "watchDirectory",
|
|
33955
|
-
type:
|
|
33962
|
+
type: strongMap({
|
|
33956
33963
|
usefsevents: 0 /* UseFsEvents */,
|
|
33957
33964
|
fixedpollinginterval: 1 /* FixedPollingInterval */,
|
|
33958
33965
|
dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
|
|
33959
33966
|
fixedchunksizepolling: 3 /* FixedChunkSizePolling */
|
|
33960
|
-
})
|
|
33967
|
+
}),
|
|
33961
33968
|
category: Diagnostics.Watch_and_Build_Modes,
|
|
33962
33969
|
description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
33963
33970
|
defaultValueDescription: 0 /* UseFsEvents */
|
|
33964
33971
|
},
|
|
33965
33972
|
{
|
|
33966
33973
|
name: "fallbackPolling",
|
|
33967
|
-
type:
|
|
33974
|
+
type: strongMap({
|
|
33968
33975
|
fixedinterval: 0 /* FixedInterval */,
|
|
33969
33976
|
priorityinterval: 1 /* PriorityInterval */,
|
|
33970
33977
|
dynamicpriority: 2 /* DynamicPriority */,
|
|
33971
33978
|
fixedchunksize: 3 /* FixedChunkSize */
|
|
33972
|
-
})
|
|
33979
|
+
}),
|
|
33973
33980
|
category: Diagnostics.Watch_and_Build_Modes,
|
|
33974
33981
|
description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
|
|
33975
33982
|
defaultValueDescription: 1 /* PriorityInterval */
|
|
@@ -34195,7 +34202,7 @@ var commonOptionsWithBuild = [
|
|
|
34195
34202
|
var targetOptionDeclaration = {
|
|
34196
34203
|
name: "target",
|
|
34197
34204
|
shortName: "t",
|
|
34198
|
-
type:
|
|
34205
|
+
type: strongMap({
|
|
34199
34206
|
es3: 0 /* ES3 */,
|
|
34200
34207
|
es5: 1 /* ES5 */,
|
|
34201
34208
|
es6: 2 /* ES2015 */,
|
|
@@ -34208,7 +34215,7 @@ var targetOptionDeclaration = {
|
|
|
34208
34215
|
es2021: 8 /* ES2021 */,
|
|
34209
34216
|
es2022: 9 /* ES2022 */,
|
|
34210
34217
|
esnext: 99 /* ESNext */
|
|
34211
|
-
})
|
|
34218
|
+
}),
|
|
34212
34219
|
affectsSourceFile: true,
|
|
34213
34220
|
affectsModuleResolution: true,
|
|
34214
34221
|
affectsEmit: true,
|
|
@@ -34223,7 +34230,7 @@ var targetOptionDeclaration = {
|
|
|
34223
34230
|
var moduleOptionDeclaration = {
|
|
34224
34231
|
name: "module",
|
|
34225
34232
|
shortName: "m",
|
|
34226
|
-
type:
|
|
34233
|
+
type: strongMap({
|
|
34227
34234
|
none: 0 /* None */,
|
|
34228
34235
|
commonjs: 1 /* CommonJS */,
|
|
34229
34236
|
amd: 2 /* AMD */,
|
|
@@ -34237,7 +34244,7 @@ var moduleOptionDeclaration = {
|
|
|
34237
34244
|
node16: 100 /* Node16 */,
|
|
34238
34245
|
nodenext: 199 /* NodeNext */,
|
|
34239
34246
|
preserve: 200 /* Preserve */
|
|
34240
|
-
})
|
|
34247
|
+
}),
|
|
34241
34248
|
affectsSourceFile: true,
|
|
34242
34249
|
affectsModuleResolution: true,
|
|
34243
34250
|
affectsEmit: true,
|
|
@@ -34456,11 +34463,11 @@ var commandOptionsWithoutBuild = [
|
|
|
34456
34463
|
},
|
|
34457
34464
|
{
|
|
34458
34465
|
name: "importsNotUsedAsValues",
|
|
34459
|
-
type:
|
|
34466
|
+
type: strongMap({
|
|
34460
34467
|
remove: 0 /* Remove */,
|
|
34461
34468
|
preserve: 1 /* Preserve */,
|
|
34462
34469
|
error: 2 /* Error */
|
|
34463
|
-
})
|
|
34470
|
+
}),
|
|
34464
34471
|
affectsEmit: true,
|
|
34465
34472
|
affectsSemanticDiagnostics: true,
|
|
34466
34473
|
affectsBuildInfo: true,
|
|
@@ -34668,7 +34675,7 @@ var commandOptionsWithoutBuild = [
|
|
|
34668
34675
|
// Module Resolution
|
|
34669
34676
|
{
|
|
34670
34677
|
name: "moduleResolution",
|
|
34671
|
-
type:
|
|
34678
|
+
type: strongMap({
|
|
34672
34679
|
// N.B. The first entry specifies the value shown in `tsc --init`
|
|
34673
34680
|
node10: 2 /* Node10 */,
|
|
34674
34681
|
node: 2 /* Node10 */,
|
|
@@ -34676,7 +34683,7 @@ var commandOptionsWithoutBuild = [
|
|
|
34676
34683
|
node16: 3 /* Node16 */,
|
|
34677
34684
|
nodenext: 99 /* NodeNext */,
|
|
34678
34685
|
bundler: 100 /* Bundler */
|
|
34679
|
-
})
|
|
34686
|
+
}),
|
|
34680
34687
|
deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
|
|
34681
34688
|
affectsSourceFile: true,
|
|
34682
34689
|
affectsModuleResolution: true,
|
|
@@ -34972,10 +34979,10 @@ var commandOptionsWithoutBuild = [
|
|
|
34972
34979
|
},
|
|
34973
34980
|
{
|
|
34974
34981
|
name: "newLine",
|
|
34975
|
-
type:
|
|
34982
|
+
type: strongMap({
|
|
34976
34983
|
crlf: 0 /* CarriageReturnLineFeed */,
|
|
34977
34984
|
lf: 1 /* LineFeed */
|
|
34978
|
-
})
|
|
34985
|
+
}),
|
|
34979
34986
|
affectsEmit: true,
|
|
34980
34987
|
affectsBuildInfo: true,
|
|
34981
34988
|
paramType: Diagnostics.NEWLINE,
|
|
@@ -35216,11 +35223,11 @@ var commandOptionsWithoutBuild = [
|
|
|
35216
35223
|
},
|
|
35217
35224
|
{
|
|
35218
35225
|
name: "moduleDetection",
|
|
35219
|
-
type:
|
|
35226
|
+
type: strongMap({
|
|
35220
35227
|
auto: 2 /* Auto */,
|
|
35221
35228
|
legacy: 1 /* Legacy */,
|
|
35222
35229
|
force: 3 /* Force */
|
|
35223
|
-
})
|
|
35230
|
+
}),
|
|
35224
35231
|
affectsSourceFile: true,
|
|
35225
35232
|
affectsModuleResolution: true,
|
|
35226
35233
|
description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
|
|
@@ -35592,7 +35599,10 @@ function getDiagnosticText(message, ...args) {
|
|
|
35592
35599
|
return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
|
|
35593
35600
|
}
|
|
35594
35601
|
function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
|
|
35595
|
-
const
|
|
35602
|
+
const typeConfig = hasTSFileExtension(configFileName) || hasJSFileExtension(configFileName) ? loadConfigFromDefaultType(
|
|
35603
|
+
configFileName
|
|
35604
|
+
) : void 0;
|
|
35605
|
+
const configFileText = typeConfig ? typeConfig.configText : tryReadFile(configFileName, (fileName) => host.readFile(fileName));
|
|
35596
35606
|
if (!isString(configFileText)) {
|
|
35597
35607
|
host.onUnRecoverableConfigFileDiagnostic(configFileText);
|
|
35598
35608
|
return void 0;
|
|
@@ -35602,7 +35612,7 @@ function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host,
|
|
|
35602
35612
|
result.path = toPath(configFileName, cwd, createGetCanonicalFileName(host.useCaseSensitiveFileNames));
|
|
35603
35613
|
result.resolvedPath = result.path;
|
|
35604
35614
|
result.originalFileName = result.fileName;
|
|
35605
|
-
|
|
35615
|
+
const parsedResult = parseJsonSourceFileConfigFileContent(
|
|
35606
35616
|
result,
|
|
35607
35617
|
host,
|
|
35608
35618
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd),
|
|
@@ -35614,6 +35624,64 @@ function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host,
|
|
|
35614
35624
|
extendedConfigCache,
|
|
35615
35625
|
watchOptionsToExtend
|
|
35616
35626
|
);
|
|
35627
|
+
parsedResult.errors = concatenate(parsedResult.errors, typeConfig == null ? void 0 : typeConfig.errors);
|
|
35628
|
+
return parsedResult;
|
|
35629
|
+
}
|
|
35630
|
+
function loadConfigFromDefaultType(configFileName) {
|
|
35631
|
+
const program = createProgram({
|
|
35632
|
+
rootNames: [configFileName],
|
|
35633
|
+
options: {
|
|
35634
|
+
strict: true,
|
|
35635
|
+
exactOptionalPropertyTypes: true,
|
|
35636
|
+
noEmit: true,
|
|
35637
|
+
module: 199 /* NodeNext */,
|
|
35638
|
+
target: 99 /* Latest */,
|
|
35639
|
+
allowJs: true,
|
|
35640
|
+
resolveJsonModule: true,
|
|
35641
|
+
allowArbitraryExtensions: true,
|
|
35642
|
+
lib: ["esnext"],
|
|
35643
|
+
types: [],
|
|
35644
|
+
moduleDetection: 3 /* Force */
|
|
35645
|
+
}
|
|
35646
|
+
// TODO: Use passed-in host object instead of sys
|
|
35647
|
+
});
|
|
35648
|
+
const file = Debug.checkDefined(program.getSourceFile(configFileName));
|
|
35649
|
+
const checker = program.getTypeChecker();
|
|
35650
|
+
const defaultMember = checker.tryGetMemberInModuleExports("default" /* Default */, file.symbol);
|
|
35651
|
+
if (!defaultMember) {
|
|
35652
|
+
return void 0;
|
|
35653
|
+
}
|
|
35654
|
+
const type = checker.getTypeOfSymbol(defaultMember);
|
|
35655
|
+
const raw = convertTypeIntoRawConfig(checker, type);
|
|
35656
|
+
return {
|
|
35657
|
+
errors: program.getSemanticDiagnostics(file).slice(),
|
|
35658
|
+
configText: JSON.stringify(raw)
|
|
35659
|
+
};
|
|
35660
|
+
}
|
|
35661
|
+
function convertTypeIntoRawConfig(checker, type) {
|
|
35662
|
+
return convertType(type);
|
|
35663
|
+
function convertType(type2) {
|
|
35664
|
+
if (type2.flags & 512 /* BooleanLiteral */) {
|
|
35665
|
+
return type2.intrinsicName === "true" ? true : false;
|
|
35666
|
+
}
|
|
35667
|
+
if (type2.flags & 256 /* NumberLiteral */ || type2.flags & 128 /* StringLiteral */) {
|
|
35668
|
+
return type2.value;
|
|
35669
|
+
}
|
|
35670
|
+
if (checker.isTupleType(type2)) {
|
|
35671
|
+
const args = checker.getTypeArguments(type2);
|
|
35672
|
+
return map(args, convertType);
|
|
35673
|
+
}
|
|
35674
|
+
if (type2.flags & 524288 /* Object */) {
|
|
35675
|
+
const result = {};
|
|
35676
|
+
const members = checker.getPropertiesOfType(type2);
|
|
35677
|
+
for (const member of members) {
|
|
35678
|
+
const name = symbolName(member);
|
|
35679
|
+
result[name] = convertType(checker.getTypeOfSymbol(member));
|
|
35680
|
+
}
|
|
35681
|
+
return result;
|
|
35682
|
+
}
|
|
35683
|
+
return void 0;
|
|
35684
|
+
}
|
|
35617
35685
|
}
|
|
35618
35686
|
function parseConfigFileTextToJson(fileName, jsonText) {
|
|
35619
35687
|
const jsonSourceFile = parseJsonText(fileName, jsonText);
|
|
@@ -36968,7 +37036,7 @@ function trace(host, message, ...args) {
|
|
|
36968
37036
|
function isTraceEnabled(compilerOptions, host) {
|
|
36969
37037
|
return !!compilerOptions.traceResolution && host.trace !== void 0;
|
|
36970
37038
|
}
|
|
36971
|
-
function withPackageId(packageInfo, r) {
|
|
37039
|
+
function withPackageId(packageInfo, r, state) {
|
|
36972
37040
|
let packageId;
|
|
36973
37041
|
if (r && packageInfo) {
|
|
36974
37042
|
const packageJsonContent = packageInfo.contents.packageJsonContent;
|
|
@@ -36976,7 +37044,8 @@ function withPackageId(packageInfo, r) {
|
|
|
36976
37044
|
packageId = {
|
|
36977
37045
|
name: packageJsonContent.name,
|
|
36978
37046
|
subModuleName: r.path.slice(packageInfo.packageDirectory.length + directorySeparator.length),
|
|
36979
|
-
version: packageJsonContent.version
|
|
37047
|
+
version: packageJsonContent.version,
|
|
37048
|
+
peerDependencies: getPeerDependenciesOfPackageJsonInfo(packageInfo, state)
|
|
36980
37049
|
};
|
|
36981
37050
|
}
|
|
36982
37051
|
}
|
|
@@ -36986,7 +37055,9 @@ function noPackageId(r) {
|
|
|
36986
37055
|
return withPackageId(
|
|
36987
37056
|
/*packageInfo*/
|
|
36988
37057
|
void 0,
|
|
36989
|
-
r
|
|
37058
|
+
r,
|
|
37059
|
+
/*state*/
|
|
37060
|
+
void 0
|
|
36990
37061
|
);
|
|
36991
37062
|
}
|
|
36992
37063
|
function removeIgnoredPackageId(r) {
|
|
@@ -37352,7 +37423,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
|
|
|
37352
37423
|
false,
|
|
37353
37424
|
moduleResolutionState
|
|
37354
37425
|
) : void 0;
|
|
37355
|
-
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile));
|
|
37426
|
+
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile, moduleResolutionState));
|
|
37356
37427
|
}
|
|
37357
37428
|
}
|
|
37358
37429
|
return resolvedTypeScriptOnly(
|
|
@@ -38288,7 +38359,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
|
|
|
38288
38359
|
false,
|
|
38289
38360
|
state
|
|
38290
38361
|
) : void 0;
|
|
38291
|
-
return withPackageId(packageInfo, resolvedFromFile);
|
|
38362
|
+
return withPackageId(packageInfo, resolvedFromFile, state);
|
|
38292
38363
|
}
|
|
38293
38364
|
}
|
|
38294
38365
|
if (!onlyRecordFailures) {
|
|
@@ -38431,7 +38502,7 @@ function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures,
|
|
|
38431
38502
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
38432
38503
|
const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent;
|
|
38433
38504
|
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
|
38434
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths));
|
|
38505
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);
|
|
38435
38506
|
}
|
|
38436
38507
|
function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) {
|
|
38437
38508
|
return {
|
|
@@ -38473,6 +38544,42 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) {
|
|
|
38473
38544
|
}
|
|
38474
38545
|
return packageJsonInfo.contents.versionPaths || void 0;
|
|
38475
38546
|
}
|
|
38547
|
+
function getPeerDependenciesOfPackageJsonInfo(packageJsonInfo, state) {
|
|
38548
|
+
if (packageJsonInfo.contents.peerDependencies === void 0) {
|
|
38549
|
+
packageJsonInfo.contents.peerDependencies = readPackageJsonPeerDependencies(packageJsonInfo, state) || false;
|
|
38550
|
+
}
|
|
38551
|
+
return packageJsonInfo.contents.peerDependencies || void 0;
|
|
38552
|
+
}
|
|
38553
|
+
function readPackageJsonPeerDependencies(packageJsonInfo, state) {
|
|
38554
|
+
const peerDependencies = readPackageJsonField(packageJsonInfo.contents.packageJsonContent, "peerDependencies", "object", state);
|
|
38555
|
+
if (peerDependencies === void 0)
|
|
38556
|
+
return void 0;
|
|
38557
|
+
if (state.traceEnabled)
|
|
38558
|
+
trace(state.host, Diagnostics.package_json_has_a_peerDependencies_field);
|
|
38559
|
+
const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);
|
|
38560
|
+
const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf("node_modules") + "node_modules".length) + directorySeparator;
|
|
38561
|
+
let result = "";
|
|
38562
|
+
for (const key in peerDependencies) {
|
|
38563
|
+
if (hasProperty(peerDependencies, key)) {
|
|
38564
|
+
const peerPackageJson = getPackageJsonInfo(
|
|
38565
|
+
nodeModules + key,
|
|
38566
|
+
/*onlyRecordFailures*/
|
|
38567
|
+
false,
|
|
38568
|
+
state
|
|
38569
|
+
);
|
|
38570
|
+
if (peerPackageJson) {
|
|
38571
|
+
const version2 = peerPackageJson.contents.packageJsonContent.version;
|
|
38572
|
+
result += `+${key}@${version2}`;
|
|
38573
|
+
if (state.traceEnabled)
|
|
38574
|
+
trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version2);
|
|
38575
|
+
} else {
|
|
38576
|
+
if (state.traceEnabled)
|
|
38577
|
+
trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);
|
|
38578
|
+
}
|
|
38579
|
+
}
|
|
38580
|
+
}
|
|
38581
|
+
return result;
|
|
38582
|
+
}
|
|
38476
38583
|
function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
38477
38584
|
var _a, _b, _c, _d, _e, _f;
|
|
38478
38585
|
const { host, traceEnabled } = state;
|
|
@@ -38501,7 +38608,7 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
38501
38608
|
if (traceEnabled) {
|
|
38502
38609
|
trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);
|
|
38503
38610
|
}
|
|
38504
|
-
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } };
|
|
38611
|
+
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0, peerDependencies: void 0 } };
|
|
38505
38612
|
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
38506
38613
|
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result);
|
|
38507
38614
|
(_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath);
|
|
@@ -38899,7 +39006,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
38899
39006
|
/*onlyRecordFailures*/
|
|
38900
39007
|
false,
|
|
38901
39008
|
state
|
|
38902
|
-
)));
|
|
39009
|
+
), state));
|
|
38903
39010
|
} else if (typeof target === "object" && target !== null) {
|
|
38904
39011
|
if (!Array.isArray(target)) {
|
|
38905
39012
|
traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
|
|
@@ -39013,7 +39120,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
39013
39120
|
/*onlyRecordFailures*/
|
|
39014
39121
|
false,
|
|
39015
39122
|
state
|
|
39016
|
-
)));
|
|
39123
|
+
), state));
|
|
39017
39124
|
}
|
|
39018
39125
|
}
|
|
39019
39126
|
}
|
|
@@ -39144,7 +39251,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
39144
39251
|
packageInfo.contents.packageJsonContent,
|
|
39145
39252
|
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
39146
39253
|
);
|
|
39147
|
-
return withPackageId(packageInfo, fromDirectory);
|
|
39254
|
+
return withPackageId(packageInfo, fromDirectory, state);
|
|
39148
39255
|
}
|
|
39149
39256
|
const loader = (extensions2, candidate2, onlyRecordFailures, state2) => {
|
|
39150
39257
|
let pathAndExtension = (rest || !(state2.features & 32 /* EsmMode */)) && loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker(
|
|
@@ -39158,7 +39265,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
39158
39265
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
|
39159
39266
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
|
39160
39267
|
}
|
|
39161
|
-
return withPackageId(packageInfo, pathAndExtension);
|
|
39268
|
+
return withPackageId(packageInfo, pathAndExtension, state2);
|
|
39162
39269
|
};
|
|
39163
39270
|
if (rest !== "") {
|
|
39164
39271
|
packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
@@ -39365,7 +39472,7 @@ function resolveFromTypeRoot(moduleName, state) {
|
|
|
39365
39472
|
false,
|
|
39366
39473
|
state
|
|
39367
39474
|
) : void 0;
|
|
39368
|
-
return toSearchResult(withPackageId(packageInfo, resolvedFromFile));
|
|
39475
|
+
return toSearchResult(withPackageId(packageInfo, resolvedFromFile, state));
|
|
39369
39476
|
}
|
|
39370
39477
|
const resolved = loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, state);
|
|
39371
39478
|
if (resolved)
|
|
@@ -43433,7 +43540,7 @@ function createTypeChecker(host) {
|
|
|
43433
43540
|
var requestedExternalEmitHelpers;
|
|
43434
43541
|
var externalHelpersModule;
|
|
43435
43542
|
var Symbol12 = objectAllocator.getSymbolConstructor();
|
|
43436
|
-
var
|
|
43543
|
+
var Type8 = objectAllocator.getTypeConstructor();
|
|
43437
43544
|
var Signature5 = objectAllocator.getSignatureConstructor();
|
|
43438
43545
|
var typeCount = 0;
|
|
43439
43546
|
var symbolCount = 0;
|
|
@@ -47347,7 +47454,7 @@ function createTypeChecker(host) {
|
|
|
47347
47454
|
}
|
|
47348
47455
|
function createType(flags) {
|
|
47349
47456
|
var _a;
|
|
47350
|
-
const result = new
|
|
47457
|
+
const result = new Type8(checker, flags);
|
|
47351
47458
|
typeCount++;
|
|
47352
47459
|
result.id = typeCount;
|
|
47353
47460
|
(_a = tracing) == null ? void 0 : _a.recordType(result);
|
|
@@ -47359,7 +47466,7 @@ function createTypeChecker(host) {
|
|
|
47359
47466
|
return result;
|
|
47360
47467
|
}
|
|
47361
47468
|
function createOriginType(flags) {
|
|
47362
|
-
return new
|
|
47469
|
+
return new Type8(checker, flags);
|
|
47363
47470
|
}
|
|
47364
47471
|
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
|
|
47365
47472
|
checkIntrinsicName(intrinsicName, debugIntrinsicName);
|
|
@@ -49879,7 +49986,7 @@ function createTypeChecker(host) {
|
|
|
49879
49986
|
if (typeFromTypeNode === type) {
|
|
49880
49987
|
return true;
|
|
49881
49988
|
}
|
|
49882
|
-
if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
|
|
49989
|
+
if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
|
|
49883
49990
|
return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode;
|
|
49884
49991
|
}
|
|
49885
49992
|
return false;
|
|
@@ -67105,7 +67212,7 @@ function createTypeChecker(host) {
|
|
|
67105
67212
|
if (!hasDefaultClause) {
|
|
67106
67213
|
return caseType;
|
|
67107
67214
|
}
|
|
67108
|
-
const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes,
|
|
67215
|
+
const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, getRegularTypeOfLiteralType(extractUnitType(t)))));
|
|
67109
67216
|
return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);
|
|
67110
67217
|
}
|
|
67111
67218
|
function narrowTypeByTypeName(type, typeName) {
|