@typescript-deploys/pr-build 6.0.0-pr-62900-9 → 6.0.0-pr-63067-4
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 +131 -95
- package/lib/lib.es2015.core.d.ts +1 -1
- package/lib/typescript.d.ts +4 -0
- package/lib/typescript.js +153 -97
- 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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20260130`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -3615,7 +3615,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
3615
3615
|
TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
|
|
3616
3616
|
TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
|
|
3617
3617
|
TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
|
|
3618
|
-
TypeFlags2[TypeFlags2["Simplifiable"] =
|
|
3618
|
+
TypeFlags2[TypeFlags2["Simplifiable"] = 29360128] = "Simplifiable";
|
|
3619
3619
|
TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
|
|
3620
3620
|
TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
|
|
3621
3621
|
TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask";
|
|
@@ -6926,6 +6926,7 @@ var Diagnostics = {
|
|
|
6926
6926
|
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."),
|
|
6927
6927
|
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."),
|
|
6928
6928
|
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}'."),
|
|
6929
|
+
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
6929
6930
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
6930
6931
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
6931
6932
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -16572,7 +16573,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
16572
16573
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
16573
16574
|
if (options.outFile) return true;
|
|
16574
16575
|
if (!options.outDir) return false;
|
|
16575
|
-
if (options.rootDir || options.
|
|
16576
|
+
if (options.rootDir || options.configFilePath) {
|
|
16576
16577
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
16577
16578
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
16578
16579
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -17953,10 +17954,10 @@ var _computedOptions = createComputedCompilerOptions({
|
|
|
17953
17954
|
}
|
|
17954
17955
|
},
|
|
17955
17956
|
target: {
|
|
17956
|
-
dependencies: [
|
|
17957
|
+
dependencies: [],
|
|
17957
17958
|
computeValue: (compilerOptions) => {
|
|
17958
17959
|
const target = compilerOptions.target === 0 /* ES3 */ ? void 0 : compilerOptions.target;
|
|
17959
|
-
return target ??
|
|
17960
|
+
return target ?? 11 /* CurrentYear */;
|
|
17960
17961
|
}
|
|
17961
17962
|
},
|
|
17962
17963
|
module: {
|
|
@@ -24138,7 +24139,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
24138
24139
|
node.path = "";
|
|
24139
24140
|
node.resolvedPath = "";
|
|
24140
24141
|
node.originalFileName = "";
|
|
24141
|
-
node.languageVersion =
|
|
24142
|
+
node.languageVersion = 11 /* CurrentYear */;
|
|
24142
24143
|
node.languageVariant = 0;
|
|
24143
24144
|
node.scriptKind = 0;
|
|
24144
24145
|
node.isDeclarationFile = false;
|
|
@@ -36756,12 +36757,12 @@ var targetOptionDeclaration = {
|
|
|
36756
36757
|
affectsModuleResolution: true,
|
|
36757
36758
|
affectsEmit: true,
|
|
36758
36759
|
affectsBuildInfo: true,
|
|
36759
|
-
deprecatedKeys: /* @__PURE__ */ new Set(["es3"]),
|
|
36760
|
+
deprecatedKeys: /* @__PURE__ */ new Set(["es3", "es5"]),
|
|
36760
36761
|
paramType: Diagnostics.VERSION,
|
|
36761
36762
|
showInSimplifiedHelpView: true,
|
|
36762
36763
|
category: Diagnostics.Language_and_Environment,
|
|
36763
36764
|
description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
36764
|
-
defaultValueDescription:
|
|
36765
|
+
defaultValueDescription: 11 /* CurrentYear */
|
|
36765
36766
|
};
|
|
36766
36767
|
var moduleOptionDeclaration = {
|
|
36767
36768
|
name: "module",
|
|
@@ -41717,7 +41718,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41717
41718
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41718
41719
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41719
41720
|
const commonSourceDirGuesses = [];
|
|
41720
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.
|
|
41721
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
41721
41722
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
41722
41723
|
commonSourceDirGuesses.push(commonDir);
|
|
41723
41724
|
} else if (state.requestContainingDirectory) {
|
|
@@ -48504,6 +48505,15 @@ function createTypeChecker(host) {
|
|
|
48504
48505
|
if (usageMode === 99 /* ESNext */ && targetMode === 99 /* ESNext */) {
|
|
48505
48506
|
return false;
|
|
48506
48507
|
}
|
|
48508
|
+
if (!targetMode && file.isDeclarationFile) {
|
|
48509
|
+
const redirect = host.getRedirectFromSourceFile(file.path) || host.getRedirectFromOutput(file.path);
|
|
48510
|
+
if (redirect) {
|
|
48511
|
+
const targetModuleKind = host.getEmitModuleFormatOfFile(file);
|
|
48512
|
+
if (usageMode === 99 /* ESNext */ && 5 /* ES2015 */ <= targetModuleKind && targetModuleKind <= 99 /* ESNext */) {
|
|
48513
|
+
return false;
|
|
48514
|
+
}
|
|
48515
|
+
}
|
|
48516
|
+
}
|
|
48507
48517
|
}
|
|
48508
48518
|
if (!allowSyntheticDefaultImports) {
|
|
48509
48519
|
return false;
|
|
@@ -57073,6 +57083,9 @@ function createTypeChecker(host) {
|
|
|
57073
57083
|
));
|
|
57074
57084
|
}
|
|
57075
57085
|
function getBaseTypes(type) {
|
|
57086
|
+
if (!(getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */))) {
|
|
57087
|
+
return emptyArray;
|
|
57088
|
+
}
|
|
57076
57089
|
if (!type.baseTypesResolved) {
|
|
57077
57090
|
if (pushTypeResolution(type, 6 /* ResolvedBaseTypes */)) {
|
|
57078
57091
|
if (type.objectFlags & 8 /* Tuple */) {
|
|
@@ -58834,6 +58847,12 @@ function createTypeChecker(host) {
|
|
|
58834
58847
|
return t.flags & 1048576 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) : t.flags & 2097152 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) : void 0;
|
|
58835
58848
|
}
|
|
58836
58849
|
if (t.flags & 4194304 /* Index */) {
|
|
58850
|
+
if (isGenericMappedType(t.type)) {
|
|
58851
|
+
const mappedType = t.type;
|
|
58852
|
+
if (getNameTypeFromMappedType(mappedType) && !isMappedTypeWithKeyofConstraintDeclaration(mappedType)) {
|
|
58853
|
+
return getBaseConstraint(getIndexTypeForMappedType(mappedType, 0 /* None */));
|
|
58854
|
+
}
|
|
58855
|
+
}
|
|
58837
58856
|
return stringNumberSymbolType;
|
|
58838
58857
|
}
|
|
58839
58858
|
if (t.flags & 134217728 /* TemplateLiteral */) {
|
|
@@ -61809,13 +61828,6 @@ function createTypeChecker(host) {
|
|
|
61809
61828
|
keyTypes.push(propNameType === stringType ? stringOrNumberType : propNameType);
|
|
61810
61829
|
}
|
|
61811
61830
|
}
|
|
61812
|
-
function hasDistributiveNameType(mappedType) {
|
|
61813
|
-
const typeVariable = getTypeParameterFromMappedType(mappedType);
|
|
61814
|
-
return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable);
|
|
61815
|
-
function isDistributive(type) {
|
|
61816
|
-
return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false;
|
|
61817
|
-
}
|
|
61818
|
-
}
|
|
61819
61831
|
function getLiteralTypeFromPropertyName(name) {
|
|
61820
61832
|
if (isPrivateIdentifier(name)) {
|
|
61821
61833
|
return neverType;
|
|
@@ -61866,7 +61878,7 @@ function createTypeChecker(host) {
|
|
|
61866
61878
|
);
|
|
61867
61879
|
}
|
|
61868
61880
|
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
61869
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (
|
|
61881
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && getNameTypeFromMappedType(type) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
61870
61882
|
}
|
|
61871
61883
|
function getIndexType(type, indexFlags = 0 /* None */) {
|
|
61872
61884
|
type = getReducedType(type);
|
|
@@ -62308,7 +62320,7 @@ function createTypeChecker(host) {
|
|
|
62308
62320
|
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */) || isGenericStringLikeType(type) ? 8388608 /* IsGenericIndexType */ : 0);
|
|
62309
62321
|
}
|
|
62310
62322
|
function getSimplifiedType(type, writing) {
|
|
62311
|
-
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
|
|
62323
|
+
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type.flags & 4194304 /* Index */ ? getSimplifiedIndexType(type) : type;
|
|
62312
62324
|
}
|
|
62313
62325
|
function distributeIndexOverObjectType(objectType, indexType, writing) {
|
|
62314
62326
|
if (objectType.flags & 1048576 /* Union */ || objectType.flags & 2097152 /* Intersection */ && !shouldDeferIndexType(objectType)) {
|
|
@@ -62379,6 +62391,12 @@ function createTypeChecker(host) {
|
|
|
62379
62391
|
}
|
|
62380
62392
|
return type;
|
|
62381
62393
|
}
|
|
62394
|
+
function getSimplifiedIndexType(type) {
|
|
62395
|
+
if (isGenericMappedType(type.type) && getNameTypeFromMappedType(type.type) && !isMappedTypeWithKeyofConstraintDeclaration(type.type)) {
|
|
62396
|
+
return getIndexTypeForMappedType(type.type, 0 /* None */);
|
|
62397
|
+
}
|
|
62398
|
+
return type;
|
|
62399
|
+
}
|
|
62382
62400
|
function isIntersectionEmpty(type1, type2) {
|
|
62383
62401
|
return !!(getUnionType([intersectTypes(type1, type2), neverType]).flags & 131072 /* Never */);
|
|
62384
62402
|
}
|
|
@@ -64655,7 +64673,7 @@ function createTypeChecker(host) {
|
|
|
64655
64673
|
}
|
|
64656
64674
|
function getNormalizedType(type, writing) {
|
|
64657
64675
|
while (true) {
|
|
64658
|
-
const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags &
|
|
64676
|
+
const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 29360128 /* Simplifiable */ ? getSimplifiedType(type, writing) : type;
|
|
64659
64677
|
if (t === type) return t;
|
|
64660
64678
|
type = t;
|
|
64661
64679
|
}
|
|
@@ -64685,7 +64703,7 @@ function createTypeChecker(host) {
|
|
|
64685
64703
|
}
|
|
64686
64704
|
function getNormalizedTupleType(type, writing) {
|
|
64687
64705
|
const elements = getElementTypes(type);
|
|
64688
|
-
const normalizedElements = sameMap(elements, (t) => t.flags &
|
|
64706
|
+
const normalizedElements = sameMap(elements, (t) => t.flags & 29360128 /* Simplifiable */ ? getSimplifiedType(t, writing) : t);
|
|
64689
64707
|
return elements !== normalizedElements ? createNormalizedTupleType(type.target, normalizedElements) : type;
|
|
64690
64708
|
}
|
|
64691
64709
|
function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {
|
|
@@ -67104,7 +67122,7 @@ function createTypeChecker(host) {
|
|
|
67104
67122
|
}
|
|
67105
67123
|
function discriminateTypeByDiscriminableItems(target, discriminators, related) {
|
|
67106
67124
|
const types = target.types;
|
|
67107
|
-
const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */);
|
|
67125
|
+
const include = types.map((t) => t.flags & 402784252 /* Primitive */ || getReducedType(t).flags & 131072 /* Never */ ? 0 /* False */ : -1 /* True */);
|
|
67108
67126
|
for (const [getDiscriminatingType, propertyName] of discriminators) {
|
|
67109
67127
|
let matched = false;
|
|
67110
67128
|
for (let i = 0; i < types.length; i++) {
|
|
@@ -70966,12 +70984,6 @@ function createTypeChecker(host) {
|
|
|
70966
70984
|
return caseType;
|
|
70967
70985
|
}
|
|
70968
70986
|
const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, t.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(t)), (t1, t2) => isUnitType(t1) && areTypesComparable(t1, t2))));
|
|
70969
|
-
if (!(type.flags & 1048576 /* Union */) && isUnitLikeType(type)) {
|
|
70970
|
-
const regularType = type.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(type));
|
|
70971
|
-
if (isUnitType(regularType) && contains(switchTypes, regularType, (t1, t2) => isUnitType(t1) && areTypesComparable(t1, t2))) {
|
|
70972
|
-
return neverType;
|
|
70973
|
-
}
|
|
70974
|
-
}
|
|
70975
70987
|
return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);
|
|
70976
70988
|
}
|
|
70977
70989
|
function narrowTypeByTypeName(type, typeName) {
|
|
@@ -72031,7 +72043,7 @@ function createTypeChecker(host) {
|
|
|
72031
72043
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 219 /* FunctionExpression */ || flowContainer.kind === 220 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
72032
72044
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
72033
72045
|
}
|
|
72034
|
-
const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol);
|
|
72046
|
+
const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !isForInOrOfStatement(immediateDeclaration.parent.parent) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol);
|
|
72035
72047
|
const assumeInitialized = isParameter2 || isAlias || isOuterVariable && !isNeverInitialized || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 282 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
72036
72048
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
72037
72049
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
@@ -74736,10 +74748,10 @@ function createTypeChecker(host) {
|
|
|
74736
74748
|
}
|
|
74737
74749
|
}
|
|
74738
74750
|
if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {
|
|
74739
|
-
const
|
|
74740
|
-
if (
|
|
74751
|
+
const parentSymbol = getParentOfSymbol(prop);
|
|
74752
|
+
if (parentSymbol && parentSymbol.flags & 32 /* Class */ && isNodeUsedDuringClassInitialization(location)) {
|
|
74741
74753
|
if (errorNode) {
|
|
74742
|
-
error(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop),
|
|
74754
|
+
error(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), symbolToString(parentSymbol));
|
|
74743
74755
|
}
|
|
74744
74756
|
return false;
|
|
74745
74757
|
}
|
|
@@ -75242,27 +75254,14 @@ function createTypeChecker(host) {
|
|
|
75242
75254
|
});
|
|
75243
75255
|
}
|
|
75244
75256
|
function isPropertyDeclaredInAncestorClass(prop) {
|
|
75245
|
-
if (
|
|
75246
|
-
|
|
75247
|
-
|
|
75248
|
-
|
|
75249
|
-
|
|
75250
|
-
classType = classType.symbol && getSuperClass(classType);
|
|
75251
|
-
if (!classType) {
|
|
75252
|
-
return false;
|
|
75253
|
-
}
|
|
75254
|
-
const superProperty = getPropertyOfType(classType, prop.escapedName);
|
|
75255
|
-
if (superProperty && superProperty.valueDeclaration) {
|
|
75256
|
-
return true;
|
|
75257
|
+
if (prop.parent && prop.parent.flags & 32 /* Class */) {
|
|
75258
|
+
const baseTypes = getBaseTypes(getDeclaredTypeOfSymbol(prop.parent));
|
|
75259
|
+
if (baseTypes.length) {
|
|
75260
|
+
const superProperty = getPropertyOfType(baseTypes[0], prop.escapedName);
|
|
75261
|
+
return !!(superProperty && superProperty.valueDeclaration);
|
|
75257
75262
|
}
|
|
75258
75263
|
}
|
|
75259
|
-
|
|
75260
|
-
function getSuperClass(classType) {
|
|
75261
|
-
const x = getBaseTypes(classType);
|
|
75262
|
-
if (x.length === 0) {
|
|
75263
|
-
return void 0;
|
|
75264
|
-
}
|
|
75265
|
-
return getIntersectionType(x);
|
|
75264
|
+
return false;
|
|
75266
75265
|
}
|
|
75267
75266
|
function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
|
|
75268
75267
|
const links = getNodeLinks(propNode);
|
|
@@ -79798,7 +79797,6 @@ function createTypeChecker(host) {
|
|
|
79798
79797
|
}
|
|
79799
79798
|
}
|
|
79800
79799
|
checkNullishCoalesceOperandLeft(node);
|
|
79801
|
-
checkNullishCoalesceOperandRight(node);
|
|
79802
79800
|
}
|
|
79803
79801
|
function checkNullishCoalesceOperandLeft(node) {
|
|
79804
79802
|
const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
|
|
@@ -79811,21 +79809,6 @@ function createTypeChecker(host) {
|
|
|
79811
79809
|
}
|
|
79812
79810
|
}
|
|
79813
79811
|
}
|
|
79814
|
-
function checkNullishCoalesceOperandRight(node) {
|
|
79815
|
-
const rightTarget = skipOuterExpressions(node.right, 63 /* All */);
|
|
79816
|
-
const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget);
|
|
79817
|
-
if (isNotWithinNullishCoalesceExpression(node)) {
|
|
79818
|
-
return;
|
|
79819
|
-
}
|
|
79820
|
-
if (nullishSemantics === 1 /* Always */) {
|
|
79821
|
-
error(rightTarget, Diagnostics.This_expression_is_always_nullish);
|
|
79822
|
-
} else if (nullishSemantics === 2 /* Never */) {
|
|
79823
|
-
error(rightTarget, Diagnostics.This_expression_is_never_nullish);
|
|
79824
|
-
}
|
|
79825
|
-
}
|
|
79826
|
-
function isNotWithinNullishCoalesceExpression(node) {
|
|
79827
|
-
return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== 61 /* QuestionQuestionToken */;
|
|
79828
|
-
}
|
|
79829
79812
|
function getSyntacticNullishnessSemantics(node) {
|
|
79830
79813
|
node = skipOuterExpressions(node);
|
|
79831
79814
|
switch (node.kind) {
|
|
@@ -79841,15 +79824,16 @@ function createTypeChecker(host) {
|
|
|
79841
79824
|
return 3 /* Sometimes */;
|
|
79842
79825
|
case 227 /* BinaryExpression */:
|
|
79843
79826
|
switch (node.operatorToken.kind) {
|
|
79844
|
-
case 64 /* EqualsToken */:
|
|
79845
|
-
case 61 /* QuestionQuestionToken */:
|
|
79846
|
-
case 78 /* QuestionQuestionEqualsToken */:
|
|
79847
79827
|
case 57 /* BarBarToken */:
|
|
79848
79828
|
case 76 /* BarBarEqualsToken */:
|
|
79849
79829
|
case 56 /* AmpersandAmpersandToken */:
|
|
79850
79830
|
case 77 /* AmpersandAmpersandEqualsToken */:
|
|
79851
79831
|
return 3 /* Sometimes */;
|
|
79832
|
+
// For these operator kinds, the right operand is effectively controlling
|
|
79852
79833
|
case 28 /* CommaToken */:
|
|
79834
|
+
case 64 /* EqualsToken */:
|
|
79835
|
+
case 61 /* QuestionQuestionToken */:
|
|
79836
|
+
case 78 /* QuestionQuestionEqualsToken */:
|
|
79853
79837
|
return getSyntacticNullishnessSemantics(node.right);
|
|
79854
79838
|
}
|
|
79855
79839
|
return 2 /* Never */;
|
|
@@ -81755,9 +81739,8 @@ function createTypeChecker(host) {
|
|
|
81755
81739
|
}
|
|
81756
81740
|
const objectType = type.objectType;
|
|
81757
81741
|
const indexType = type.indexType;
|
|
81758
|
-
const objectIndexType = isGenericMappedType(objectType) && getMappedTypeNameTypeKind(objectType) === 2 /* Remapping */ ? getIndexTypeForMappedType(objectType, 0 /* None */) : getIndexType(objectType, 0 /* None */);
|
|
81759
81742
|
const hasNumberIndexInfo = !!getIndexInfoOfType(objectType, numberType);
|
|
81760
|
-
if (everyType(indexType, (t) => isTypeAssignableTo(t,
|
|
81743
|
+
if (everyType(indexType, (t) => isTypeAssignableTo(t, getIndexType(objectType, 0 /* None */)) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) {
|
|
81761
81744
|
if (accessNode.kind === 213 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) {
|
|
81762
81745
|
error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
|
|
81763
81746
|
}
|
|
@@ -86622,8 +86605,8 @@ function createTypeChecker(host) {
|
|
|
86622
86605
|
}
|
|
86623
86606
|
(reportedUnreachableNodes ?? (reportedUnreachableNodes = /* @__PURE__ */ new Set())).add(node);
|
|
86624
86607
|
const sourceFile = getSourceFileOfNode(node);
|
|
86625
|
-
let
|
|
86626
|
-
let
|
|
86608
|
+
let startNode = node;
|
|
86609
|
+
let endNode = node;
|
|
86627
86610
|
const parent = node.parent;
|
|
86628
86611
|
if (canHaveStatements(parent)) {
|
|
86629
86612
|
const statements = parent.statements;
|
|
@@ -86647,12 +86630,12 @@ function createTypeChecker(host) {
|
|
|
86647
86630
|
last2 = i;
|
|
86648
86631
|
reportedUnreachableNodes.add(nextNode);
|
|
86649
86632
|
}
|
|
86650
|
-
|
|
86651
|
-
|
|
86633
|
+
startNode = statements[first2];
|
|
86634
|
+
endNode = statements[last2];
|
|
86652
86635
|
}
|
|
86653
86636
|
}
|
|
86654
|
-
start =
|
|
86655
|
-
addErrorOrSuggestion(compilerOptions.allowUnreachableCode === false, createFileDiagnostic(sourceFile, start, end - start, Diagnostics.Unreachable_code_detected));
|
|
86637
|
+
const start = getTokenPosOfNode(startNode, sourceFile);
|
|
86638
|
+
addErrorOrSuggestion(compilerOptions.allowUnreachableCode === false, createFileDiagnostic(sourceFile, start, endNode.end - start, Diagnostics.Unreachable_code_detected));
|
|
86656
86639
|
return true;
|
|
86657
86640
|
}
|
|
86658
86641
|
function isSourceElementUnreachable(node) {
|
|
@@ -94090,6 +94073,9 @@ function transformTypeScript(context) {
|
|
|
94090
94073
|
const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));
|
|
94091
94074
|
if (parametersWithPropertyAssignments) {
|
|
94092
94075
|
for (const parameter of parametersWithPropertyAssignments) {
|
|
94076
|
+
if (!isIdentifier(parameter.name)) {
|
|
94077
|
+
continue;
|
|
94078
|
+
}
|
|
94093
94079
|
const parameterProperty = factory2.createPropertyDeclaration(
|
|
94094
94080
|
/*modifiers*/
|
|
94095
94081
|
void 0,
|
|
@@ -115976,7 +115962,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115976
115962
|
if (options.rootDir) {
|
|
115977
115963
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
115978
115964
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
115979
|
-
} else if (options.
|
|
115965
|
+
} else if (options.configFilePath) {
|
|
115980
115966
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
115981
115967
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
115982
115968
|
} else {
|
|
@@ -115987,6 +115973,13 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115987
115973
|
}
|
|
115988
115974
|
return commonSourceDirectory;
|
|
115989
115975
|
}
|
|
115976
|
+
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
115977
|
+
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
115978
|
+
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
115979
|
+
commonSourceDirectory += directorySeparator;
|
|
115980
|
+
}
|
|
115981
|
+
return commonSourceDirectory;
|
|
115982
|
+
}
|
|
115990
115983
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
115991
115984
|
return getCommonSourceDirectory(
|
|
115992
115985
|
options,
|
|
@@ -124419,6 +124412,31 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124419
124412
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
124420
124413
|
}
|
|
124421
124414
|
}
|
|
124415
|
+
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
124416
|
+
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
124417
|
+
options.outFile)) {
|
|
124418
|
+
const dir = getCommonSourceDirectory2();
|
|
124419
|
+
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
124420
|
+
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
124421
|
+
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
124422
|
+
createDiagnosticForOption(
|
|
124423
|
+
/*onKey*/
|
|
124424
|
+
true,
|
|
124425
|
+
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
124426
|
+
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
124427
|
+
chainDiagnosticMessages(
|
|
124428
|
+
chainDiagnosticMessages(
|
|
124429
|
+
/*details*/
|
|
124430
|
+
void 0,
|
|
124431
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124432
|
+
),
|
|
124433
|
+
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
124434
|
+
getBaseFileName(options.configFilePath),
|
|
124435
|
+
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
124436
|
+
)
|
|
124437
|
+
);
|
|
124438
|
+
}
|
|
124439
|
+
}
|
|
124422
124440
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
124423
124441
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
124424
124442
|
}
|
|
@@ -124627,12 +124645,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124627
124645
|
createDeprecatedDiagnostic("charset");
|
|
124628
124646
|
}
|
|
124629
124647
|
if (options.out) {
|
|
124630
|
-
createDeprecatedDiagnostic(
|
|
124631
|
-
"out",
|
|
124632
|
-
/*value*/
|
|
124633
|
-
void 0,
|
|
124634
|
-
"outFile"
|
|
124635
|
-
);
|
|
124648
|
+
createDeprecatedDiagnostic("out");
|
|
124636
124649
|
}
|
|
124637
124650
|
if (options.importsNotUsedAsValues) {
|
|
124638
124651
|
createDeprecatedDiagnostic(
|
|
@@ -124652,6 +124665,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124652
124665
|
}
|
|
124653
124666
|
});
|
|
124654
124667
|
checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
124668
|
+
if (options.target === 1 /* ES5 */) {
|
|
124669
|
+
createDeprecatedDiagnostic("target", "ES5");
|
|
124670
|
+
}
|
|
124655
124671
|
if (options.moduleResolution === 2 /* Node10 */) {
|
|
124656
124672
|
createDeprecatedDiagnostic(
|
|
124657
124673
|
"moduleResolution",
|
|
@@ -124701,6 +124717,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124701
124717
|
void 0
|
|
124702
124718
|
);
|
|
124703
124719
|
}
|
|
124720
|
+
if (options.outFile) {
|
|
124721
|
+
createDeprecatedDiagnostic("outFile");
|
|
124722
|
+
}
|
|
124704
124723
|
if (options.module === 0 /* None */ || options.module === 2 /* AMD */ || options.module === 3 /* UMD */ || options.module === 4 /* System */) {
|
|
124705
124724
|
createDeprecatedDiagnostic(
|
|
124706
124725
|
"module",
|
|
@@ -127844,7 +127863,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127844
127863
|
shouldRetryResolution,
|
|
127845
127864
|
logChanges
|
|
127846
127865
|
}) {
|
|
127847
|
-
var _a;
|
|
127866
|
+
var _a, _b;
|
|
127848
127867
|
const path = resolutionHost.toPath(containingFile);
|
|
127849
127868
|
const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);
|
|
127850
127869
|
const resolvedModules = [];
|
|
@@ -127865,7 +127884,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127865
127884
|
resolutionHost.onDiscoveredSymlink();
|
|
127866
127885
|
}
|
|
127867
127886
|
resolutionsInFile.set(name, mode, resolution);
|
|
127868
|
-
if (resolution !== existingResolution) {
|
|
127887
|
+
if (resolution !== existingResolution && !((_b = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _b.call(resolutionHost, path))) {
|
|
127869
127888
|
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
127870
127889
|
if (existingResolution) {
|
|
127871
127890
|
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
@@ -127902,8 +127921,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127902
127921
|
);
|
|
127903
127922
|
if (resolutionsInFile.size() !== seenNamesInFile.size()) {
|
|
127904
127923
|
resolutionsInFile.forEach((resolution, name, mode) => {
|
|
127924
|
+
var _a2;
|
|
127905
127925
|
if (!seenNamesInFile.has(name, mode)) {
|
|
127906
|
-
|
|
127926
|
+
if (!((_a2 = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _a2.call(resolutionHost, path))) {
|
|
127927
|
+
stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
|
|
127928
|
+
}
|
|
127907
127929
|
resolutionsInFile.delete(name, mode);
|
|
127908
127930
|
}
|
|
127909
127931
|
});
|
|
@@ -128317,15 +128339,18 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
128317
128339
|
}, nonRecursive ? 0 /* None */ : 1 /* Recursive */);
|
|
128318
128340
|
}
|
|
128319
128341
|
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) {
|
|
128342
|
+
var _a;
|
|
128320
128343
|
const resolutions = cache.get(filePath);
|
|
128321
128344
|
if (resolutions) {
|
|
128322
|
-
|
|
128323
|
-
(
|
|
128324
|
-
resolution
|
|
128325
|
-
|
|
128326
|
-
|
|
128327
|
-
|
|
128328
|
-
|
|
128345
|
+
if (!((_a = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _a.call(resolutionHost, filePath))) {
|
|
128346
|
+
resolutions.forEach(
|
|
128347
|
+
(resolution) => stopWatchFailedLookupLocationOfResolution(
|
|
128348
|
+
resolution,
|
|
128349
|
+
filePath,
|
|
128350
|
+
getResolutionWithResolvedFileName
|
|
128351
|
+
)
|
|
128352
|
+
);
|
|
128353
|
+
}
|
|
128329
128354
|
cache.delete(filePath);
|
|
128330
128355
|
}
|
|
128331
128356
|
}
|
|
@@ -128480,11 +128505,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
128480
128505
|
}, 1 /* Recursive */) : noopFileWatcher;
|
|
128481
128506
|
}
|
|
128482
128507
|
function updateTypeRootsWatch() {
|
|
128508
|
+
var _a;
|
|
128483
128509
|
const options = resolutionHost.getCompilationSettings();
|
|
128484
128510
|
if (options.types) {
|
|
128485
128511
|
closeTypeRootsWatch();
|
|
128486
128512
|
return;
|
|
128487
128513
|
}
|
|
128514
|
+
if (!isRootWatchable || ((_a = resolutionHost.skipWatchingTypeRoots) == null ? void 0 : _a.call(resolutionHost))) {
|
|
128515
|
+
closeTypeRootsWatch();
|
|
128516
|
+
return;
|
|
128517
|
+
}
|
|
128488
128518
|
const typeRoots = getEffectiveTypeRoots(options, { getCurrentDirectory });
|
|
128489
128519
|
if (typeRoots) {
|
|
128490
128520
|
mutateMap(
|
|
@@ -131646,7 +131676,13 @@ function updateReportDiagnostic(sys2, existing, options) {
|
|
|
131646
131676
|
) : existing;
|
|
131647
131677
|
}
|
|
131648
131678
|
function defaultIsPretty(sys2) {
|
|
131649
|
-
|
|
131679
|
+
if (sys2.getEnvironmentVariable("NO_COLOR")) {
|
|
131680
|
+
return false;
|
|
131681
|
+
}
|
|
131682
|
+
if (sys2.getEnvironmentVariable("FORCE_COLOR")) {
|
|
131683
|
+
return true;
|
|
131684
|
+
}
|
|
131685
|
+
return !!sys2.writeOutputIsTTY && sys2.writeOutputIsTTY();
|
|
131650
131686
|
}
|
|
131651
131687
|
function shouldBePretty(sys2, options) {
|
|
131652
131688
|
if (!options || typeof options.pretty === "undefined") {
|
package/lib/lib.es2015.core.d.ts
CHANGED
|
@@ -189,7 +189,7 @@ interface Math {
|
|
|
189
189
|
hypot(...values: number[]): number;
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* Returns the integral part of the
|
|
192
|
+
* Returns the integral part of the numeric expression x, removing any fractional digits.
|
|
193
193
|
* If x is already an integer, the result is x.
|
|
194
194
|
* @param x A numeric expression.
|
|
195
195
|
*/
|
package/lib/typescript.d.ts
CHANGED
|
@@ -2543,6 +2543,7 @@ declare namespace ts {
|
|
|
2543
2543
|
export enum ScriptTarget {
|
|
2544
2544
|
/** @deprecated */
|
|
2545
2545
|
ES3 = "es3",
|
|
2546
|
+
/** @deprecated */
|
|
2546
2547
|
ES5 = "es5",
|
|
2547
2548
|
ES6 = "es6",
|
|
2548
2549
|
ES2015 = "es2015",
|
|
@@ -2558,6 +2559,7 @@ declare namespace ts {
|
|
|
2558
2559
|
ESNext = "esnext",
|
|
2559
2560
|
JSON = "json",
|
|
2560
2561
|
Latest = "esnext",
|
|
2562
|
+
CurrentYear = "es2024",
|
|
2561
2563
|
}
|
|
2562
2564
|
}
|
|
2563
2565
|
namespace typingsInstaller {
|
|
@@ -7207,6 +7209,7 @@ declare namespace ts {
|
|
|
7207
7209
|
enum ScriptTarget {
|
|
7208
7210
|
/** @deprecated */
|
|
7209
7211
|
ES3 = 0,
|
|
7212
|
+
/** @deprecated */
|
|
7210
7213
|
ES5 = 1,
|
|
7211
7214
|
ES2015 = 2,
|
|
7212
7215
|
ES2016 = 3,
|
|
@@ -7221,6 +7224,7 @@ declare namespace ts {
|
|
|
7221
7224
|
ESNext = 99,
|
|
7222
7225
|
JSON = 100,
|
|
7223
7226
|
Latest = 99,
|
|
7227
|
+
CurrentYear = 11,
|
|
7224
7228
|
}
|
|
7225
7229
|
enum LanguageVariant {
|
|
7226
7230
|
Standard = 0,
|
package/lib/typescript.js
CHANGED
|
@@ -673,6 +673,7 @@ __export(typescript_exports, {
|
|
|
673
673
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
674
674
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
675
675
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
676
|
+
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
676
677
|
getConditions: () => getConditions,
|
|
677
678
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
678
679
|
getConstantValue: () => getConstantValue,
|
|
@@ -2285,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2285
2286
|
|
|
2286
2287
|
// src/compiler/corePublic.ts
|
|
2287
2288
|
var versionMajorMinor = "6.0";
|
|
2288
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20260130`;
|
|
2289
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2290
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2291
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6487,7 +6488,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
6487
6488
|
TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
|
|
6488
6489
|
TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
|
|
6489
6490
|
TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
|
|
6490
|
-
TypeFlags2[TypeFlags2["Simplifiable"] =
|
|
6491
|
+
TypeFlags2[TypeFlags2["Simplifiable"] = 29360128] = "Simplifiable";
|
|
6491
6492
|
TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
|
|
6492
6493
|
TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
|
|
6493
6494
|
TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask";
|
|
@@ -6789,6 +6790,7 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
|
|
|
6789
6790
|
ScriptTarget12[ScriptTarget12["ESNext"] = 99] = "ESNext";
|
|
6790
6791
|
ScriptTarget12[ScriptTarget12["JSON"] = 100] = "JSON";
|
|
6791
6792
|
ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
|
|
6793
|
+
ScriptTarget12[ScriptTarget12["CurrentYear"] = 11 /* ES2024 */] = "CurrentYear";
|
|
6792
6794
|
return ScriptTarget12;
|
|
6793
6795
|
})(ScriptTarget || {});
|
|
6794
6796
|
var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
|
|
@@ -10326,6 +10328,7 @@ var Diagnostics = {
|
|
|
10326
10328
|
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."),
|
|
10327
10329
|
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."),
|
|
10328
10330
|
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}'."),
|
|
10331
|
+
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
10329
10332
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
10330
10333
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
10331
10334
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -20398,7 +20401,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
20398
20401
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
20399
20402
|
if (options.outFile) return true;
|
|
20400
20403
|
if (!options.outDir) return false;
|
|
20401
|
-
if (options.rootDir || options.
|
|
20404
|
+
if (options.rootDir || options.configFilePath) {
|
|
20402
20405
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
20403
20406
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
20404
20407
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -21922,10 +21925,10 @@ var _computedOptions = createComputedCompilerOptions({
|
|
|
21922
21925
|
}
|
|
21923
21926
|
},
|
|
21924
21927
|
target: {
|
|
21925
|
-
dependencies: [
|
|
21928
|
+
dependencies: [],
|
|
21926
21929
|
computeValue: (compilerOptions) => {
|
|
21927
21930
|
const target = compilerOptions.target === 0 /* ES3 */ ? void 0 : compilerOptions.target;
|
|
21928
|
-
return target ??
|
|
21931
|
+
return target ?? 11 /* CurrentYear */;
|
|
21929
21932
|
}
|
|
21930
21933
|
},
|
|
21931
21934
|
module: {
|
|
@@ -28262,7 +28265,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
28262
28265
|
node.path = "";
|
|
28263
28266
|
node.resolvedPath = "";
|
|
28264
28267
|
node.originalFileName = "";
|
|
28265
|
-
node.languageVersion =
|
|
28268
|
+
node.languageVersion = 11 /* CurrentYear */;
|
|
28266
28269
|
node.languageVariant = 0;
|
|
28267
28270
|
node.scriptKind = 0;
|
|
28268
28271
|
node.isDeclarationFile = false;
|
|
@@ -41033,12 +41036,12 @@ var targetOptionDeclaration = {
|
|
|
41033
41036
|
affectsModuleResolution: true,
|
|
41034
41037
|
affectsEmit: true,
|
|
41035
41038
|
affectsBuildInfo: true,
|
|
41036
|
-
deprecatedKeys: /* @__PURE__ */ new Set(["es3"]),
|
|
41039
|
+
deprecatedKeys: /* @__PURE__ */ new Set(["es3", "es5"]),
|
|
41037
41040
|
paramType: Diagnostics.VERSION,
|
|
41038
41041
|
showInSimplifiedHelpView: true,
|
|
41039
41042
|
category: Diagnostics.Language_and_Environment,
|
|
41040
41043
|
description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
41041
|
-
defaultValueDescription:
|
|
41044
|
+
defaultValueDescription: 11 /* CurrentYear */
|
|
41042
41045
|
};
|
|
41043
41046
|
var moduleOptionDeclaration = {
|
|
41044
41047
|
name: "module",
|
|
@@ -46227,7 +46230,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46227
46230
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
46228
46231
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
46229
46232
|
const commonSourceDirGuesses = [];
|
|
46230
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.
|
|
46233
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
46231
46234
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
46232
46235
|
commonSourceDirGuesses.push(commonDir);
|
|
46233
46236
|
} else if (state.requestContainingDirectory) {
|
|
@@ -53132,6 +53135,15 @@ function createTypeChecker(host) {
|
|
|
53132
53135
|
if (usageMode === 99 /* ESNext */ && targetMode === 99 /* ESNext */) {
|
|
53133
53136
|
return false;
|
|
53134
53137
|
}
|
|
53138
|
+
if (!targetMode && file.isDeclarationFile) {
|
|
53139
|
+
const redirect = host.getRedirectFromSourceFile(file.path) || host.getRedirectFromOutput(file.path);
|
|
53140
|
+
if (redirect) {
|
|
53141
|
+
const targetModuleKind = host.getEmitModuleFormatOfFile(file);
|
|
53142
|
+
if (usageMode === 99 /* ESNext */ && 5 /* ES2015 */ <= targetModuleKind && targetModuleKind <= 99 /* ESNext */) {
|
|
53143
|
+
return false;
|
|
53144
|
+
}
|
|
53145
|
+
}
|
|
53146
|
+
}
|
|
53135
53147
|
}
|
|
53136
53148
|
if (!allowSyntheticDefaultImports) {
|
|
53137
53149
|
return false;
|
|
@@ -61701,6 +61713,9 @@ function createTypeChecker(host) {
|
|
|
61701
61713
|
));
|
|
61702
61714
|
}
|
|
61703
61715
|
function getBaseTypes(type) {
|
|
61716
|
+
if (!(getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */))) {
|
|
61717
|
+
return emptyArray;
|
|
61718
|
+
}
|
|
61704
61719
|
if (!type.baseTypesResolved) {
|
|
61705
61720
|
if (pushTypeResolution(type, 6 /* ResolvedBaseTypes */)) {
|
|
61706
61721
|
if (type.objectFlags & 8 /* Tuple */) {
|
|
@@ -63462,6 +63477,12 @@ function createTypeChecker(host) {
|
|
|
63462
63477
|
return t.flags & 1048576 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) : t.flags & 2097152 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) : void 0;
|
|
63463
63478
|
}
|
|
63464
63479
|
if (t.flags & 4194304 /* Index */) {
|
|
63480
|
+
if (isGenericMappedType(t.type)) {
|
|
63481
|
+
const mappedType = t.type;
|
|
63482
|
+
if (getNameTypeFromMappedType(mappedType) && !isMappedTypeWithKeyofConstraintDeclaration(mappedType)) {
|
|
63483
|
+
return getBaseConstraint(getIndexTypeForMappedType(mappedType, 0 /* None */));
|
|
63484
|
+
}
|
|
63485
|
+
}
|
|
63465
63486
|
return stringNumberSymbolType;
|
|
63466
63487
|
}
|
|
63467
63488
|
if (t.flags & 134217728 /* TemplateLiteral */) {
|
|
@@ -66437,13 +66458,6 @@ function createTypeChecker(host) {
|
|
|
66437
66458
|
keyTypes.push(propNameType === stringType ? stringOrNumberType : propNameType);
|
|
66438
66459
|
}
|
|
66439
66460
|
}
|
|
66440
|
-
function hasDistributiveNameType(mappedType) {
|
|
66441
|
-
const typeVariable = getTypeParameterFromMappedType(mappedType);
|
|
66442
|
-
return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable);
|
|
66443
|
-
function isDistributive(type) {
|
|
66444
|
-
return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false;
|
|
66445
|
-
}
|
|
66446
|
-
}
|
|
66447
66461
|
function getLiteralTypeFromPropertyName(name) {
|
|
66448
66462
|
if (isPrivateIdentifier(name)) {
|
|
66449
66463
|
return neverType;
|
|
@@ -66494,7 +66508,7 @@ function createTypeChecker(host) {
|
|
|
66494
66508
|
);
|
|
66495
66509
|
}
|
|
66496
66510
|
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
66497
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (
|
|
66511
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && getNameTypeFromMappedType(type) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
66498
66512
|
}
|
|
66499
66513
|
function getIndexType(type, indexFlags = 0 /* None */) {
|
|
66500
66514
|
type = getReducedType(type);
|
|
@@ -66936,7 +66950,7 @@ function createTypeChecker(host) {
|
|
|
66936
66950
|
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */) || isGenericStringLikeType(type) ? 8388608 /* IsGenericIndexType */ : 0);
|
|
66937
66951
|
}
|
|
66938
66952
|
function getSimplifiedType(type, writing) {
|
|
66939
|
-
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
|
|
66953
|
+
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type.flags & 4194304 /* Index */ ? getSimplifiedIndexType(type) : type;
|
|
66940
66954
|
}
|
|
66941
66955
|
function distributeIndexOverObjectType(objectType, indexType, writing) {
|
|
66942
66956
|
if (objectType.flags & 1048576 /* Union */ || objectType.flags & 2097152 /* Intersection */ && !shouldDeferIndexType(objectType)) {
|
|
@@ -67007,6 +67021,12 @@ function createTypeChecker(host) {
|
|
|
67007
67021
|
}
|
|
67008
67022
|
return type;
|
|
67009
67023
|
}
|
|
67024
|
+
function getSimplifiedIndexType(type) {
|
|
67025
|
+
if (isGenericMappedType(type.type) && getNameTypeFromMappedType(type.type) && !isMappedTypeWithKeyofConstraintDeclaration(type.type)) {
|
|
67026
|
+
return getIndexTypeForMappedType(type.type, 0 /* None */);
|
|
67027
|
+
}
|
|
67028
|
+
return type;
|
|
67029
|
+
}
|
|
67010
67030
|
function isIntersectionEmpty(type1, type2) {
|
|
67011
67031
|
return !!(getUnionType([intersectTypes(type1, type2), neverType]).flags & 131072 /* Never */);
|
|
67012
67032
|
}
|
|
@@ -69283,7 +69303,7 @@ function createTypeChecker(host) {
|
|
|
69283
69303
|
}
|
|
69284
69304
|
function getNormalizedType(type, writing) {
|
|
69285
69305
|
while (true) {
|
|
69286
|
-
const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags &
|
|
69306
|
+
const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 29360128 /* Simplifiable */ ? getSimplifiedType(type, writing) : type;
|
|
69287
69307
|
if (t === type) return t;
|
|
69288
69308
|
type = t;
|
|
69289
69309
|
}
|
|
@@ -69313,7 +69333,7 @@ function createTypeChecker(host) {
|
|
|
69313
69333
|
}
|
|
69314
69334
|
function getNormalizedTupleType(type, writing) {
|
|
69315
69335
|
const elements = getElementTypes(type);
|
|
69316
|
-
const normalizedElements = sameMap(elements, (t) => t.flags &
|
|
69336
|
+
const normalizedElements = sameMap(elements, (t) => t.flags & 29360128 /* Simplifiable */ ? getSimplifiedType(t, writing) : t);
|
|
69317
69337
|
return elements !== normalizedElements ? createNormalizedTupleType(type.target, normalizedElements) : type;
|
|
69318
69338
|
}
|
|
69319
69339
|
function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {
|
|
@@ -71732,7 +71752,7 @@ function createTypeChecker(host) {
|
|
|
71732
71752
|
}
|
|
71733
71753
|
function discriminateTypeByDiscriminableItems(target, discriminators, related) {
|
|
71734
71754
|
const types = target.types;
|
|
71735
|
-
const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */);
|
|
71755
|
+
const include = types.map((t) => t.flags & 402784252 /* Primitive */ || getReducedType(t).flags & 131072 /* Never */ ? 0 /* False */ : -1 /* True */);
|
|
71736
71756
|
for (const [getDiscriminatingType, propertyName] of discriminators) {
|
|
71737
71757
|
let matched = false;
|
|
71738
71758
|
for (let i = 0; i < types.length; i++) {
|
|
@@ -75594,12 +75614,6 @@ function createTypeChecker(host) {
|
|
|
75594
75614
|
return caseType;
|
|
75595
75615
|
}
|
|
75596
75616
|
const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, t.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(t)), (t1, t2) => isUnitType(t1) && areTypesComparable(t1, t2))));
|
|
75597
|
-
if (!(type.flags & 1048576 /* Union */) && isUnitLikeType(type)) {
|
|
75598
|
-
const regularType = type.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(type));
|
|
75599
|
-
if (isUnitType(regularType) && contains(switchTypes, regularType, (t1, t2) => isUnitType(t1) && areTypesComparable(t1, t2))) {
|
|
75600
|
-
return neverType;
|
|
75601
|
-
}
|
|
75602
|
-
}
|
|
75603
75617
|
return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);
|
|
75604
75618
|
}
|
|
75605
75619
|
function narrowTypeByTypeName(type, typeName) {
|
|
@@ -76659,7 +76673,7 @@ function createTypeChecker(host) {
|
|
|
76659
76673
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 219 /* FunctionExpression */ || flowContainer.kind === 220 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {
|
|
76660
76674
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
76661
76675
|
}
|
|
76662
|
-
const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol);
|
|
76676
|
+
const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !isForInOrOfStatement(immediateDeclaration.parent.parent) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol);
|
|
76663
76677
|
const assumeInitialized = isParameter2 || isAlias || isOuterVariable && !isNeverInitialized || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 282 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
76664
76678
|
const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);
|
|
76665
76679
|
const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
@@ -79364,10 +79378,10 @@ function createTypeChecker(host) {
|
|
|
79364
79378
|
}
|
|
79365
79379
|
}
|
|
79366
79380
|
if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {
|
|
79367
|
-
const
|
|
79368
|
-
if (
|
|
79381
|
+
const parentSymbol = getParentOfSymbol(prop);
|
|
79382
|
+
if (parentSymbol && parentSymbol.flags & 32 /* Class */ && isNodeUsedDuringClassInitialization(location)) {
|
|
79369
79383
|
if (errorNode) {
|
|
79370
|
-
error2(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop),
|
|
79384
|
+
error2(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), symbolToString(parentSymbol));
|
|
79371
79385
|
}
|
|
79372
79386
|
return false;
|
|
79373
79387
|
}
|
|
@@ -79870,27 +79884,14 @@ function createTypeChecker(host) {
|
|
|
79870
79884
|
});
|
|
79871
79885
|
}
|
|
79872
79886
|
function isPropertyDeclaredInAncestorClass(prop) {
|
|
79873
|
-
if (
|
|
79874
|
-
|
|
79875
|
-
|
|
79876
|
-
|
|
79877
|
-
|
|
79878
|
-
classType = classType.symbol && getSuperClass(classType);
|
|
79879
|
-
if (!classType) {
|
|
79880
|
-
return false;
|
|
79881
|
-
}
|
|
79882
|
-
const superProperty = getPropertyOfType(classType, prop.escapedName);
|
|
79883
|
-
if (superProperty && superProperty.valueDeclaration) {
|
|
79884
|
-
return true;
|
|
79887
|
+
if (prop.parent && prop.parent.flags & 32 /* Class */) {
|
|
79888
|
+
const baseTypes = getBaseTypes(getDeclaredTypeOfSymbol(prop.parent));
|
|
79889
|
+
if (baseTypes.length) {
|
|
79890
|
+
const superProperty = getPropertyOfType(baseTypes[0], prop.escapedName);
|
|
79891
|
+
return !!(superProperty && superProperty.valueDeclaration);
|
|
79885
79892
|
}
|
|
79886
79893
|
}
|
|
79887
|
-
|
|
79888
|
-
function getSuperClass(classType) {
|
|
79889
|
-
const x = getBaseTypes(classType);
|
|
79890
|
-
if (x.length === 0) {
|
|
79891
|
-
return void 0;
|
|
79892
|
-
}
|
|
79893
|
-
return getIntersectionType(x);
|
|
79894
|
+
return false;
|
|
79894
79895
|
}
|
|
79895
79896
|
function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
|
|
79896
79897
|
const links = getNodeLinks(propNode);
|
|
@@ -84426,7 +84427,6 @@ function createTypeChecker(host) {
|
|
|
84426
84427
|
}
|
|
84427
84428
|
}
|
|
84428
84429
|
checkNullishCoalesceOperandLeft(node);
|
|
84429
|
-
checkNullishCoalesceOperandRight(node);
|
|
84430
84430
|
}
|
|
84431
84431
|
function checkNullishCoalesceOperandLeft(node) {
|
|
84432
84432
|
const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
|
|
@@ -84439,21 +84439,6 @@ function createTypeChecker(host) {
|
|
|
84439
84439
|
}
|
|
84440
84440
|
}
|
|
84441
84441
|
}
|
|
84442
|
-
function checkNullishCoalesceOperandRight(node) {
|
|
84443
|
-
const rightTarget = skipOuterExpressions(node.right, 63 /* All */);
|
|
84444
|
-
const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget);
|
|
84445
|
-
if (isNotWithinNullishCoalesceExpression(node)) {
|
|
84446
|
-
return;
|
|
84447
|
-
}
|
|
84448
|
-
if (nullishSemantics === 1 /* Always */) {
|
|
84449
|
-
error2(rightTarget, Diagnostics.This_expression_is_always_nullish);
|
|
84450
|
-
} else if (nullishSemantics === 2 /* Never */) {
|
|
84451
|
-
error2(rightTarget, Diagnostics.This_expression_is_never_nullish);
|
|
84452
|
-
}
|
|
84453
|
-
}
|
|
84454
|
-
function isNotWithinNullishCoalesceExpression(node) {
|
|
84455
|
-
return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== 61 /* QuestionQuestionToken */;
|
|
84456
|
-
}
|
|
84457
84442
|
function getSyntacticNullishnessSemantics(node) {
|
|
84458
84443
|
node = skipOuterExpressions(node);
|
|
84459
84444
|
switch (node.kind) {
|
|
@@ -84469,15 +84454,16 @@ function createTypeChecker(host) {
|
|
|
84469
84454
|
return 3 /* Sometimes */;
|
|
84470
84455
|
case 227 /* BinaryExpression */:
|
|
84471
84456
|
switch (node.operatorToken.kind) {
|
|
84472
|
-
case 64 /* EqualsToken */:
|
|
84473
|
-
case 61 /* QuestionQuestionToken */:
|
|
84474
|
-
case 78 /* QuestionQuestionEqualsToken */:
|
|
84475
84457
|
case 57 /* BarBarToken */:
|
|
84476
84458
|
case 76 /* BarBarEqualsToken */:
|
|
84477
84459
|
case 56 /* AmpersandAmpersandToken */:
|
|
84478
84460
|
case 77 /* AmpersandAmpersandEqualsToken */:
|
|
84479
84461
|
return 3 /* Sometimes */;
|
|
84462
|
+
// For these operator kinds, the right operand is effectively controlling
|
|
84480
84463
|
case 28 /* CommaToken */:
|
|
84464
|
+
case 64 /* EqualsToken */:
|
|
84465
|
+
case 61 /* QuestionQuestionToken */:
|
|
84466
|
+
case 78 /* QuestionQuestionEqualsToken */:
|
|
84481
84467
|
return getSyntacticNullishnessSemantics(node.right);
|
|
84482
84468
|
}
|
|
84483
84469
|
return 2 /* Never */;
|
|
@@ -86383,9 +86369,8 @@ function createTypeChecker(host) {
|
|
|
86383
86369
|
}
|
|
86384
86370
|
const objectType = type.objectType;
|
|
86385
86371
|
const indexType = type.indexType;
|
|
86386
|
-
const objectIndexType = isGenericMappedType(objectType) && getMappedTypeNameTypeKind(objectType) === 2 /* Remapping */ ? getIndexTypeForMappedType(objectType, 0 /* None */) : getIndexType(objectType, 0 /* None */);
|
|
86387
86372
|
const hasNumberIndexInfo = !!getIndexInfoOfType(objectType, numberType);
|
|
86388
|
-
if (everyType(indexType, (t) => isTypeAssignableTo(t,
|
|
86373
|
+
if (everyType(indexType, (t) => isTypeAssignableTo(t, getIndexType(objectType, 0 /* None */)) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) {
|
|
86389
86374
|
if (accessNode.kind === 213 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) {
|
|
86390
86375
|
error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
|
|
86391
86376
|
}
|
|
@@ -91250,8 +91235,8 @@ function createTypeChecker(host) {
|
|
|
91250
91235
|
}
|
|
91251
91236
|
(reportedUnreachableNodes ?? (reportedUnreachableNodes = /* @__PURE__ */ new Set())).add(node);
|
|
91252
91237
|
const sourceFile = getSourceFileOfNode(node);
|
|
91253
|
-
let
|
|
91254
|
-
let
|
|
91238
|
+
let startNode2 = node;
|
|
91239
|
+
let endNode2 = node;
|
|
91255
91240
|
const parent2 = node.parent;
|
|
91256
91241
|
if (canHaveStatements(parent2)) {
|
|
91257
91242
|
const statements = parent2.statements;
|
|
@@ -91275,12 +91260,12 @@ function createTypeChecker(host) {
|
|
|
91275
91260
|
last2 = i;
|
|
91276
91261
|
reportedUnreachableNodes.add(nextNode);
|
|
91277
91262
|
}
|
|
91278
|
-
|
|
91279
|
-
|
|
91263
|
+
startNode2 = statements[first2];
|
|
91264
|
+
endNode2 = statements[last2];
|
|
91280
91265
|
}
|
|
91281
91266
|
}
|
|
91282
|
-
start =
|
|
91283
|
-
addErrorOrSuggestion(compilerOptions.allowUnreachableCode === false, createFileDiagnostic(sourceFile, start, end - start, Diagnostics.Unreachable_code_detected));
|
|
91267
|
+
const start = getTokenPosOfNode(startNode2, sourceFile);
|
|
91268
|
+
addErrorOrSuggestion(compilerOptions.allowUnreachableCode === false, createFileDiagnostic(sourceFile, start, endNode2.end - start, Diagnostics.Unreachable_code_detected));
|
|
91284
91269
|
return true;
|
|
91285
91270
|
}
|
|
91286
91271
|
function isSourceElementUnreachable(node) {
|
|
@@ -98900,6 +98885,9 @@ function transformTypeScript(context) {
|
|
|
98900
98885
|
const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));
|
|
98901
98886
|
if (parametersWithPropertyAssignments) {
|
|
98902
98887
|
for (const parameter of parametersWithPropertyAssignments) {
|
|
98888
|
+
if (!isIdentifier(parameter.name)) {
|
|
98889
|
+
continue;
|
|
98890
|
+
}
|
|
98903
98891
|
const parameterProperty = factory2.createPropertyDeclaration(
|
|
98904
98892
|
/*modifiers*/
|
|
98905
98893
|
void 0,
|
|
@@ -120786,7 +120774,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120786
120774
|
if (options.rootDir) {
|
|
120787
120775
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
120788
120776
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
120789
|
-
} else if (options.
|
|
120777
|
+
} else if (options.configFilePath) {
|
|
120790
120778
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
120791
120779
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
120792
120780
|
} else {
|
|
@@ -120797,6 +120785,13 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120797
120785
|
}
|
|
120798
120786
|
return commonSourceDirectory;
|
|
120799
120787
|
}
|
|
120788
|
+
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
120789
|
+
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
120790
|
+
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
120791
|
+
commonSourceDirectory += directorySeparator;
|
|
120792
|
+
}
|
|
120793
|
+
return commonSourceDirectory;
|
|
120794
|
+
}
|
|
120800
120795
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
120801
120796
|
return getCommonSourceDirectory(
|
|
120802
120797
|
options,
|
|
@@ -129286,6 +129281,31 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129286
129281
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
129287
129282
|
}
|
|
129288
129283
|
}
|
|
129284
|
+
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
129285
|
+
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
129286
|
+
options.outFile)) {
|
|
129287
|
+
const dir = getCommonSourceDirectory2();
|
|
129288
|
+
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
129289
|
+
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
129290
|
+
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
129291
|
+
createDiagnosticForOption(
|
|
129292
|
+
/*onKey*/
|
|
129293
|
+
true,
|
|
129294
|
+
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
129295
|
+
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
129296
|
+
chainDiagnosticMessages(
|
|
129297
|
+
chainDiagnosticMessages(
|
|
129298
|
+
/*details*/
|
|
129299
|
+
void 0,
|
|
129300
|
+
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129301
|
+
),
|
|
129302
|
+
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
129303
|
+
getBaseFileName(options.configFilePath),
|
|
129304
|
+
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
129305
|
+
)
|
|
129306
|
+
);
|
|
129307
|
+
}
|
|
129308
|
+
}
|
|
129289
129309
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
129290
129310
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
129291
129311
|
}
|
|
@@ -129494,12 +129514,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129494
129514
|
createDeprecatedDiagnostic("charset");
|
|
129495
129515
|
}
|
|
129496
129516
|
if (options.out) {
|
|
129497
|
-
createDeprecatedDiagnostic(
|
|
129498
|
-
"out",
|
|
129499
|
-
/*value*/
|
|
129500
|
-
void 0,
|
|
129501
|
-
"outFile"
|
|
129502
|
-
);
|
|
129517
|
+
createDeprecatedDiagnostic("out");
|
|
129503
129518
|
}
|
|
129504
129519
|
if (options.importsNotUsedAsValues) {
|
|
129505
129520
|
createDeprecatedDiagnostic(
|
|
@@ -129519,6 +129534,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129519
129534
|
}
|
|
129520
129535
|
});
|
|
129521
129536
|
checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
|
|
129537
|
+
if (options.target === 1 /* ES5 */) {
|
|
129538
|
+
createDeprecatedDiagnostic("target", "ES5");
|
|
129539
|
+
}
|
|
129522
129540
|
if (options.moduleResolution === 2 /* Node10 */) {
|
|
129523
129541
|
createDeprecatedDiagnostic(
|
|
129524
129542
|
"moduleResolution",
|
|
@@ -129568,6 +129586,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129568
129586
|
void 0
|
|
129569
129587
|
);
|
|
129570
129588
|
}
|
|
129589
|
+
if (options.outFile) {
|
|
129590
|
+
createDeprecatedDiagnostic("outFile");
|
|
129591
|
+
}
|
|
129571
129592
|
if (options.module === 0 /* None */ || options.module === 2 /* AMD */ || options.module === 3 /* UMD */ || options.module === 4 /* System */) {
|
|
129572
129593
|
createDeprecatedDiagnostic(
|
|
129573
129594
|
"module",
|
|
@@ -132772,7 +132793,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
132772
132793
|
shouldRetryResolution,
|
|
132773
132794
|
logChanges
|
|
132774
132795
|
}) {
|
|
132775
|
-
var _a;
|
|
132796
|
+
var _a, _b;
|
|
132776
132797
|
const path = resolutionHost.toPath(containingFile);
|
|
132777
132798
|
const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);
|
|
132778
132799
|
const resolvedModules = [];
|
|
@@ -132793,7 +132814,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
132793
132814
|
resolutionHost.onDiscoveredSymlink();
|
|
132794
132815
|
}
|
|
132795
132816
|
resolutionsInFile.set(name, mode, resolution);
|
|
132796
|
-
if (resolution !== existingResolution) {
|
|
132817
|
+
if (resolution !== existingResolution && !((_b = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _b.call(resolutionHost, path))) {
|
|
132797
132818
|
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
132798
132819
|
if (existingResolution) {
|
|
132799
132820
|
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
@@ -132830,8 +132851,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
132830
132851
|
);
|
|
132831
132852
|
if (resolutionsInFile.size() !== seenNamesInFile.size()) {
|
|
132832
132853
|
resolutionsInFile.forEach((resolution, name, mode) => {
|
|
132854
|
+
var _a2;
|
|
132833
132855
|
if (!seenNamesInFile.has(name, mode)) {
|
|
132834
|
-
|
|
132856
|
+
if (!((_a2 = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _a2.call(resolutionHost, path))) {
|
|
132857
|
+
stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
|
|
132858
|
+
}
|
|
132835
132859
|
resolutionsInFile.delete(name, mode);
|
|
132836
132860
|
}
|
|
132837
132861
|
});
|
|
@@ -133245,15 +133269,18 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
133245
133269
|
}, nonRecursive ? 0 /* None */ : 1 /* Recursive */);
|
|
133246
133270
|
}
|
|
133247
133271
|
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) {
|
|
133272
|
+
var _a;
|
|
133248
133273
|
const resolutions = cache.get(filePath);
|
|
133249
133274
|
if (resolutions) {
|
|
133250
|
-
|
|
133251
|
-
(
|
|
133252
|
-
resolution
|
|
133253
|
-
|
|
133254
|
-
|
|
133255
|
-
|
|
133256
|
-
|
|
133275
|
+
if (!((_a = resolutionHost.skipWatchingFailedLookups) == null ? void 0 : _a.call(resolutionHost, filePath))) {
|
|
133276
|
+
resolutions.forEach(
|
|
133277
|
+
(resolution) => stopWatchFailedLookupLocationOfResolution(
|
|
133278
|
+
resolution,
|
|
133279
|
+
filePath,
|
|
133280
|
+
getResolutionWithResolvedFileName
|
|
133281
|
+
)
|
|
133282
|
+
);
|
|
133283
|
+
}
|
|
133257
133284
|
cache.delete(filePath);
|
|
133258
133285
|
}
|
|
133259
133286
|
}
|
|
@@ -133408,11 +133435,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
133408
133435
|
}, 1 /* Recursive */) : noopFileWatcher;
|
|
133409
133436
|
}
|
|
133410
133437
|
function updateTypeRootsWatch() {
|
|
133438
|
+
var _a;
|
|
133411
133439
|
const options = resolutionHost.getCompilationSettings();
|
|
133412
133440
|
if (options.types) {
|
|
133413
133441
|
closeTypeRootsWatch();
|
|
133414
133442
|
return;
|
|
133415
133443
|
}
|
|
133444
|
+
if (!isRootWatchable || ((_a = resolutionHost.skipWatchingTypeRoots) == null ? void 0 : _a.call(resolutionHost))) {
|
|
133445
|
+
closeTypeRootsWatch();
|
|
133446
|
+
return;
|
|
133447
|
+
}
|
|
133416
133448
|
const typeRoots = getEffectiveTypeRoots(options, { getCurrentDirectory });
|
|
133417
133449
|
if (typeRoots) {
|
|
133418
133450
|
mutateMap(
|
|
@@ -136631,7 +136663,13 @@ function updateReportDiagnostic(sys2, existing, options) {
|
|
|
136631
136663
|
) : existing;
|
|
136632
136664
|
}
|
|
136633
136665
|
function defaultIsPretty(sys2) {
|
|
136634
|
-
|
|
136666
|
+
if (sys2.getEnvironmentVariable("NO_COLOR")) {
|
|
136667
|
+
return false;
|
|
136668
|
+
}
|
|
136669
|
+
if (sys2.getEnvironmentVariable("FORCE_COLOR")) {
|
|
136670
|
+
return true;
|
|
136671
|
+
}
|
|
136672
|
+
return !!sys2.writeOutputIsTTY && sys2.writeOutputIsTTY();
|
|
136635
136673
|
}
|
|
136636
136674
|
function shouldBePretty(sys2, options) {
|
|
136637
136675
|
if (!options || typeof options.pretty === "undefined") {
|
|
@@ -144733,7 +144771,7 @@ function every2(s, pred, start = 0, end = s.length) {
|
|
|
144733
144771
|
// src/services/preProcess.ts
|
|
144734
144772
|
function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImports = false) {
|
|
144735
144773
|
const pragmaContext = {
|
|
144736
|
-
languageVersion:
|
|
144774
|
+
languageVersion: 11 /* CurrentYear */,
|
|
144737
144775
|
// controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia
|
|
144738
144776
|
pragmas: void 0,
|
|
144739
144777
|
checkJsDirective: void 0,
|
|
@@ -152629,7 +152667,7 @@ function displayPartsToString(displayParts) {
|
|
|
152629
152667
|
}
|
|
152630
152668
|
function getDefaultCompilerOptions2() {
|
|
152631
152669
|
return {
|
|
152632
|
-
target:
|
|
152670
|
+
target: 11 /* CurrentYear */,
|
|
152633
152671
|
jsx: 1 /* Preserve */
|
|
152634
152672
|
};
|
|
152635
152673
|
}
|
|
@@ -184057,6 +184095,7 @@ __export(ts_exports2, {
|
|
|
184057
184095
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
184058
184096
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
184059
184097
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
184098
|
+
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
184060
184099
|
getConditions: () => getConditions,
|
|
184061
184100
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
184062
184101
|
getConstantValue: () => getConstantValue,
|
|
@@ -186666,6 +186705,7 @@ var ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => {
|
|
|
186666
186705
|
ScriptTarget12["ESNext"] = "esnext";
|
|
186667
186706
|
ScriptTarget12["JSON"] = "json";
|
|
186668
186707
|
ScriptTarget12["Latest"] = "esnext" /* ESNext */;
|
|
186708
|
+
ScriptTarget12["CurrentYear"] = "es2024" /* ES2024 */;
|
|
186669
186709
|
return ScriptTarget12;
|
|
186670
186710
|
})(ScriptTarget11 || {});
|
|
186671
186711
|
{
|
|
@@ -188175,6 +188215,9 @@ var Project2 = class _Project {
|
|
|
188175
188215
|
}
|
|
188176
188216
|
/** @internal */
|
|
188177
188217
|
watchTypingLocations(files) {
|
|
188218
|
+
if (this.currentDirectory === this.projectService.currentDirectory || !canWatchDirectoryOrFilePath(this.toPath(this.currentDirectory))) {
|
|
188219
|
+
return;
|
|
188220
|
+
}
|
|
188178
188221
|
if (!files) {
|
|
188179
188222
|
this.typingWatchers.isInvoked = false;
|
|
188180
188223
|
return;
|
|
@@ -188243,6 +188286,15 @@ var Project2 = class _Project {
|
|
|
188243
188286
|
});
|
|
188244
188287
|
}
|
|
188245
188288
|
/** @internal */
|
|
188289
|
+
skipWatchingFailedLookups(path) {
|
|
188290
|
+
const info = this.projectService.getScriptInfoForPath(path);
|
|
188291
|
+
return info == null ? void 0 : info.isDynamic;
|
|
188292
|
+
}
|
|
188293
|
+
/** @internal */
|
|
188294
|
+
skipWatchingTypeRoots() {
|
|
188295
|
+
return isInferredProject(this) && this.currentDirectory === this.projectService.currentDirectory;
|
|
188296
|
+
}
|
|
188297
|
+
/** @internal */
|
|
188246
188298
|
getCurrentProgram() {
|
|
188247
188299
|
return this.program;
|
|
188248
188300
|
}
|
|
@@ -189640,6 +189692,9 @@ function convertCompilerOptions(protocolOptions) {
|
|
|
189640
189692
|
protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase());
|
|
189641
189693
|
}
|
|
189642
189694
|
});
|
|
189695
|
+
if (isArray(protocolOptions.lib)) {
|
|
189696
|
+
protocolOptions.lib = protocolOptions.lib.map((libName) => libMap.get(libName) ?? libName);
|
|
189697
|
+
}
|
|
189643
189698
|
return protocolOptions;
|
|
189644
189699
|
}
|
|
189645
189700
|
function convertWatchOptions(protocolOptions, currentDirectory) {
|
|
@@ -198818,6 +198873,7 @@ if (typeof console !== "undefined") {
|
|
|
198818
198873
|
getCommonSourceDirectory,
|
|
198819
198874
|
getCommonSourceDirectoryOfConfig,
|
|
198820
198875
|
getCompilerOptionValue,
|
|
198876
|
+
getComputedCommonSourceDirectory,
|
|
198821
198877
|
getConditions,
|
|
198822
198878
|
getConfigFileParsingDiagnostics,
|
|
198823
198879
|
getConstantValue,
|
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": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-63067-4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|