@typescript-deploys/pr-build 5.8.0-pr-55267-203 → 5.8.0-pr-60718-25
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 +42 -22
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +43 -24
- package/package.json +1 -1
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.8";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20241211`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6850,6 +6850,8 @@ var Diagnostics = {
|
|
|
6850
6850
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6851
6851
|
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
6852
6852
|
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
6853
|
+
This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."),
|
|
6854
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),
|
|
6853
6855
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6854
6856
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6855
6857
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -40736,9 +40738,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) {
|
|
|
40736
40738
|
}
|
|
40737
40739
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) {
|
|
40738
40740
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
40739
|
-
|
|
40740
|
-
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
|
40741
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);
|
|
40741
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state);
|
|
40742
40742
|
}
|
|
40743
40743
|
function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) {
|
|
40744
40744
|
return {
|
|
@@ -40845,13 +40845,14 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
40845
40845
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
|
40846
40846
|
}
|
|
40847
40847
|
}
|
|
40848
|
-
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
|
40848
|
+
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) {
|
|
40849
|
+
const versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state);
|
|
40849
40850
|
let packageFile;
|
|
40850
|
-
if (
|
|
40851
|
+
if (packageJson && arePathsEqual(packageJson == null ? void 0 : packageJson.packageDirectory, candidate, state.host)) {
|
|
40851
40852
|
if (state.isConfigLookup) {
|
|
40852
|
-
packageFile = readPackageJsonTSConfigField(
|
|
40853
|
+
packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state);
|
|
40853
40854
|
} else {
|
|
40854
|
-
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(
|
|
40855
|
+
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0;
|
|
40855
40856
|
}
|
|
40856
40857
|
}
|
|
40857
40858
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
@@ -40870,7 +40871,7 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
40870
40871
|
const features = state2.features;
|
|
40871
40872
|
const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
|
|
40872
40873
|
state2.candidateIsFromPackageJsonField = true;
|
|
40873
|
-
if ((
|
|
40874
|
+
if ((packageJson == null ? void 0 : packageJson.contents.packageJsonContent.type) !== "module") {
|
|
40874
40875
|
state2.features &= ~32 /* EsmMode */;
|
|
40875
40876
|
}
|
|
40876
40877
|
const result = nodeLoadModuleByRelativeName(
|
|
@@ -41473,8 +41474,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
41473
41474
|
candidate,
|
|
41474
41475
|
!nodeModulesDirectoryExists,
|
|
41475
41476
|
state,
|
|
41476
|
-
packageInfo
|
|
41477
|
-
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
41477
|
+
packageInfo
|
|
41478
41478
|
);
|
|
41479
41479
|
return withPackageId(packageInfo, fromDirectory, state);
|
|
41480
41480
|
}
|
|
@@ -41484,8 +41484,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
41484
41484
|
candidate2,
|
|
41485
41485
|
onlyRecordFailures,
|
|
41486
41486
|
state2,
|
|
41487
|
-
packageInfo
|
|
41488
|
-
packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)
|
|
41487
|
+
packageInfo
|
|
41489
41488
|
);
|
|
41490
41489
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
|
41491
41490
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
|
@@ -68435,14 +68434,20 @@ function createTypeChecker(host) {
|
|
|
68435
68434
|
}
|
|
68436
68435
|
return false;
|
|
68437
68436
|
}
|
|
68438
|
-
function isDiscriminantProperty(type, name) {
|
|
68437
|
+
function isDiscriminantProperty(type, name, considerNonUniformPrimitivePropDiscriminant = true) {
|
|
68438
|
+
var _a;
|
|
68439
68439
|
if (type && type.flags & 1048576 /* Union */) {
|
|
68440
68440
|
const prop = getUnionOrIntersectionProperty(type, name);
|
|
68441
68441
|
if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
|
|
68442
|
-
|
|
68443
|
-
|
|
68442
|
+
const propType = getTypeOfSymbol(prop);
|
|
68443
|
+
const transientSymbol = prop;
|
|
68444
|
+
(_a = transientSymbol.links).isDiscriminantProperty ?? (_a.isDiscriminantProperty = /* @__PURE__ */ new Map());
|
|
68445
|
+
let isDiscriminant = transientSymbol.links.isDiscriminantProperty.get(considerNonUniformPrimitivePropDiscriminant);
|
|
68446
|
+
if (typeof isDiscriminant === "undefined") {
|
|
68447
|
+
isDiscriminant = ((transientSymbol.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ || !!(considerNonUniformPrimitivePropDiscriminant && transientSymbol.links.checkFlags & 64 /* HasNonUniformType */ && someType(propType, (t) => !!(t.flags & 402784252 /* Primitive */)))) && !isGenericType(propType);
|
|
68448
|
+
transientSymbol.links.isDiscriminantProperty.set(considerNonUniformPrimitivePropDiscriminant, isDiscriminant);
|
|
68444
68449
|
}
|
|
68445
|
-
return
|
|
68450
|
+
return isDiscriminant;
|
|
68446
68451
|
}
|
|
68447
68452
|
}
|
|
68448
68453
|
return false;
|
|
@@ -68450,7 +68455,12 @@ function createTypeChecker(host) {
|
|
|
68450
68455
|
function findDiscriminantProperties(sourceProperties, target) {
|
|
68451
68456
|
let result;
|
|
68452
68457
|
for (const sourceProperty of sourceProperties) {
|
|
68453
|
-
if (isDiscriminantProperty(
|
|
68458
|
+
if (isDiscriminantProperty(
|
|
68459
|
+
target,
|
|
68460
|
+
sourceProperty.escapedName,
|
|
68461
|
+
/*considerNonUniformPrimitivePropDiscriminant*/
|
|
68462
|
+
false
|
|
68463
|
+
)) {
|
|
68454
68464
|
if (result) {
|
|
68455
68465
|
result.push(sourceProperty);
|
|
68456
68466
|
continue;
|
|
@@ -70673,12 +70683,13 @@ function createTypeChecker(host) {
|
|
|
70673
70683
|
const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
70674
70684
|
const jsxFactoryNamespace = getJsxNamespace(node);
|
|
70675
70685
|
const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;
|
|
70686
|
+
const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
|
|
70676
70687
|
let jsxFactorySym;
|
|
70677
70688
|
if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
|
70678
70689
|
jsxFactorySym = resolveName(
|
|
70679
70690
|
jsxFactoryLocation,
|
|
70680
70691
|
jsxFactoryNamespace,
|
|
70681
|
-
|
|
70692
|
+
shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
70682
70693
|
jsxFactoryRefErr,
|
|
70683
70694
|
/*isUse*/
|
|
70684
70695
|
true
|
|
@@ -70698,7 +70709,7 @@ function createTypeChecker(host) {
|
|
|
70698
70709
|
resolveName(
|
|
70699
70710
|
jsxFactoryLocation,
|
|
70700
70711
|
localJsxNamespace,
|
|
70701
|
-
|
|
70712
|
+
shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
70702
70713
|
jsxFactoryRefErr,
|
|
70703
70714
|
/*isUse*/
|
|
70704
70715
|
true
|
|
@@ -76243,12 +76254,14 @@ function createTypeChecker(host) {
|
|
|
76243
76254
|
const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
|
|
76244
76255
|
if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
|
|
76245
76256
|
const jsxFragmentFactoryName = getJsxNamespace(node);
|
|
76246
|
-
|
|
76257
|
+
const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null";
|
|
76258
|
+
if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType;
|
|
76259
|
+
const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
|
|
76247
76260
|
const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
76248
76261
|
const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
|
|
76249
76262
|
node,
|
|
76250
76263
|
jsxFragmentFactoryName,
|
|
76251
|
-
|
|
76264
|
+
shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
76252
76265
|
/*nameNotFoundMessage*/
|
|
76253
76266
|
jsxFactoryRefErr,
|
|
76254
76267
|
/*isUse*/
|
|
@@ -84103,6 +84116,13 @@ function createTypeChecker(host) {
|
|
|
84103
84116
|
function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
|
|
84104
84117
|
const isJs = isInJSFile(node);
|
|
84105
84118
|
const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
|
|
84119
|
+
if (memberHasOverrideModifier && (member == null ? void 0 : member.valueDeclaration) && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name)) {
|
|
84120
|
+
error(
|
|
84121
|
+
errorNode,
|
|
84122
|
+
isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic
|
|
84123
|
+
);
|
|
84124
|
+
return 2 /* HasInvalidOverride */;
|
|
84125
|
+
}
|
|
84106
84126
|
if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
|
|
84107
84127
|
const thisType = memberIsStatic ? staticType : typeWithThis;
|
|
84108
84128
|
const baseType = memberIsStatic ? baseStaticType : baseWithThis;
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4989,7 +4989,7 @@ declare namespace ts {
|
|
|
4989
4989
|
readonly modifiers?: NodeArray<Modifier>;
|
|
4990
4990
|
readonly equalsGreaterThanToken: EqualsGreaterThanToken;
|
|
4991
4991
|
readonly body: ConciseBody;
|
|
4992
|
-
readonly name
|
|
4992
|
+
readonly name?: never;
|
|
4993
4993
|
}
|
|
4994
4994
|
interface LiteralLikeNode extends Node {
|
|
4995
4995
|
text: string;
|
package/lib/typescript.js
CHANGED
|
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2278
2278
|
|
|
2279
2279
|
// src/compiler/corePublic.ts
|
|
2280
2280
|
var versionMajorMinor = "5.8";
|
|
2281
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2281
|
+
var version = `${versionMajorMinor}.0-insiders.20241211`;
|
|
2282
2282
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2283
2283
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2284
2284
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10229,6 +10229,8 @@ var Diagnostics = {
|
|
|
10229
10229
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
10230
10230
|
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
10231
10231
|
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
10232
|
+
This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."),
|
|
10233
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),
|
|
10232
10234
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
10233
10235
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
10234
10236
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -45107,9 +45109,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) {
|
|
|
45107
45109
|
}
|
|
45108
45110
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) {
|
|
45109
45111
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
45110
|
-
|
|
45111
|
-
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
|
45112
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);
|
|
45112
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state);
|
|
45113
45113
|
}
|
|
45114
45114
|
function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) {
|
|
45115
45115
|
if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) {
|
|
@@ -45127,8 +45127,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache
|
|
|
45127
45127
|
/*onlyRecordFailures*/
|
|
45128
45128
|
false,
|
|
45129
45129
|
loadPackageJsonMainState,
|
|
45130
|
-
packageJsonInfo
|
|
45131
|
-
getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState)
|
|
45130
|
+
packageJsonInfo
|
|
45132
45131
|
);
|
|
45133
45132
|
entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path);
|
|
45134
45133
|
if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) {
|
|
@@ -45331,13 +45330,14 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
45331
45330
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
|
45332
45331
|
}
|
|
45333
45332
|
}
|
|
45334
|
-
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
|
45333
|
+
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) {
|
|
45334
|
+
const versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state);
|
|
45335
45335
|
let packageFile;
|
|
45336
|
-
if (
|
|
45336
|
+
if (packageJson && arePathsEqual(packageJson == null ? void 0 : packageJson.packageDirectory, candidate, state.host)) {
|
|
45337
45337
|
if (state.isConfigLookup) {
|
|
45338
|
-
packageFile = readPackageJsonTSConfigField(
|
|
45338
|
+
packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state);
|
|
45339
45339
|
} else {
|
|
45340
|
-
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(
|
|
45340
|
+
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0;
|
|
45341
45341
|
}
|
|
45342
45342
|
}
|
|
45343
45343
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
@@ -45356,7 +45356,7 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
45356
45356
|
const features = state2.features;
|
|
45357
45357
|
const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
|
|
45358
45358
|
state2.candidateIsFromPackageJsonField = true;
|
|
45359
|
-
if ((
|
|
45359
|
+
if ((packageJson == null ? void 0 : packageJson.contents.packageJsonContent.type) !== "module") {
|
|
45360
45360
|
state2.features &= ~32 /* EsmMode */;
|
|
45361
45361
|
}
|
|
45362
45362
|
const result = nodeLoadModuleByRelativeName(
|
|
@@ -45959,8 +45959,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
45959
45959
|
candidate,
|
|
45960
45960
|
!nodeModulesDirectoryExists,
|
|
45961
45961
|
state,
|
|
45962
|
-
packageInfo
|
|
45963
|
-
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
45962
|
+
packageInfo
|
|
45964
45963
|
);
|
|
45965
45964
|
return withPackageId(packageInfo, fromDirectory, state);
|
|
45966
45965
|
}
|
|
@@ -45970,8 +45969,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
45970
45969
|
candidate2,
|
|
45971
45970
|
onlyRecordFailures,
|
|
45972
45971
|
state2,
|
|
45973
|
-
packageInfo
|
|
45974
|
-
packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)
|
|
45972
|
+
packageInfo
|
|
45975
45973
|
);
|
|
45976
45974
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
|
45977
45975
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
|
@@ -73039,14 +73037,20 @@ function createTypeChecker(host) {
|
|
|
73039
73037
|
}
|
|
73040
73038
|
return false;
|
|
73041
73039
|
}
|
|
73042
|
-
function isDiscriminantProperty(type, name) {
|
|
73040
|
+
function isDiscriminantProperty(type, name, considerNonUniformPrimitivePropDiscriminant = true) {
|
|
73041
|
+
var _a;
|
|
73043
73042
|
if (type && type.flags & 1048576 /* Union */) {
|
|
73044
73043
|
const prop = getUnionOrIntersectionProperty(type, name);
|
|
73045
73044
|
if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
|
|
73046
|
-
|
|
73047
|
-
|
|
73045
|
+
const propType = getTypeOfSymbol(prop);
|
|
73046
|
+
const transientSymbol = prop;
|
|
73047
|
+
(_a = transientSymbol.links).isDiscriminantProperty ?? (_a.isDiscriminantProperty = /* @__PURE__ */ new Map());
|
|
73048
|
+
let isDiscriminant = transientSymbol.links.isDiscriminantProperty.get(considerNonUniformPrimitivePropDiscriminant);
|
|
73049
|
+
if (typeof isDiscriminant === "undefined") {
|
|
73050
|
+
isDiscriminant = ((transientSymbol.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ || !!(considerNonUniformPrimitivePropDiscriminant && transientSymbol.links.checkFlags & 64 /* HasNonUniformType */ && someType(propType, (t) => !!(t.flags & 402784252 /* Primitive */)))) && !isGenericType(propType);
|
|
73051
|
+
transientSymbol.links.isDiscriminantProperty.set(considerNonUniformPrimitivePropDiscriminant, isDiscriminant);
|
|
73048
73052
|
}
|
|
73049
|
-
return
|
|
73053
|
+
return isDiscriminant;
|
|
73050
73054
|
}
|
|
73051
73055
|
}
|
|
73052
73056
|
return false;
|
|
@@ -73054,7 +73058,12 @@ function createTypeChecker(host) {
|
|
|
73054
73058
|
function findDiscriminantProperties(sourceProperties, target) {
|
|
73055
73059
|
let result;
|
|
73056
73060
|
for (const sourceProperty of sourceProperties) {
|
|
73057
|
-
if (isDiscriminantProperty(
|
|
73061
|
+
if (isDiscriminantProperty(
|
|
73062
|
+
target,
|
|
73063
|
+
sourceProperty.escapedName,
|
|
73064
|
+
/*considerNonUniformPrimitivePropDiscriminant*/
|
|
73065
|
+
false
|
|
73066
|
+
)) {
|
|
73058
73067
|
if (result) {
|
|
73059
73068
|
result.push(sourceProperty);
|
|
73060
73069
|
continue;
|
|
@@ -75277,12 +75286,13 @@ function createTypeChecker(host) {
|
|
|
75277
75286
|
const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
75278
75287
|
const jsxFactoryNamespace = getJsxNamespace(node);
|
|
75279
75288
|
const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;
|
|
75289
|
+
const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
|
|
75280
75290
|
let jsxFactorySym;
|
|
75281
75291
|
if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
|
75282
75292
|
jsxFactorySym = resolveName(
|
|
75283
75293
|
jsxFactoryLocation,
|
|
75284
75294
|
jsxFactoryNamespace,
|
|
75285
|
-
|
|
75295
|
+
shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
75286
75296
|
jsxFactoryRefErr,
|
|
75287
75297
|
/*isUse*/
|
|
75288
75298
|
true
|
|
@@ -75302,7 +75312,7 @@ function createTypeChecker(host) {
|
|
|
75302
75312
|
resolveName(
|
|
75303
75313
|
jsxFactoryLocation,
|
|
75304
75314
|
localJsxNamespace,
|
|
75305
|
-
|
|
75315
|
+
shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
75306
75316
|
jsxFactoryRefErr,
|
|
75307
75317
|
/*isUse*/
|
|
75308
75318
|
true
|
|
@@ -80847,12 +80857,14 @@ function createTypeChecker(host) {
|
|
|
80847
80857
|
const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));
|
|
80848
80858
|
if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;
|
|
80849
80859
|
const jsxFragmentFactoryName = getJsxNamespace(node);
|
|
80850
|
-
|
|
80860
|
+
const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null";
|
|
80861
|
+
if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType;
|
|
80862
|
+
const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;
|
|
80851
80863
|
const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;
|
|
80852
80864
|
const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(
|
|
80853
80865
|
node,
|
|
80854
80866
|
jsxFragmentFactoryName,
|
|
80855
|
-
|
|
80867
|
+
shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,
|
|
80856
80868
|
/*nameNotFoundMessage*/
|
|
80857
80869
|
jsxFactoryRefErr,
|
|
80858
80870
|
/*isUse*/
|
|
@@ -88707,6 +88719,13 @@ function createTypeChecker(host) {
|
|
|
88707
88719
|
function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
|
|
88708
88720
|
const isJs = isInJSFile(node);
|
|
88709
88721
|
const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);
|
|
88722
|
+
if (memberHasOverrideModifier && (member == null ? void 0 : member.valueDeclaration) && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name)) {
|
|
88723
|
+
error2(
|
|
88724
|
+
errorNode,
|
|
88725
|
+
isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic
|
|
88726
|
+
);
|
|
88727
|
+
return 2 /* HasInvalidOverride */;
|
|
88728
|
+
}
|
|
88710
88729
|
if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
|
|
88711
88730
|
const thisType = memberIsStatic ? staticType : typeWithThis;
|
|
88712
88731
|
const baseType = memberIsStatic ? baseStaticType : baseWithThis;
|
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.8.0-pr-
|
|
5
|
+
"version": "5.8.0-pr-60718-25",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|