typescript 4.8.0-dev.20220529 → 4.8.0-dev.20220601
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/cs/diagnosticMessages.generated.json +1 -0
- package/lib/de/diagnosticMessages.generated.json +1 -0
- package/lib/es/diagnosticMessages.generated.json +1 -0
- package/lib/fr/diagnosticMessages.generated.json +1 -0
- package/lib/it/diagnosticMessages.generated.json +1 -0
- package/lib/ja/diagnosticMessages.generated.json +1 -0
- package/lib/ko/diagnosticMessages.generated.json +1 -0
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +1 -0
- package/lib/ru/diagnosticMessages.generated.json +1 -0
- package/lib/tr/diagnosticMessages.generated.json +1 -0
- package/lib/tsc.js +131 -127
- package/lib/tsserver.js +169 -150
- package/lib/tsserverlibrary.js +169 -150
- package/lib/typescript.js +169 -150
- package/lib/typescriptServices.js +169 -150
- package/lib/typingsInstaller.js +149 -147
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -0
- package/package.json +1 -1
- package/test.js +9 -0
- package/test.ts +4 -0
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220601";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -6084,6 +6084,7 @@ var ts;
|
|
|
6084
6084
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
6085
6085
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
6086
6086
|
This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
|
|
6087
|
+
An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, ts.DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
|
|
6087
6088
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6088
6089
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6089
6090
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -36114,8 +36115,7 @@ var ts;
|
|
|
36114
36115
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
36115
36116
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
|
|
36116
36117
|
if (!pathAndExtension && packageInfo
|
|
36117
|
-
&& packageInfo.packageJsonContent.exports === undefined
|
|
36118
|
-
&& packageInfo.packageJsonContent.main === undefined
|
|
36118
|
+
&& (packageInfo.packageJsonContent.exports === undefined || packageInfo.packageJsonContent.exports === null)
|
|
36119
36119
|
&& state.features & NodeResolutionFeatures.EsmMode) {
|
|
36120
36120
|
pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
|
|
36121
36121
|
}
|
|
@@ -41039,7 +41039,12 @@ var ts;
|
|
|
41039
41039
|
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
|
|
41040
41040
|
if (meaning & (111551 & ~1024)) {
|
|
41041
41041
|
if (isPrimitiveTypeName(name)) {
|
|
41042
|
-
|
|
41042
|
+
if (isExtendedByInterface(errorLocation)) {
|
|
41043
|
+
error(errorLocation, ts.Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, ts.unescapeLeadingUnderscores(name));
|
|
41044
|
+
}
|
|
41045
|
+
else {
|
|
41046
|
+
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name));
|
|
41047
|
+
}
|
|
41043
41048
|
return true;
|
|
41044
41049
|
}
|
|
41045
41050
|
var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 & ~111551, undefined, undefined, false));
|
|
@@ -41059,6 +41064,16 @@ var ts;
|
|
|
41059
41064
|
}
|
|
41060
41065
|
return false;
|
|
41061
41066
|
}
|
|
41067
|
+
function isExtendedByInterface(node) {
|
|
41068
|
+
var grandparent = node.parent.parent;
|
|
41069
|
+
var parentOfGrandparent = grandparent.parent;
|
|
41070
|
+
if (grandparent && parentOfGrandparent) {
|
|
41071
|
+
var isExtending = ts.isHeritageClause(grandparent) && grandparent.token === 94;
|
|
41072
|
+
var isInterface = ts.isInterfaceDeclaration(parentOfGrandparent);
|
|
41073
|
+
return isExtending && isInterface;
|
|
41074
|
+
}
|
|
41075
|
+
return false;
|
|
41076
|
+
}
|
|
41062
41077
|
function maybeMappedType(node, symbol) {
|
|
41063
41078
|
var container = ts.findAncestor(node.parent, function (n) {
|
|
41064
41079
|
return ts.isComputedPropertyName(n) || ts.isPropertySignature(n) ? false : ts.isTypeLiteralNode(n) || "quit";
|
|
@@ -43585,7 +43600,7 @@ var ts;
|
|
|
43585
43600
|
anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
43586
43601
|
var saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
43587
43602
|
context.enclosingDeclaration = undefined;
|
|
43588
|
-
if (context.tracker.trackSymbol &&
|
|
43603
|
+
if (context.tracker.trackSymbol && isLateBoundName(propertySymbol.escapedName)) {
|
|
43589
43604
|
if (propertySymbol.declarations) {
|
|
43590
43605
|
var decl = ts.first(propertySymbol.declarations);
|
|
43591
43606
|
if (hasLateBindableName(decl)) {
|
|
@@ -45040,7 +45055,7 @@ var ts;
|
|
|
45040
45055
|
? getBaseConstructorTypeOfClass(staticType)
|
|
45041
45056
|
: anyType;
|
|
45042
45057
|
var heritageClauses = __spreadArray(__spreadArray([], !ts.length(baseTypes) ? [] : [ts.factory.createHeritageClause(94, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], true), !ts.length(implementsExpressions) ? [] : [ts.factory.createHeritageClause(117, implementsExpressions)], true);
|
|
45043
|
-
var symbolProps =
|
|
45058
|
+
var symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
45044
45059
|
var publicSymbolProps = ts.filter(symbolProps, function (s) {
|
|
45045
45060
|
var valueDecl = s.valueDeclaration;
|
|
45046
45061
|
return !!valueDecl && !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name));
|
|
@@ -45954,7 +45969,7 @@ var ts;
|
|
|
45954
45969
|
return type;
|
|
45955
45970
|
}
|
|
45956
45971
|
if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
|
|
45957
|
-
return strictNullChecks && !(
|
|
45972
|
+
return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0)) & 16777216) ? getNonUndefinedType(type) : type;
|
|
45958
45973
|
}
|
|
45959
45974
|
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0)], 2));
|
|
45960
45975
|
}
|
|
@@ -53441,7 +53456,7 @@ var ts;
|
|
|
53441
53456
|
var sourceSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(sourceType));
|
|
53442
53457
|
var targetSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(targetType));
|
|
53443
53458
|
var callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) &&
|
|
53444
|
-
(
|
|
53459
|
+
(getTypeFacts(sourceType) & 50331648) === (getTypeFacts(targetType) & 50331648);
|
|
53445
53460
|
var related = callbacks ?
|
|
53446
53461
|
compareSignaturesRelated(targetSig, sourceSig, (checkMode & 8) | (strictVariance ? 2 : 1), reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) :
|
|
53447
53462
|
!(checkMode & 3) && !strictVariance && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
|
|
@@ -56198,27 +56213,8 @@ var ts;
|
|
|
56198
56213
|
var value = _a.value;
|
|
56199
56214
|
return value.base10Value === "0";
|
|
56200
56215
|
}
|
|
56201
|
-
function getFalsyFlagsOfTypes(types) {
|
|
56202
|
-
var result = 0;
|
|
56203
|
-
for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
|
|
56204
|
-
var t = types_14[_i];
|
|
56205
|
-
result |= getFalsyFlags(t);
|
|
56206
|
-
}
|
|
56207
|
-
return result;
|
|
56208
|
-
}
|
|
56209
|
-
function getFalsyFlags(type) {
|
|
56210
|
-
var t = type.flags & 2097152 ? getBaseConstraintOrType(type) : type;
|
|
56211
|
-
return t.flags & 1048576 ? getFalsyFlagsOfTypes(t.types) :
|
|
56212
|
-
t.flags & 128 ? t.value === "" ? 128 : 0 :
|
|
56213
|
-
t.flags & 256 ? t.value === 0 ? 256 : 0 :
|
|
56214
|
-
t.flags & 2048 ? isZeroBigInt(t) ? 2048 : 0 :
|
|
56215
|
-
t.flags & 512 ? (t === falseType || t === regularFalseType) ? 512 : 0 :
|
|
56216
|
-
t.flags & 117724;
|
|
56217
|
-
}
|
|
56218
56216
|
function removeDefinitelyFalsyTypes(type) {
|
|
56219
|
-
return
|
|
56220
|
-
filterType(type, function (t) { return !(getFalsyFlags(t) & 117632); }) :
|
|
56221
|
-
type;
|
|
56217
|
+
return filterType(type, function (t) { return !!(getTypeFacts(t) & 4194304); });
|
|
56222
56218
|
}
|
|
56223
56219
|
function extractDefinitelyFalsyTypes(type) {
|
|
56224
56220
|
return mapType(type, getDefinitelyFalsyPartOfType);
|
|
@@ -56256,11 +56252,7 @@ var ts;
|
|
|
56256
56252
|
getIntersectionType([type, emptyObjectType]);
|
|
56257
56253
|
}
|
|
56258
56254
|
function getNonNullableType(type) {
|
|
56259
|
-
|
|
56260
|
-
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56261
|
-
return maybeTypeOfKind(reducedType, 465829888) ? getGlobalNonNullableTypeInstantiation(reducedType) : reducedType;
|
|
56262
|
-
}
|
|
56263
|
-
return type;
|
|
56255
|
+
return strictNullChecks ? getAdjustedTypeWithFacts(type, 2097152) : type;
|
|
56264
56256
|
}
|
|
56265
56257
|
function addOptionalTypeMarker(type) {
|
|
56266
56258
|
return strictNullChecks ? getUnionType([type, optionalType]) : type;
|
|
@@ -57230,8 +57222,8 @@ var ts;
|
|
|
57230
57222
|
}
|
|
57231
57223
|
function getSingleTypeVariableFromIntersectionTypes(types) {
|
|
57232
57224
|
var typeVariable;
|
|
57233
|
-
for (var _i = 0,
|
|
57234
|
-
var type =
|
|
57225
|
+
for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
|
|
57226
|
+
var type = types_14[_i];
|
|
57235
57227
|
var t = type.flags & 2097152 && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); });
|
|
57236
57228
|
if (!t || typeVariable && t !== typeVariable) {
|
|
57237
57229
|
return undefined;
|
|
@@ -57891,8 +57883,8 @@ var ts;
|
|
|
57891
57883
|
}
|
|
57892
57884
|
}
|
|
57893
57885
|
};
|
|
57894
|
-
for (var _i = 0,
|
|
57895
|
-
var type =
|
|
57886
|
+
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
57887
|
+
var type = types_15[_i];
|
|
57896
57888
|
var state_9 = _loop_24(type);
|
|
57897
57889
|
if (typeof state_9 === "object")
|
|
57898
57890
|
return state_9.value;
|
|
@@ -57991,14 +57983,16 @@ var ts;
|
|
|
57991
57983
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
|
|
57992
57984
|
resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
57993
57985
|
}
|
|
57994
|
-
function getTypeFacts(type
|
|
57995
|
-
if (
|
|
57986
|
+
function getTypeFacts(type) {
|
|
57987
|
+
if (type.flags & (2097152 | 465829888)) {
|
|
57988
|
+
type = getBaseConstraintOfType(type) || unknownType;
|
|
57989
|
+
}
|
|
57996
57990
|
var flags = type.flags;
|
|
57997
|
-
if (flags & 4) {
|
|
57991
|
+
if (flags & (4 | 268435456)) {
|
|
57998
57992
|
return strictNullChecks ? 16317953 : 16776705;
|
|
57999
57993
|
}
|
|
58000
|
-
if (flags & 128) {
|
|
58001
|
-
var isEmpty = type.value === "";
|
|
57994
|
+
if (flags & (128 | 134217728)) {
|
|
57995
|
+
var isEmpty = flags & 128 && type.value === "";
|
|
58002
57996
|
return strictNullChecks ?
|
|
58003
57997
|
isEmpty ? 12123649 : 7929345 :
|
|
58004
57998
|
isEmpty ? 12582401 : 16776705;
|
|
@@ -58030,20 +58024,20 @@ var ts;
|
|
|
58030
58024
|
(type === falseType || type === regularFalseType) ? 12580616 : 16774920;
|
|
58031
58025
|
}
|
|
58032
58026
|
if (flags & 524288) {
|
|
58033
|
-
if (ignoreObjects) {
|
|
58034
|
-
return 16768959;
|
|
58035
|
-
}
|
|
58036
58027
|
return ts.getObjectFlags(type) & 16 && isEmptyObjectType(type) ?
|
|
58037
|
-
strictNullChecks ?
|
|
58028
|
+
strictNullChecks ? 83427327 : 83886079 :
|
|
58038
58029
|
isFunctionObjectType(type) ?
|
|
58039
58030
|
strictNullChecks ? 7880640 : 16728000 :
|
|
58040
58031
|
strictNullChecks ? 7888800 : 16736160;
|
|
58041
58032
|
}
|
|
58042
|
-
if (flags &
|
|
58033
|
+
if (flags & 16384) {
|
|
58043
58034
|
return 9830144;
|
|
58044
58035
|
}
|
|
58036
|
+
if (flags & 32768) {
|
|
58037
|
+
return 26607360;
|
|
58038
|
+
}
|
|
58045
58039
|
if (flags & 65536) {
|
|
58046
|
-
return
|
|
58040
|
+
return 42917664;
|
|
58047
58041
|
}
|
|
58048
58042
|
if (flags & 12288) {
|
|
58049
58043
|
return strictNullChecks ? 7925520 : 16772880;
|
|
@@ -58054,34 +58048,32 @@ var ts;
|
|
|
58054
58048
|
if (flags & 131072) {
|
|
58055
58049
|
return 0;
|
|
58056
58050
|
}
|
|
58057
|
-
if (flags & 465829888) {
|
|
58058
|
-
return !isPatternLiteralType(type) ? getTypeFacts(getBaseConstraintOfType(type) || unknownType, ignoreObjects) :
|
|
58059
|
-
strictNullChecks ? 7929345 : 16776705;
|
|
58060
|
-
}
|
|
58061
58051
|
if (flags & 1048576) {
|
|
58062
|
-
return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t
|
|
58052
|
+
return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t); }, 0);
|
|
58063
58053
|
}
|
|
58064
58054
|
if (flags & 2097152) {
|
|
58065
|
-
|
|
58066
|
-
return getIntersectionTypeFacts(type, ignoreObjects);
|
|
58055
|
+
return getIntersectionTypeFacts(type);
|
|
58067
58056
|
}
|
|
58068
|
-
return
|
|
58057
|
+
return 83886079;
|
|
58069
58058
|
}
|
|
58070
|
-
function getIntersectionTypeFacts(type
|
|
58059
|
+
function getIntersectionTypeFacts(type) {
|
|
58060
|
+
var ignoreObjects = maybeTypeOfKind(type, 131068);
|
|
58071
58061
|
var oredFacts = 0;
|
|
58072
|
-
var andedFacts =
|
|
58062
|
+
var andedFacts = 134217727;
|
|
58073
58063
|
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
|
|
58074
58064
|
var t = _a[_i];
|
|
58075
|
-
|
|
58076
|
-
|
|
58077
|
-
|
|
58065
|
+
if (!(ignoreObjects && t.flags & 524288)) {
|
|
58066
|
+
var f = getTypeFacts(t);
|
|
58067
|
+
oredFacts |= f;
|
|
58068
|
+
andedFacts &= f;
|
|
58069
|
+
}
|
|
58078
58070
|
}
|
|
58079
|
-
return oredFacts & 8256 | andedFacts &
|
|
58071
|
+
return oredFacts & 8256 | andedFacts & 134209471;
|
|
58080
58072
|
}
|
|
58081
58073
|
function getTypeWithFacts(type, include) {
|
|
58082
58074
|
return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
|
|
58083
58075
|
}
|
|
58084
|
-
function
|
|
58076
|
+
function getAdjustedTypeWithFacts(type, facts) {
|
|
58085
58077
|
var reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 ? unknownUnionType : type, facts));
|
|
58086
58078
|
if (strictNullChecks) {
|
|
58087
58079
|
switch (facts) {
|
|
@@ -58339,8 +58331,8 @@ var ts;
|
|
|
58339
58331
|
var types = origin && origin.flags & 1048576 ? origin.types : type.types;
|
|
58340
58332
|
var mappedTypes;
|
|
58341
58333
|
var changed = false;
|
|
58342
|
-
for (var _i = 0,
|
|
58343
|
-
var t =
|
|
58334
|
+
for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
|
|
58335
|
+
var t = types_16[_i];
|
|
58344
58336
|
var mapped = t.flags & 1048576 ? mapType(t, mapper, noReductions) : mapper(t);
|
|
58345
58337
|
changed || (changed = t !== mapped);
|
|
58346
58338
|
if (mapped) {
|
|
@@ -58413,8 +58405,8 @@ var ts;
|
|
|
58413
58405
|
}
|
|
58414
58406
|
function isEvolvingArrayTypeList(types) {
|
|
58415
58407
|
var hasEvolvingArrayType = false;
|
|
58416
|
-
for (var _i = 0,
|
|
58417
|
-
var t =
|
|
58408
|
+
for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
|
|
58409
|
+
var t = types_17[_i];
|
|
58418
58410
|
if (!(t.flags & 131072)) {
|
|
58419
58411
|
if (!(ts.getObjectFlags(t) & 256)) {
|
|
58420
58412
|
return false;
|
|
@@ -59135,10 +59127,10 @@ var ts;
|
|
|
59135
59127
|
}
|
|
59136
59128
|
function narrowTypeByTruthiness(type, expr, assumeTrue) {
|
|
59137
59129
|
if (isMatchingReference(reference, expr)) {
|
|
59138
|
-
return
|
|
59130
|
+
return getAdjustedTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
|
|
59139
59131
|
}
|
|
59140
59132
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
|
|
59141
|
-
type =
|
|
59133
|
+
type = getAdjustedTypeWithFacts(type, 2097152);
|
|
59142
59134
|
}
|
|
59143
59135
|
var access = getDiscriminantPropertyAccess(expr, type);
|
|
59144
59136
|
if (access) {
|
|
@@ -59265,7 +59257,7 @@ var ts;
|
|
|
59265
59257
|
var valueType = getTypeOfExpression(value);
|
|
59266
59258
|
var removeNullable = equalsOperator !== assumeTrue && everyType(valueType, function (t) { return !!(t.flags & nullableFlags); }) ||
|
|
59267
59259
|
equalsOperator === assumeTrue && everyType(valueType, function (t) { return !(t.flags & (3 | nullableFlags)); });
|
|
59268
|
-
return removeNullable ?
|
|
59260
|
+
return removeNullable ? getAdjustedTypeWithFacts(type, 2097152) : type;
|
|
59269
59261
|
}
|
|
59270
59262
|
function narrowTypeByEquality(type, operator, value, assumeTrue) {
|
|
59271
59263
|
if (type.flags & 1) {
|
|
@@ -59294,7 +59286,7 @@ var ts;
|
|
|
59294
59286
|
valueType.flags & 65536 ?
|
|
59295
59287
|
assumeTrue ? 131072 : 1048576 :
|
|
59296
59288
|
assumeTrue ? 65536 : 524288;
|
|
59297
|
-
return
|
|
59289
|
+
return getAdjustedTypeWithFacts(type, facts);
|
|
59298
59290
|
}
|
|
59299
59291
|
if (assumeTrue) {
|
|
59300
59292
|
var filterFn = operator === 34 ?
|
|
@@ -59314,7 +59306,7 @@ var ts;
|
|
|
59314
59306
|
var target = getReferenceCandidate(typeOfExpr.expression);
|
|
59315
59307
|
if (!isMatchingReference(reference, target)) {
|
|
59316
59308
|
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) {
|
|
59317
|
-
return
|
|
59309
|
+
return getAdjustedTypeWithFacts(type, 2097152);
|
|
59318
59310
|
}
|
|
59319
59311
|
return type;
|
|
59320
59312
|
}
|
|
@@ -59464,7 +59456,7 @@ var ts;
|
|
|
59464
59456
|
var left = getReferenceCandidate(expr.left);
|
|
59465
59457
|
if (!isMatchingReference(reference, left)) {
|
|
59466
59458
|
if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) {
|
|
59467
|
-
return
|
|
59459
|
+
return getAdjustedTypeWithFacts(type, 2097152);
|
|
59468
59460
|
}
|
|
59469
59461
|
return type;
|
|
59470
59462
|
}
|
|
@@ -59540,7 +59532,7 @@ var ts;
|
|
|
59540
59532
|
}
|
|
59541
59533
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) &&
|
|
59542
59534
|
!(getTypeFacts(predicate.type) & 65536)) {
|
|
59543
|
-
type =
|
|
59535
|
+
type = getAdjustedTypeWithFacts(type, 2097152);
|
|
59544
59536
|
}
|
|
59545
59537
|
var access = getDiscriminantPropertyAccess(predicateArgument, type);
|
|
59546
59538
|
if (access) {
|
|
@@ -59591,7 +59583,7 @@ var ts;
|
|
|
59591
59583
|
}
|
|
59592
59584
|
function narrowTypeByOptionality(type, expr, assumePresent) {
|
|
59593
59585
|
if (isMatchingReference(reference, expr)) {
|
|
59594
|
-
return
|
|
59586
|
+
return getAdjustedTypeWithFacts(type, assumePresent ? 2097152 : 262144);
|
|
59595
59587
|
}
|
|
59596
59588
|
var access = getDiscriminantPropertyAccess(expr, type);
|
|
59597
59589
|
if (access) {
|
|
@@ -59666,8 +59658,8 @@ var ts;
|
|
|
59666
59658
|
var annotationIncludesUndefined = strictNullChecks &&
|
|
59667
59659
|
declaration.kind === 164 &&
|
|
59668
59660
|
declaration.initializer &&
|
|
59669
|
-
|
|
59670
|
-
!(
|
|
59661
|
+
getTypeFacts(declaredType) & 16777216 &&
|
|
59662
|
+
!(getTypeFacts(checkExpression(declaration.initializer)) & 16777216);
|
|
59671
59663
|
popTypeResolution();
|
|
59672
59664
|
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288) : declaredType;
|
|
59673
59665
|
}
|
|
@@ -59907,7 +59899,7 @@ var ts;
|
|
|
59907
59899
|
return convertAutoToAny(flowType);
|
|
59908
59900
|
}
|
|
59909
59901
|
}
|
|
59910
|
-
else if (!assumeInitialized && !(
|
|
59902
|
+
else if (!assumeInitialized && !(getTypeFacts(type) & 16777216) && getTypeFacts(flowType) & 16777216) {
|
|
59911
59903
|
error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
|
|
59912
59904
|
return type;
|
|
59913
59905
|
}
|
|
@@ -61185,8 +61177,8 @@ var ts;
|
|
|
61185
61177
|
}
|
|
61186
61178
|
var signatureList;
|
|
61187
61179
|
var types = type.types;
|
|
61188
|
-
for (var _i = 0,
|
|
61189
|
-
var current =
|
|
61180
|
+
for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
|
|
61181
|
+
var current = types_18[_i];
|
|
61190
61182
|
var signature = getContextualCallSignature(current, node);
|
|
61191
61183
|
if (signature) {
|
|
61192
61184
|
if (!signatureList) {
|
|
@@ -62149,19 +62141,19 @@ var ts;
|
|
|
62149
62141
|
return checkNonNullType(checkExpression(node), node);
|
|
62150
62142
|
}
|
|
62151
62143
|
function isNullableType(type) {
|
|
62152
|
-
return !!((
|
|
62144
|
+
return !!(getTypeFacts(type) & 50331648);
|
|
62153
62145
|
}
|
|
62154
62146
|
function getNonNullableTypeIfNeeded(type) {
|
|
62155
62147
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
62156
62148
|
}
|
|
62157
|
-
function reportObjectPossiblyNullOrUndefinedError(node,
|
|
62158
|
-
error(node,
|
|
62149
|
+
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
62150
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
62159
62151
|
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
62160
62152
|
ts.Diagnostics.Object_is_possibly_undefined :
|
|
62161
62153
|
ts.Diagnostics.Object_is_possibly_null);
|
|
62162
62154
|
}
|
|
62163
|
-
function reportCannotInvokePossiblyNullOrUndefinedError(node,
|
|
62164
|
-
error(node,
|
|
62155
|
+
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
62156
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
62165
62157
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined :
|
|
62166
62158
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined :
|
|
62167
62159
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null);
|
|
@@ -62171,9 +62163,9 @@ var ts;
|
|
|
62171
62163
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
62172
62164
|
return errorType;
|
|
62173
62165
|
}
|
|
62174
|
-
var
|
|
62175
|
-
if (
|
|
62176
|
-
reportError(node,
|
|
62166
|
+
var facts = getTypeFacts(type);
|
|
62167
|
+
if (facts & 50331648) {
|
|
62168
|
+
reportError(node, facts);
|
|
62177
62169
|
var t = getNonNullableType(type);
|
|
62178
62170
|
return t.flags & (98304 | 131072) ? errorType : t;
|
|
62179
62171
|
}
|
|
@@ -62439,7 +62431,7 @@ var ts;
|
|
|
62439
62431
|
assumeUninitialized = true;
|
|
62440
62432
|
}
|
|
62441
62433
|
var flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType);
|
|
62442
|
-
if (assumeUninitialized && !(
|
|
62434
|
+
if (assumeUninitialized && !(getTypeFacts(propType) & 16777216) && getTypeFacts(flowType) & 16777216) {
|
|
62443
62435
|
error(errorNode, ts.Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop));
|
|
62444
62436
|
return propType;
|
|
62445
62437
|
}
|
|
@@ -64043,8 +64035,8 @@ var ts;
|
|
|
64043
64035
|
if (apparentType.flags & 1048576) {
|
|
64044
64036
|
var types = apparentType.types;
|
|
64045
64037
|
var hasSignatures = false;
|
|
64046
|
-
for (var _i = 0,
|
|
64047
|
-
var constituent =
|
|
64038
|
+
for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
|
|
64039
|
+
var constituent = types_19[_i];
|
|
64048
64040
|
var signatures = getSignaturesOfType(constituent, kind);
|
|
64049
64041
|
if (signatures.length !== 0) {
|
|
64050
64042
|
hasSignatures = true;
|
|
@@ -65552,7 +65544,7 @@ var ts;
|
|
|
65552
65544
|
var type = getTypeOfSymbol(symbol);
|
|
65553
65545
|
if (strictNullChecks &&
|
|
65554
65546
|
!(type.flags & (3 | 131072)) &&
|
|
65555
|
-
!(exactOptionalPropertyTypes ? symbol.flags & 16777216 :
|
|
65547
|
+
!(exactOptionalPropertyTypes ? symbol.flags & 16777216 : getTypeFacts(type) & 16777216)) {
|
|
65556
65548
|
error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
|
|
65557
65549
|
}
|
|
65558
65550
|
}
|
|
@@ -65711,8 +65703,8 @@ var ts;
|
|
|
65711
65703
|
}
|
|
65712
65704
|
if (type.flags & 3145728) {
|
|
65713
65705
|
var types = type.types;
|
|
65714
|
-
for (var _i = 0,
|
|
65715
|
-
var t =
|
|
65706
|
+
for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
|
|
65707
|
+
var t = types_20[_i];
|
|
65716
65708
|
if (maybeTypeOfKind(t, kind)) {
|
|
65717
65709
|
return true;
|
|
65718
65710
|
}
|
|
@@ -65902,7 +65894,7 @@ var ts;
|
|
|
65902
65894
|
var prop = exprOrAssignment;
|
|
65903
65895
|
if (prop.objectAssignmentInitializer) {
|
|
65904
65896
|
if (strictNullChecks &&
|
|
65905
|
-
!(
|
|
65897
|
+
!(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216)) {
|
|
65906
65898
|
sourceType = getTypeWithFacts(sourceType, 524288);
|
|
65907
65899
|
}
|
|
65908
65900
|
checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
|
|
@@ -66267,7 +66259,7 @@ var ts;
|
|
|
66267
66259
|
case 56:
|
|
66268
66260
|
case 75: {
|
|
66269
66261
|
var resultType_3 = getTypeFacts(leftType) & 8388608 ?
|
|
66270
|
-
getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], 2) :
|
|
66262
|
+
getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2) :
|
|
66271
66263
|
leftType;
|
|
66272
66264
|
if (operator === 75) {
|
|
66273
66265
|
checkAssignmentOperator(rightType);
|
|
@@ -68429,8 +68421,8 @@ var ts;
|
|
|
68429
68421
|
}
|
|
68430
68422
|
function getEntityNameForDecoratorMetadataFromTypeList(types) {
|
|
68431
68423
|
var commonEntityName;
|
|
68432
|
-
for (var _i = 0,
|
|
68433
|
-
var typeNode =
|
|
68424
|
+
for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
|
|
68425
|
+
var typeNode = types_21[_i];
|
|
68434
68426
|
while (typeNode.kind === 191 || typeNode.kind === 197) {
|
|
68435
68427
|
typeNode = typeNode.type;
|
|
68436
68428
|
}
|
|
@@ -69180,7 +69172,7 @@ var ts;
|
|
|
69180
69172
|
}
|
|
69181
69173
|
if (ts.isBindingPattern(node.name)) {
|
|
69182
69174
|
var needCheckInitializer = node.initializer && node.parent.parent.kind !== 243;
|
|
69183
|
-
var needCheckWidenedType = node.name.elements.
|
|
69175
|
+
var needCheckWidenedType = !ts.some(node.name.elements, ts.not(ts.isOmittedExpression));
|
|
69184
69176
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
69185
69177
|
var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
69186
69178
|
if (needCheckInitializer) {
|
|
@@ -69321,7 +69313,7 @@ var ts;
|
|
|
69321
69313
|
return;
|
|
69322
69314
|
var type = checkTruthinessExpression(location);
|
|
69323
69315
|
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
|
|
69324
|
-
if (
|
|
69316
|
+
if (!(getTypeFacts(type) & 4194304) || isPropertyExpressionCast)
|
|
69325
69317
|
return;
|
|
69326
69318
|
var callSignatures = getSignaturesOfType(type, 0);
|
|
69327
69319
|
var isPromise = !!getAwaitedTypeOfPromise(type);
|
|
@@ -70675,17 +70667,16 @@ var ts;
|
|
|
70675
70667
|
});
|
|
70676
70668
|
}
|
|
70677
70669
|
function checkKindsOfPropertyMemberOverrides(type, baseType) {
|
|
70678
|
-
var _a, _b;
|
|
70670
|
+
var _a, _b, _c, _d;
|
|
70679
70671
|
var baseProperties = getPropertiesOfType(baseType);
|
|
70680
|
-
|
|
70681
|
-
var baseProperty = baseProperties_1[_i];
|
|
70672
|
+
var _loop_33 = function (baseProperty) {
|
|
70682
70673
|
var base = getTargetSymbol(baseProperty);
|
|
70683
70674
|
if (base.flags & 4194304) {
|
|
70684
|
-
continue;
|
|
70675
|
+
return "continue";
|
|
70685
70676
|
}
|
|
70686
70677
|
var baseSymbol = getPropertyOfObjectType(type, base.escapedName);
|
|
70687
70678
|
if (!baseSymbol) {
|
|
70688
|
-
continue;
|
|
70679
|
+
return "continue";
|
|
70689
70680
|
}
|
|
70690
70681
|
var derived = getTargetSymbol(baseSymbol);
|
|
70691
70682
|
var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
|
|
@@ -70693,14 +70684,14 @@ var ts;
|
|
|
70693
70684
|
if (derived === base) {
|
|
70694
70685
|
var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol);
|
|
70695
70686
|
if (baseDeclarationFlags & 128 && (!derivedClassDecl || !ts.hasSyntacticModifier(derivedClassDecl, 128))) {
|
|
70696
|
-
for (var
|
|
70697
|
-
var otherBaseType =
|
|
70687
|
+
for (var _e = 0, _f = getBaseTypes(type); _e < _f.length; _e++) {
|
|
70688
|
+
var otherBaseType = _f[_e];
|
|
70698
70689
|
if (otherBaseType === baseType)
|
|
70699
70690
|
continue;
|
|
70700
70691
|
var baseSymbol_1 = getPropertyOfObjectType(otherBaseType, base.escapedName);
|
|
70701
70692
|
var derivedElsewhere = baseSymbol_1 && getTargetSymbol(baseSymbol_1);
|
|
70702
70693
|
if (derivedElsewhere && derivedElsewhere !== base) {
|
|
70703
|
-
continue
|
|
70694
|
+
return "continue-basePropertyCheck";
|
|
70704
70695
|
}
|
|
70705
70696
|
}
|
|
70706
70697
|
if (derivedClassDecl.kind === 226) {
|
|
@@ -70714,16 +70705,18 @@ var ts;
|
|
|
70714
70705
|
else {
|
|
70715
70706
|
var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
|
|
70716
70707
|
if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
|
|
70717
|
-
continue;
|
|
70708
|
+
return "continue";
|
|
70718
70709
|
}
|
|
70719
70710
|
var errorMessage = void 0;
|
|
70720
70711
|
var basePropertyFlags = base.flags & 98308;
|
|
70721
70712
|
var derivedPropertyFlags = derived.flags & 98308;
|
|
70722
70713
|
if (basePropertyFlags && derivedPropertyFlags) {
|
|
70723
|
-
if (
|
|
70724
|
-
|
|
70714
|
+
if ((ts.getCheckFlags(base) & 6
|
|
70715
|
+
? (_a = base.declarations) === null || _a === void 0 ? void 0 : _a.some(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); })
|
|
70716
|
+
: (_b = base.declarations) === null || _b === void 0 ? void 0 : _b.every(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); }))
|
|
70717
|
+
|| ts.getCheckFlags(base) & 262144
|
|
70725
70718
|
|| derived.valueDeclaration && ts.isBinaryExpression(derived.valueDeclaration)) {
|
|
70726
|
-
continue;
|
|
70719
|
+
return "continue";
|
|
70727
70720
|
}
|
|
70728
70721
|
var overriddenInstanceProperty = basePropertyFlags !== 4 && derivedPropertyFlags === 4;
|
|
70729
70722
|
var overriddenInstanceAccessor = basePropertyFlags === 4 && derivedPropertyFlags !== 4;
|
|
@@ -70734,12 +70727,12 @@ var ts;
|
|
|
70734
70727
|
error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type));
|
|
70735
70728
|
}
|
|
70736
70729
|
else if (useDefineForClassFields) {
|
|
70737
|
-
var uninitialized = (
|
|
70730
|
+
var uninitialized = (_c = derived.declarations) === null || _c === void 0 ? void 0 : _c.find(function (d) { return d.kind === 167 && !d.initializer; });
|
|
70738
70731
|
if (uninitialized
|
|
70739
70732
|
&& !(derived.flags & 33554432)
|
|
70740
70733
|
&& !(baseDeclarationFlags & 128)
|
|
70741
70734
|
&& !(derivedDeclarationFlags & 128)
|
|
70742
|
-
&& !((
|
|
70735
|
+
&& !((_d = derived.declarations) === null || _d === void 0 ? void 0 : _d.some(function (d) { return !!(d.flags & 16777216); }))) {
|
|
70743
70736
|
var constructor = findConstructorDeclaration(ts.getClassLikeDeclarationOfSymbol(type.symbol));
|
|
70744
70737
|
var propName = uninitialized.name;
|
|
70745
70738
|
if (uninitialized.exclamationToken
|
|
@@ -70752,11 +70745,11 @@ var ts;
|
|
|
70752
70745
|
}
|
|
70753
70746
|
}
|
|
70754
70747
|
}
|
|
70755
|
-
continue;
|
|
70748
|
+
return "continue";
|
|
70756
70749
|
}
|
|
70757
70750
|
else if (isPrototypeProperty(base)) {
|
|
70758
70751
|
if (isPrototypeProperty(derived) || derived.flags & 4) {
|
|
70759
|
-
continue;
|
|
70752
|
+
return "continue";
|
|
70760
70753
|
}
|
|
70761
70754
|
else {
|
|
70762
70755
|
ts.Debug.assert(!!(derived.flags & 98304));
|
|
@@ -70771,9 +70764,20 @@ var ts;
|
|
|
70771
70764
|
}
|
|
70772
70765
|
error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
|
|
70773
70766
|
}
|
|
70767
|
+
};
|
|
70768
|
+
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
70769
|
+
var baseProperty = baseProperties_1[_i];
|
|
70770
|
+
var state_10 = _loop_33(baseProperty);
|
|
70771
|
+
switch (state_10) {
|
|
70772
|
+
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
70773
|
+
}
|
|
70774
70774
|
}
|
|
70775
70775
|
}
|
|
70776
|
-
function
|
|
70776
|
+
function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
|
|
70777
|
+
return baseDeclarationFlags & 128 && (!ts.isPropertyDeclaration(declaration) || !declaration.initializer)
|
|
70778
|
+
|| ts.isInterfaceDeclaration(declaration.parent);
|
|
70779
|
+
}
|
|
70780
|
+
function getNonInheritedProperties(type, baseTypes, properties) {
|
|
70777
70781
|
if (!ts.length(baseTypes)) {
|
|
70778
70782
|
return properties;
|
|
70779
70783
|
}
|
|
@@ -70842,7 +70846,7 @@ var ts;
|
|
|
70842
70846
|
var propName = member.name;
|
|
70843
70847
|
if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName) || ts.isComputedPropertyName(propName)) {
|
|
70844
70848
|
var type = getTypeOfSymbol(getSymbolOfNode(member));
|
|
70845
|
-
if (!(type.flags & 3 ||
|
|
70849
|
+
if (!(type.flags & 3 || getTypeFacts(type) & 16777216)) {
|
|
70846
70850
|
if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {
|
|
70847
70851
|
error(member.name, ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, ts.declarationNameToString(propName));
|
|
70848
70852
|
}
|
|
@@ -70866,7 +70870,7 @@ var ts;
|
|
|
70866
70870
|
ts.setParent(reference, staticBlock);
|
|
70867
70871
|
reference.flowNode = staticBlock.returnFlowNode;
|
|
70868
70872
|
var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
|
|
70869
|
-
if (!(
|
|
70873
|
+
if (!(getTypeFacts(flowType) & 16777216)) {
|
|
70870
70874
|
return true;
|
|
70871
70875
|
}
|
|
70872
70876
|
}
|
|
@@ -70881,7 +70885,7 @@ var ts;
|
|
|
70881
70885
|
ts.setParent(reference, constructor);
|
|
70882
70886
|
reference.flowNode = constructor.returnFlowNode;
|
|
70883
70887
|
var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
|
|
70884
|
-
return !(
|
|
70888
|
+
return !(getTypeFacts(flowType) & 16777216);
|
|
70885
70889
|
}
|
|
70886
70890
|
function checkInterfaceDeclaration(node) {
|
|
70887
70891
|
if (!checkGrammarDecoratorsAndModifiers(node))
|
|
@@ -77902,8 +77906,8 @@ var ts;
|
|
|
77902
77906
|
}
|
|
77903
77907
|
function serializeTypeList(types) {
|
|
77904
77908
|
var serializedUnion;
|
|
77905
|
-
for (var _i = 0,
|
|
77906
|
-
var typeNode =
|
|
77909
|
+
for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
|
|
77910
|
+
var typeNode = types_22[_i];
|
|
77907
77911
|
while (typeNode.kind === 191) {
|
|
77908
77912
|
typeNode = typeNode.type;
|
|
77909
77913
|
}
|
|
@@ -93528,8 +93532,8 @@ var ts;
|
|
|
93528
93532
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
93529
93533
|
writeLine();
|
|
93530
93534
|
}
|
|
93531
|
-
for (var _d = 0,
|
|
93532
|
-
var directive =
|
|
93535
|
+
for (var _d = 0, types_23 = types; _d < types_23.length; _d++) {
|
|
93536
|
+
var directive = types_23[_d];
|
|
93533
93537
|
var pos = writer.getTextPos();
|
|
93534
93538
|
var resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile === null || currentSourceFile === void 0 ? void 0 : currentSourceFile.impliedNodeFormat)
|
|
93535
93539
|
? "resolution-mode=\"" + (directive.resolutionMode === ts.ModuleKind.ESNext ? "import" : "require") + "\""
|
|
@@ -101122,7 +101126,7 @@ var ts;
|
|
|
101122
101126
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
101123
101127
|
});
|
|
101124
101128
|
var sortedPaths = [];
|
|
101125
|
-
var
|
|
101129
|
+
var _loop_34 = function (directory) {
|
|
101126
101130
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
101127
101131
|
var pathsInDirectory;
|
|
101128
101132
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -101146,9 +101150,9 @@ var ts;
|
|
|
101146
101150
|
};
|
|
101147
101151
|
var out_directory_1;
|
|
101148
101152
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
101149
|
-
var
|
|
101153
|
+
var state_11 = _loop_34(directory);
|
|
101150
101154
|
directory = out_directory_1;
|
|
101151
|
-
if (
|
|
101155
|
+
if (state_11 === "break")
|
|
101152
101156
|
break;
|
|
101153
101157
|
}
|
|
101154
101158
|
if (allFileNames.size) {
|