Skip to content

Commit e496861

Browse files
committed
Generated libs
1 parent b8da895 commit e496861

10 files changed

+902
-96
lines changed

lib/lib.esnext.bigint.d.ts

Lines changed: 629 additions & 0 deletions
Large diffs are not rendered by default.

lib/tsc.js

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5696,6 +5696,7 @@ var ts;
56965696
Declare_static_property_0: diag(90027, ts.DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"),
56975697
Call_decorator_expression: diag(90028, ts.DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"),
56985698
Add_async_modifier_to_containing_function: diag(90029, ts.DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"),
5699+
List_of_platform_extensions_to_fallback_on: diag(910044, ts.DiagnosticCategory.Message, "List_of_platform_extensions_to_fallback_on_910044", "List of platform extensions to fallback on"),
56995700
Replace_infer_0_with_unknown: diag(90030, ts.DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"),
57005701
Replace_all_unused_infer_with_unknown: diag(90031, ts.DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"),
57015702
Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""),
@@ -28568,6 +28569,17 @@ var ts;
2856828569
category: ts.Diagnostics.Module_Resolution_Options,
2856928570
description: ts.Diagnostics.Do_not_resolve_the_real_path_of_symlinks,
2857028571
},
28572+
{
28573+
name: "resolutionPlatforms",
28574+
type: "list",
28575+
element: {
28576+
name: "types",
28577+
type: "string"
28578+
},
28579+
showInSimplifiedHelpView: true,
28580+
category: ts.Diagnostics.Module_Resolution_Options,
28581+
description: ts.Diagnostics.List_of_platform_extensions_to_fallback_on
28582+
},
2857128583
{
2857228584
name: "allowUmdGlobalAccess",
2857328585
type: "boolean",
@@ -31199,22 +31211,42 @@ var ts;
3119931211
return path === undefined ? undefined : { path: path, ext: ext };
3120031212
}
3120131213
}
31202-
function tryFile(fileName, onlyRecordFailures, state) {
31203-
if (!onlyRecordFailures) {
31204-
if (state.host.fileExists(fileName)) {
31205-
if (state.traceEnabled) {
31206-
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
31214+
function tryFile(file, onlyRecordFailures, state) {
31215+
if (state.compilerOptions.resolutionPlatforms) {
31216+
for (var _i = 0, _a = state.compilerOptions.resolutionPlatforms; _i < _a.length; _i++) {
31217+
var platform = _a[_i];
31218+
var result = tryFileInner(platform);
31219+
if (result) {
31220+
return result;
3120731221
}
31208-
return fileName;
3120931222
}
31210-
else {
31211-
if (state.traceEnabled) {
31212-
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
31223+
}
31224+
return tryFileInner(null);
31225+
function tryFileInner(platform) {
31226+
var fileName = file;
31227+
if (platform) {
31228+
var lastDot = file.lastIndexOf('.');
31229+
if (lastDot === -1) {
31230+
return undefined;
3121331231
}
31232+
fileName = file.slice(0, lastDot + 1) + platform + file.slice(lastDot);
3121431233
}
31234+
if (!onlyRecordFailures) {
31235+
if (state.host.fileExists(fileName)) {
31236+
if (state.traceEnabled) {
31237+
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
31238+
}
31239+
return fileName;
31240+
}
31241+
else {
31242+
if (state.traceEnabled) {
31243+
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
31244+
}
31245+
}
31246+
}
31247+
state.failedLookupLocations.push(fileName);
31248+
return undefined;
3121531249
}
31216-
state.failedLookupLocations.push(fileName);
31217-
return undefined;
3121831250
}
3121931251
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
3122031252
if (considerPackageJson === void 0) { considerPackageJson = true; }
@@ -58916,13 +58948,10 @@ var ts;
5891658948
function checkTupleType(node) {
5891758949
var elementTypes = node.elements;
5891858950
var seenOptionalElement = false;
58919-
var seenNamedElement = false;
58951+
var hasNamedElement = ts.some(elementTypes, ts.isNamedTupleMember);
5892058952
for (var i = 0; i < elementTypes.length; i++) {
5892158953
var e = elementTypes[i];
58922-
if (e.kind === 191) {
58923-
seenNamedElement = true;
58924-
}
58925-
else if (seenNamedElement) {
58954+
if (e.kind !== 191 && hasNamedElement) {
5892658955
grammarErrorOnNode(e, ts.Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names);
5892758956
break;
5892858957
}

lib/tsserver.js

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8246,6 +8246,7 @@ var ts;
82468246
Declare_static_property_0: diag(90027, ts.DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"),
82478247
Call_decorator_expression: diag(90028, ts.DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"),
82488248
Add_async_modifier_to_containing_function: diag(90029, ts.DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"),
8249+
List_of_platform_extensions_to_fallback_on: diag(910044, ts.DiagnosticCategory.Message, "List_of_platform_extensions_to_fallback_on_910044", "List of platform extensions to fallback on"),
82498250
Replace_infer_0_with_unknown: diag(90030, ts.DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"),
82508251
Replace_all_unused_infer_with_unknown: diag(90031, ts.DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"),
82518252
Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""),
@@ -35330,6 +35331,17 @@ var ts;
3533035331
category: ts.Diagnostics.Module_Resolution_Options,
3533135332
description: ts.Diagnostics.Do_not_resolve_the_real_path_of_symlinks,
3533235333
},
35334+
{
35335+
name: "resolutionPlatforms",
35336+
type: "list",
35337+
element: {
35338+
name: "types",
35339+
type: "string"
35340+
},
35341+
showInSimplifiedHelpView: true,
35342+
category: ts.Diagnostics.Module_Resolution_Options,
35343+
description: ts.Diagnostics.List_of_platform_extensions_to_fallback_on
35344+
},
3533335345
{
3533435346
name: "allowUmdGlobalAccess",
3533535347
type: "boolean",
@@ -38402,22 +38414,42 @@ var ts;
3840238414
}
3840338415
}
3840438416
/** Return the file if it exists. */
38405-
function tryFile(fileName, onlyRecordFailures, state) {
38406-
if (!onlyRecordFailures) {
38407-
if (state.host.fileExists(fileName)) {
38408-
if (state.traceEnabled) {
38409-
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
38417+
function tryFile(file, onlyRecordFailures, state) {
38418+
if (state.compilerOptions.resolutionPlatforms) {
38419+
for (var _i = 0, _a = state.compilerOptions.resolutionPlatforms; _i < _a.length; _i++) {
38420+
var platform = _a[_i];
38421+
var result = tryFileInner(platform);
38422+
if (result) {
38423+
return result;
3841038424
}
38411-
return fileName;
3841238425
}
38413-
else {
38414-
if (state.traceEnabled) {
38415-
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
38426+
}
38427+
return tryFileInner(null);
38428+
function tryFileInner(platform) {
38429+
var fileName = file;
38430+
if (platform) {
38431+
var lastDot = file.lastIndexOf('.');
38432+
if (lastDot === -1) {
38433+
return undefined;
3841638434
}
38435+
fileName = file.slice(0, lastDot + 1) + platform + file.slice(lastDot);
3841738436
}
38437+
if (!onlyRecordFailures) {
38438+
if (state.host.fileExists(fileName)) {
38439+
if (state.traceEnabled) {
38440+
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
38441+
}
38442+
return fileName;
38443+
}
38444+
else {
38445+
if (state.traceEnabled) {
38446+
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
38447+
}
38448+
}
38449+
}
38450+
state.failedLookupLocations.push(fileName);
38451+
return undefined;
3841838452
}
38419-
state.failedLookupLocations.push(fileName);
38420-
return undefined;
3842138453
}
3842238454
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
3842338455
if (considerPackageJson === void 0) { considerPackageJson = true; }
@@ -70542,13 +70574,10 @@ var ts;
7054270574
function checkTupleType(node) {
7054370575
var elementTypes = node.elements;
7054470576
var seenOptionalElement = false;
70545-
var seenNamedElement = false;
70577+
var hasNamedElement = ts.some(elementTypes, ts.isNamedTupleMember);
7054670578
for (var i = 0; i < elementTypes.length; i++) {
7054770579
var e = elementTypes[i];
70548-
if (e.kind === 191 /* NamedTupleMember */) {
70549-
seenNamedElement = true;
70550-
}
70551-
else if (seenNamedElement) {
70580+
if (e.kind !== 191 /* NamedTupleMember */ && hasNamedElement) {
7055270581
grammarErrorOnNode(e, ts.Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names);
7055370582
break;
7055470583
}

lib/tsserverlibrary.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,6 +2812,7 @@ declare namespace ts {
28122812
incremental?: boolean;
28132813
tsBuildInfoFile?: string;
28142814
removeComments?: boolean;
2815+
resolutionPlatforms?: string[];
28152816
rootDir?: string;
28162817
rootDirs?: string[];
28172818
skipLibCheck?: boolean;

lib/tsserverlibrary.js

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8440,6 +8440,7 @@ var ts;
84408440
Declare_static_property_0: diag(90027, ts.DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"),
84418441
Call_decorator_expression: diag(90028, ts.DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"),
84428442
Add_async_modifier_to_containing_function: diag(90029, ts.DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"),
8443+
List_of_platform_extensions_to_fallback_on: diag(910044, ts.DiagnosticCategory.Message, "List_of_platform_extensions_to_fallback_on_910044", "List of platform extensions to fallback on"),
84438444
Replace_infer_0_with_unknown: diag(90030, ts.DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"),
84448445
Replace_all_unused_infer_with_unknown: diag(90031, ts.DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"),
84458446
Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""),
@@ -35524,6 +35525,17 @@ var ts;
3552435525
category: ts.Diagnostics.Module_Resolution_Options,
3552535526
description: ts.Diagnostics.Do_not_resolve_the_real_path_of_symlinks,
3552635527
},
35528+
{
35529+
name: "resolutionPlatforms",
35530+
type: "list",
35531+
element: {
35532+
name: "types",
35533+
type: "string"
35534+
},
35535+
showInSimplifiedHelpView: true,
35536+
category: ts.Diagnostics.Module_Resolution_Options,
35537+
description: ts.Diagnostics.List_of_platform_extensions_to_fallback_on
35538+
},
3552735539
{
3552835540
name: "allowUmdGlobalAccess",
3552935541
type: "boolean",
@@ -38596,22 +38608,42 @@ var ts;
3859638608
}
3859738609
}
3859838610
/** Return the file if it exists. */
38599-
function tryFile(fileName, onlyRecordFailures, state) {
38600-
if (!onlyRecordFailures) {
38601-
if (state.host.fileExists(fileName)) {
38602-
if (state.traceEnabled) {
38603-
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
38611+
function tryFile(file, onlyRecordFailures, state) {
38612+
if (state.compilerOptions.resolutionPlatforms) {
38613+
for (var _i = 0, _a = state.compilerOptions.resolutionPlatforms; _i < _a.length; _i++) {
38614+
var platform = _a[_i];
38615+
var result = tryFileInner(platform);
38616+
if (result) {
38617+
return result;
3860438618
}
38605-
return fileName;
3860638619
}
38607-
else {
38608-
if (state.traceEnabled) {
38609-
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
38620+
}
38621+
return tryFileInner(null);
38622+
function tryFileInner(platform) {
38623+
var fileName = file;
38624+
if (platform) {
38625+
var lastDot = file.lastIndexOf('.');
38626+
if (lastDot === -1) {
38627+
return undefined;
3861038628
}
38629+
fileName = file.slice(0, lastDot + 1) + platform + file.slice(lastDot);
3861138630
}
38631+
if (!onlyRecordFailures) {
38632+
if (state.host.fileExists(fileName)) {
38633+
if (state.traceEnabled) {
38634+
trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
38635+
}
38636+
return fileName;
38637+
}
38638+
else {
38639+
if (state.traceEnabled) {
38640+
trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
38641+
}
38642+
}
38643+
}
38644+
state.failedLookupLocations.push(fileName);
38645+
return undefined;
3861238646
}
38613-
state.failedLookupLocations.push(fileName);
38614-
return undefined;
3861538647
}
3861638648
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
3861738649
if (considerPackageJson === void 0) { considerPackageJson = true; }
@@ -70736,13 +70768,10 @@ var ts;
7073670768
function checkTupleType(node) {
7073770769
var elementTypes = node.elements;
7073870770
var seenOptionalElement = false;
70739-
var seenNamedElement = false;
70771+
var hasNamedElement = ts.some(elementTypes, ts.isNamedTupleMember);
7074070772
for (var i = 0; i < elementTypes.length; i++) {
7074170773
var e = elementTypes[i];
70742-
if (e.kind === 191 /* NamedTupleMember */) {
70743-
seenNamedElement = true;
70744-
}
70745-
else if (seenNamedElement) {
70774+
if (e.kind !== 191 /* NamedTupleMember */ && hasNamedElement) {
7074670775
grammarErrorOnNode(e, ts.Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names);
7074770776
break;
7074870777
}

lib/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,6 +2812,7 @@ declare namespace ts {
28122812
incremental?: boolean;
28132813
tsBuildInfoFile?: string;
28142814
removeComments?: boolean;
2815+
resolutionPlatforms?: string[];
28152816
rootDir?: string;
28162817
rootDirs?: string[];
28172818
skipLibCheck?: boolean;

0 commit comments

Comments
 (0)