@typescript-deploys/pr-build 5.4.0-pr-56875-6 → 5.4.0-pr-56895-10
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/lib.dom.asynciterable.d.ts +28 -0
- package/lib/lib.es2018.full.d.ts +1 -0
- package/lib/lib.es2019.full.d.ts +1 -0
- package/lib/lib.es2020.full.d.ts +1 -0
- package/lib/lib.es2021.full.d.ts +1 -0
- package/lib/lib.es2022.full.d.ts +1 -0
- package/lib/lib.es2023.full.d.ts +1 -0
- package/lib/lib.esnext.full.d.ts +1 -0
- package/lib/lib.webworker.asynciterable.d.ts +28 -0
- package/lib/tsc.js +24 -50
- package/lib/tsserver.js +42 -62
- package/lib/typescript.js +42 -62
- package/lib/typingsInstaller.js +3 -1
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/////////////////////////////
|
|
20
|
+
/// Window Async Iterable APIs
|
|
21
|
+
/////////////////////////////
|
|
22
|
+
|
|
23
|
+
interface FileSystemDirectoryHandle {
|
|
24
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
25
|
+
entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
26
|
+
keys(): AsyncIterableIterator<string>;
|
|
27
|
+
values(): AsyncIterableIterator<FileSystemHandle>;
|
|
28
|
+
}
|
package/lib/lib.es2018.full.d.ts
CHANGED
package/lib/lib.es2019.full.d.ts
CHANGED
package/lib/lib.es2020.full.d.ts
CHANGED
package/lib/lib.es2021.full.d.ts
CHANGED
package/lib/lib.es2022.full.d.ts
CHANGED
package/lib/lib.es2023.full.d.ts
CHANGED
package/lib/lib.esnext.full.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/////////////////////////////
|
|
20
|
+
/// Worker Async Iterable APIs
|
|
21
|
+
/////////////////////////////
|
|
22
|
+
|
|
23
|
+
interface FileSystemDirectoryHandle {
|
|
24
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
25
|
+
entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
26
|
+
keys(): AsyncIterableIterator<string>;
|
|
27
|
+
values(): AsyncIterableIterator<FileSystemHandle>;
|
|
28
|
+
}
|
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -34003,9 +34003,11 @@ var libEntries = [
|
|
|
34003
34003
|
// Host only
|
|
34004
34004
|
["dom", "lib.dom.d.ts"],
|
|
34005
34005
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
34006
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
34006
34007
|
["webworker", "lib.webworker.d.ts"],
|
|
34007
34008
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
34008
34009
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
34010
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
34009
34011
|
["scripthost", "lib.scripthost.d.ts"],
|
|
34010
34012
|
// ES2015 Or ESNext By-feature options
|
|
34011
34013
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -44094,6 +44096,7 @@ function createTypeChecker(host) {
|
|
|
44094
44096
|
);
|
|
44095
44097
|
var errorType = createIntrinsicType(1 /* Any */, "error");
|
|
44096
44098
|
var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
|
|
44099
|
+
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
44097
44100
|
var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
|
|
44098
44101
|
var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
44099
44102
|
var nonNullUnknownType = createIntrinsicType(
|
|
@@ -44103,7 +44106,6 @@ function createTypeChecker(host) {
|
|
|
44103
44106
|
void 0,
|
|
44104
44107
|
"non-null"
|
|
44105
44108
|
);
|
|
44106
|
-
var nonInferrableUnknownType = createIntrinsicType(2 /* Unknown */, "unknown", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
44107
44109
|
var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
44108
44110
|
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
|
|
44109
44111
|
var missingType = createIntrinsicType(
|
|
@@ -52654,7 +52656,7 @@ function createTypeChecker(host) {
|
|
|
52654
52656
|
if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {
|
|
52655
52657
|
reportImplicitAny(element, anyType);
|
|
52656
52658
|
}
|
|
52657
|
-
return includePatternInType ?
|
|
52659
|
+
return includePatternInType ? nonInferrableAnyType : anyType;
|
|
52658
52660
|
}
|
|
52659
52661
|
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) {
|
|
52660
52662
|
const members = createSymbolTable();
|
|
@@ -53077,7 +53079,7 @@ function createTypeChecker(host) {
|
|
|
53077
53079
|
if (!links.writeType && links.deferralWriteConstituents) {
|
|
53078
53080
|
Debug.assertIsDefined(links.deferralParent);
|
|
53079
53081
|
Debug.assertIsDefined(links.deferralConstituents);
|
|
53080
|
-
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ?
|
|
53082
|
+
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ? getIntersectionType(links.deferralWriteConstituents) : getUnionType(links.deferralWriteConstituents);
|
|
53081
53083
|
}
|
|
53082
53084
|
return links.writeType;
|
|
53083
53085
|
}
|
|
@@ -55299,7 +55301,7 @@ function createTypeChecker(host) {
|
|
|
55299
55301
|
} else {
|
|
55300
55302
|
result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
55301
55303
|
if (writeTypes) {
|
|
55302
|
-
result.links.writeType = isUnion ?
|
|
55304
|
+
result.links.writeType = isUnion ? getIntersectionType(writeTypes) : getUnionType(writeTypes);
|
|
55303
55305
|
}
|
|
55304
55306
|
}
|
|
55305
55307
|
return result;
|
|
@@ -59053,6 +59055,12 @@ function createTypeChecker(host) {
|
|
|
59053
59055
|
return type;
|
|
59054
59056
|
}
|
|
59055
59057
|
function getESSymbolLikeTypeForNode(node) {
|
|
59058
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
59059
|
+
const host2 = getJSDocHost(node);
|
|
59060
|
+
if (host2) {
|
|
59061
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
59062
|
+
}
|
|
59063
|
+
}
|
|
59056
59064
|
if (isValidESSymbolDeclaration(node)) {
|
|
59057
59065
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
59058
59066
|
if (symbol) {
|
|
@@ -60660,7 +60668,7 @@ function createTypeChecker(host) {
|
|
|
60660
60668
|
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
|
|
60661
60669
|
const s = source.flags;
|
|
60662
60670
|
const t = target.flags;
|
|
60663
|
-
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType
|
|
60671
|
+
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType)
|
|
60664
60672
|
return true;
|
|
60665
60673
|
if (t & 2 /* Unknown */ && !(relation === strictSubtypeRelation && s & 1 /* Any */))
|
|
60666
60674
|
return true;
|
|
@@ -61997,7 +62005,7 @@ function createTypeChecker(host) {
|
|
|
61997
62005
|
}
|
|
61998
62006
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
61999
62007
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
62000
|
-
if (constraint
|
|
62008
|
+
if (constraint) {
|
|
62001
62009
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
62002
62010
|
if (result2 = isRelatedTo(
|
|
62003
62011
|
constraint,
|
|
@@ -63910,9 +63918,6 @@ function createTypeChecker(host) {
|
|
|
63910
63918
|
result = anyType;
|
|
63911
63919
|
} else if (isObjectLiteralType(type)) {
|
|
63912
63920
|
result = getWidenedTypeOfObjectLiteral(type, context);
|
|
63913
|
-
if (type.pattern) {
|
|
63914
|
-
result.pattern = type.pattern;
|
|
63915
|
-
}
|
|
63916
63921
|
} else if (type.flags & 1048576 /* Union */) {
|
|
63917
63922
|
const unionContext = context || createWideningContext(
|
|
63918
63923
|
/*parent*/
|
|
@@ -63927,9 +63932,6 @@ function createTypeChecker(host) {
|
|
|
63927
63932
|
result = getIntersectionType(sameMap(type.types, getWidenedType));
|
|
63928
63933
|
} else if (isArrayOrTupleType(type)) {
|
|
63929
63934
|
result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType));
|
|
63930
|
-
if (type.pattern) {
|
|
63931
|
-
result.pattern = type.pattern;
|
|
63932
|
-
}
|
|
63933
63935
|
}
|
|
63934
63936
|
if (result && context === void 0) {
|
|
63935
63937
|
type.widened = result;
|
|
@@ -64263,22 +64265,12 @@ function createTypeChecker(host) {
|
|
|
64263
64265
|
return void 0;
|
|
64264
64266
|
}
|
|
64265
64267
|
if (isArrayType(source)) {
|
|
64266
|
-
|
|
64267
|
-
if (source.pattern) {
|
|
64268
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
64269
|
-
reversed2.pattern = source.pattern;
|
|
64270
|
-
}
|
|
64271
|
-
return reversed2;
|
|
64268
|
+
return createArrayType(inferReverseMappedType(getTypeArguments(source)[0], target, constraint), isReadonlyArrayType(source));
|
|
64272
64269
|
}
|
|
64273
64270
|
if (isTupleType(source)) {
|
|
64274
64271
|
const elementTypes = map(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint));
|
|
64275
64272
|
const elementFlags = getMappedTypeModifiers(target) & 4 /* IncludeOptional */ ? sameMap(source.target.elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : source.target.elementFlags;
|
|
64276
|
-
|
|
64277
|
-
if (source.pattern) {
|
|
64278
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
64279
|
-
reversed2.pattern = source.pattern;
|
|
64280
|
-
}
|
|
64281
|
-
return reversed2;
|
|
64273
|
+
return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);
|
|
64282
64274
|
}
|
|
64283
64275
|
const reversed = createObjectType(
|
|
64284
64276
|
1024 /* ReverseMapped */ | 16 /* Anonymous */,
|
|
@@ -64288,9 +64280,6 @@ function createTypeChecker(host) {
|
|
|
64288
64280
|
reversed.source = source;
|
|
64289
64281
|
reversed.mappedType = target;
|
|
64290
64282
|
reversed.constraintType = constraint;
|
|
64291
|
-
if (source.pattern) {
|
|
64292
|
-
reversed.pattern = source.pattern;
|
|
64293
|
-
}
|
|
64294
64283
|
return reversed;
|
|
64295
64284
|
}
|
|
64296
64285
|
function getTypeOfReverseMappedSymbol(symbol) {
|
|
@@ -64305,7 +64294,7 @@ function createTypeChecker(host) {
|
|
|
64305
64294
|
const templateType = getTemplateTypeFromMappedType(target);
|
|
64306
64295
|
const inference = createInferenceInfo(typeParameter);
|
|
64307
64296
|
inferTypes([inference], sourceType, templateType);
|
|
64308
|
-
return getTypeFromInference(inference) ||
|
|
64297
|
+
return getTypeFromInference(inference) || unknownType;
|
|
64309
64298
|
}
|
|
64310
64299
|
function* getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) {
|
|
64311
64300
|
const properties = getPropertiesOfType(target);
|
|
@@ -64333,7 +64322,7 @@ function createTypeChecker(host) {
|
|
|
64333
64322
|
return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties));
|
|
64334
64323
|
}
|
|
64335
64324
|
function tupleTypesDefinitelyUnrelated(source, target) {
|
|
64336
|
-
return !
|
|
64325
|
+
return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength);
|
|
64337
64326
|
}
|
|
64338
64327
|
function typesDefinitelyUnrelated(source, target) {
|
|
64339
64328
|
return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty(
|
|
@@ -64552,7 +64541,7 @@ function createTypeChecker(host) {
|
|
|
64552
64541
|
}
|
|
64553
64542
|
const inference = getInferenceInfoForType(target);
|
|
64554
64543
|
if (inference) {
|
|
64555
|
-
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source ===
|
|
64544
|
+
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
|
|
64556
64545
|
return;
|
|
64557
64546
|
}
|
|
64558
64547
|
if (!inference.isFixed) {
|
|
@@ -65114,16 +65103,12 @@ function createTypeChecker(host) {
|
|
|
65114
65103
|
function getInferredType(context, index) {
|
|
65115
65104
|
const inference = context.inferences[index];
|
|
65116
65105
|
if (!inference.inferredType) {
|
|
65117
|
-
let isFromBindingPattern = false;
|
|
65118
65106
|
let inferredType;
|
|
65119
65107
|
let fallbackType;
|
|
65120
65108
|
if (context.signature) {
|
|
65121
65109
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
65122
65110
|
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
65123
|
-
if (inferredCovariantType
|
|
65124
|
-
isFromBindingPattern = true;
|
|
65125
|
-
inferredType = inferredCovariantType;
|
|
65126
|
-
} else if (inferredCovariantType || inferredContravariantType) {
|
|
65111
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
65127
65112
|
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
65128
65113
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
65129
65114
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
@@ -65142,9 +65127,7 @@ function createTypeChecker(host) {
|
|
|
65142
65127
|
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
|
|
65143
65128
|
if (constraint) {
|
|
65144
65129
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
65145
|
-
if (
|
|
65146
|
-
inference.inferredType = getIntersectionType([inference.inferredType, instantiatedConstraint]);
|
|
65147
|
-
} else if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
65130
|
+
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
65148
65131
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
65149
65132
|
}
|
|
65150
65133
|
}
|
|
@@ -68471,16 +68454,7 @@ function createTypeChecker(host) {
|
|
|
68471
68454
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
68472
68455
|
const prop = getPropertyOfType(t, name);
|
|
68473
68456
|
if (prop) {
|
|
68474
|
-
|
|
68475
|
-
return void 0;
|
|
68476
|
-
}
|
|
68477
|
-
const type2 = getTypeOfSymbol(prop);
|
|
68478
|
-
if (type2 !== nonInferrableUnknownType) {
|
|
68479
|
-
return removeMissingType(type2, !!(prop && prop.flags & 16777216 /* Optional */));
|
|
68480
|
-
}
|
|
68481
|
-
if (t.flags & 2097152 /* Intersection */) {
|
|
68482
|
-
t = getIntersectionType(t.types.filter((t2) => !t2.pattern));
|
|
68483
|
-
}
|
|
68457
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */));
|
|
68484
68458
|
}
|
|
68485
68459
|
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
68486
68460
|
const restType = getElementTypeOfSliceOfTupleType(
|
|
@@ -69330,7 +69304,7 @@ function createTypeChecker(host) {
|
|
|
69330
69304
|
/*contextFlags*/
|
|
69331
69305
|
void 0
|
|
69332
69306
|
);
|
|
69333
|
-
const contextualTypeHasPattern =
|
|
69307
|
+
const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */);
|
|
69334
69308
|
const inConstContext = isConstContext(node);
|
|
69335
69309
|
const checkFlags = inConstContext ? 8 /* Readonly */ : 0;
|
|
69336
69310
|
const isInJavascript = isInJSFile(node) && !isInJsonFile(node);
|
package/lib/tsserver.js
CHANGED
|
@@ -2339,7 +2339,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2339
2339
|
|
|
2340
2340
|
// src/compiler/corePublic.ts
|
|
2341
2341
|
var versionMajorMinor = "5.4";
|
|
2342
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2342
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
2343
2343
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2344
2344
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2345
2345
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -38422,9 +38422,11 @@ var libEntries = [
|
|
|
38422
38422
|
// Host only
|
|
38423
38423
|
["dom", "lib.dom.d.ts"],
|
|
38424
38424
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
38425
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
38425
38426
|
["webworker", "lib.webworker.d.ts"],
|
|
38426
38427
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
38427
38428
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
38429
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
38428
38430
|
["scripthost", "lib.scripthost.d.ts"],
|
|
38429
38431
|
// ES2015 Or ESNext By-feature options
|
|
38430
38432
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -48813,6 +48815,7 @@ function createTypeChecker(host) {
|
|
|
48813
48815
|
);
|
|
48814
48816
|
var errorType = createIntrinsicType(1 /* Any */, "error");
|
|
48815
48817
|
var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
|
|
48818
|
+
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
48816
48819
|
var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
|
|
48817
48820
|
var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
48818
48821
|
var nonNullUnknownType = createIntrinsicType(
|
|
@@ -48822,7 +48825,6 @@ function createTypeChecker(host) {
|
|
|
48822
48825
|
void 0,
|
|
48823
48826
|
"non-null"
|
|
48824
48827
|
);
|
|
48825
|
-
var nonInferrableUnknownType = createIntrinsicType(2 /* Unknown */, "unknown", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
48826
48828
|
var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
48827
48829
|
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
|
|
48828
48830
|
var missingType = createIntrinsicType(
|
|
@@ -57373,7 +57375,7 @@ function createTypeChecker(host) {
|
|
|
57373
57375
|
if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {
|
|
57374
57376
|
reportImplicitAny(element, anyType);
|
|
57375
57377
|
}
|
|
57376
|
-
return includePatternInType ?
|
|
57378
|
+
return includePatternInType ? nonInferrableAnyType : anyType;
|
|
57377
57379
|
}
|
|
57378
57380
|
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) {
|
|
57379
57381
|
const members = createSymbolTable();
|
|
@@ -57796,7 +57798,7 @@ function createTypeChecker(host) {
|
|
|
57796
57798
|
if (!links.writeType && links.deferralWriteConstituents) {
|
|
57797
57799
|
Debug.assertIsDefined(links.deferralParent);
|
|
57798
57800
|
Debug.assertIsDefined(links.deferralConstituents);
|
|
57799
|
-
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ?
|
|
57801
|
+
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ? getIntersectionType(links.deferralWriteConstituents) : getUnionType(links.deferralWriteConstituents);
|
|
57800
57802
|
}
|
|
57801
57803
|
return links.writeType;
|
|
57802
57804
|
}
|
|
@@ -60018,7 +60020,7 @@ function createTypeChecker(host) {
|
|
|
60018
60020
|
} else {
|
|
60019
60021
|
result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
60020
60022
|
if (writeTypes) {
|
|
60021
|
-
result.links.writeType = isUnion ?
|
|
60023
|
+
result.links.writeType = isUnion ? getIntersectionType(writeTypes) : getUnionType(writeTypes);
|
|
60022
60024
|
}
|
|
60023
60025
|
}
|
|
60024
60026
|
return result;
|
|
@@ -63772,6 +63774,12 @@ function createTypeChecker(host) {
|
|
|
63772
63774
|
return type;
|
|
63773
63775
|
}
|
|
63774
63776
|
function getESSymbolLikeTypeForNode(node) {
|
|
63777
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
63778
|
+
const host2 = getJSDocHost(node);
|
|
63779
|
+
if (host2) {
|
|
63780
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
63781
|
+
}
|
|
63782
|
+
}
|
|
63775
63783
|
if (isValidESSymbolDeclaration(node)) {
|
|
63776
63784
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
63777
63785
|
if (symbol) {
|
|
@@ -65379,7 +65387,7 @@ function createTypeChecker(host) {
|
|
|
65379
65387
|
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
|
|
65380
65388
|
const s = source.flags;
|
|
65381
65389
|
const t = target.flags;
|
|
65382
|
-
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType
|
|
65390
|
+
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType)
|
|
65383
65391
|
return true;
|
|
65384
65392
|
if (t & 2 /* Unknown */ && !(relation === strictSubtypeRelation && s & 1 /* Any */))
|
|
65385
65393
|
return true;
|
|
@@ -66716,7 +66724,7 @@ function createTypeChecker(host) {
|
|
|
66716
66724
|
}
|
|
66717
66725
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
66718
66726
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
66719
|
-
if (constraint
|
|
66727
|
+
if (constraint) {
|
|
66720
66728
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
66721
66729
|
if (result2 = isRelatedTo(
|
|
66722
66730
|
constraint,
|
|
@@ -68629,9 +68637,6 @@ function createTypeChecker(host) {
|
|
|
68629
68637
|
result = anyType;
|
|
68630
68638
|
} else if (isObjectLiteralType2(type)) {
|
|
68631
68639
|
result = getWidenedTypeOfObjectLiteral(type, context);
|
|
68632
|
-
if (type.pattern) {
|
|
68633
|
-
result.pattern = type.pattern;
|
|
68634
|
-
}
|
|
68635
68640
|
} else if (type.flags & 1048576 /* Union */) {
|
|
68636
68641
|
const unionContext = context || createWideningContext(
|
|
68637
68642
|
/*parent*/
|
|
@@ -68646,9 +68651,6 @@ function createTypeChecker(host) {
|
|
|
68646
68651
|
result = getIntersectionType(sameMap(type.types, getWidenedType));
|
|
68647
68652
|
} else if (isArrayOrTupleType(type)) {
|
|
68648
68653
|
result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType));
|
|
68649
|
-
if (type.pattern) {
|
|
68650
|
-
result.pattern = type.pattern;
|
|
68651
|
-
}
|
|
68652
68654
|
}
|
|
68653
68655
|
if (result && context === void 0) {
|
|
68654
68656
|
type.widened = result;
|
|
@@ -68982,22 +68984,12 @@ function createTypeChecker(host) {
|
|
|
68982
68984
|
return void 0;
|
|
68983
68985
|
}
|
|
68984
68986
|
if (isArrayType(source)) {
|
|
68985
|
-
|
|
68986
|
-
if (source.pattern) {
|
|
68987
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
68988
|
-
reversed2.pattern = source.pattern;
|
|
68989
|
-
}
|
|
68990
|
-
return reversed2;
|
|
68987
|
+
return createArrayType(inferReverseMappedType(getTypeArguments(source)[0], target, constraint), isReadonlyArrayType(source));
|
|
68991
68988
|
}
|
|
68992
68989
|
if (isTupleType(source)) {
|
|
68993
68990
|
const elementTypes = map(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint));
|
|
68994
68991
|
const elementFlags = getMappedTypeModifiers(target) & 4 /* IncludeOptional */ ? sameMap(source.target.elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : source.target.elementFlags;
|
|
68995
|
-
|
|
68996
|
-
if (source.pattern) {
|
|
68997
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
68998
|
-
reversed2.pattern = source.pattern;
|
|
68999
|
-
}
|
|
69000
|
-
return reversed2;
|
|
68992
|
+
return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);
|
|
69001
68993
|
}
|
|
69002
68994
|
const reversed = createObjectType(
|
|
69003
68995
|
1024 /* ReverseMapped */ | 16 /* Anonymous */,
|
|
@@ -69007,9 +68999,6 @@ function createTypeChecker(host) {
|
|
|
69007
68999
|
reversed.source = source;
|
|
69008
69000
|
reversed.mappedType = target;
|
|
69009
69001
|
reversed.constraintType = constraint;
|
|
69010
|
-
if (source.pattern) {
|
|
69011
|
-
reversed.pattern = source.pattern;
|
|
69012
|
-
}
|
|
69013
69002
|
return reversed;
|
|
69014
69003
|
}
|
|
69015
69004
|
function getTypeOfReverseMappedSymbol(symbol) {
|
|
@@ -69024,7 +69013,7 @@ function createTypeChecker(host) {
|
|
|
69024
69013
|
const templateType = getTemplateTypeFromMappedType(target);
|
|
69025
69014
|
const inference = createInferenceInfo(typeParameter);
|
|
69026
69015
|
inferTypes([inference], sourceType, templateType);
|
|
69027
|
-
return getTypeFromInference(inference) ||
|
|
69016
|
+
return getTypeFromInference(inference) || unknownType;
|
|
69028
69017
|
}
|
|
69029
69018
|
function* getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) {
|
|
69030
69019
|
const properties = getPropertiesOfType(target);
|
|
@@ -69052,7 +69041,7 @@ function createTypeChecker(host) {
|
|
|
69052
69041
|
return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties));
|
|
69053
69042
|
}
|
|
69054
69043
|
function tupleTypesDefinitelyUnrelated(source, target) {
|
|
69055
|
-
return !
|
|
69044
|
+
return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength);
|
|
69056
69045
|
}
|
|
69057
69046
|
function typesDefinitelyUnrelated(source, target) {
|
|
69058
69047
|
return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty(
|
|
@@ -69271,7 +69260,7 @@ function createTypeChecker(host) {
|
|
|
69271
69260
|
}
|
|
69272
69261
|
const inference = getInferenceInfoForType(target);
|
|
69273
69262
|
if (inference) {
|
|
69274
|
-
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source ===
|
|
69263
|
+
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
|
|
69275
69264
|
return;
|
|
69276
69265
|
}
|
|
69277
69266
|
if (!inference.isFixed) {
|
|
@@ -69833,16 +69822,12 @@ function createTypeChecker(host) {
|
|
|
69833
69822
|
function getInferredType(context, index) {
|
|
69834
69823
|
const inference = context.inferences[index];
|
|
69835
69824
|
if (!inference.inferredType) {
|
|
69836
|
-
let isFromBindingPattern = false;
|
|
69837
69825
|
let inferredType;
|
|
69838
69826
|
let fallbackType;
|
|
69839
69827
|
if (context.signature) {
|
|
69840
69828
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
69841
69829
|
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
69842
|
-
if (inferredCovariantType
|
|
69843
|
-
isFromBindingPattern = true;
|
|
69844
|
-
inferredType = inferredCovariantType;
|
|
69845
|
-
} else if (inferredCovariantType || inferredContravariantType) {
|
|
69830
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
69846
69831
|
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
69847
69832
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
69848
69833
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
@@ -69861,9 +69846,7 @@ function createTypeChecker(host) {
|
|
|
69861
69846
|
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
|
|
69862
69847
|
if (constraint) {
|
|
69863
69848
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
69864
|
-
if (
|
|
69865
|
-
inference.inferredType = getIntersectionType([inference.inferredType, instantiatedConstraint]);
|
|
69866
|
-
} else if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
69849
|
+
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
69867
69850
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
69868
69851
|
}
|
|
69869
69852
|
}
|
|
@@ -73190,16 +73173,7 @@ function createTypeChecker(host) {
|
|
|
73190
73173
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
73191
73174
|
const prop = getPropertyOfType(t, name);
|
|
73192
73175
|
if (prop) {
|
|
73193
|
-
|
|
73194
|
-
return void 0;
|
|
73195
|
-
}
|
|
73196
|
-
const type2 = getTypeOfSymbol(prop);
|
|
73197
|
-
if (type2 !== nonInferrableUnknownType) {
|
|
73198
|
-
return removeMissingType(type2, !!(prop && prop.flags & 16777216 /* Optional */));
|
|
73199
|
-
}
|
|
73200
|
-
if (t.flags & 2097152 /* Intersection */) {
|
|
73201
|
-
t = getIntersectionType(t.types.filter((t2) => !t2.pattern));
|
|
73202
|
-
}
|
|
73176
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */));
|
|
73203
73177
|
}
|
|
73204
73178
|
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
73205
73179
|
const restType = getElementTypeOfSliceOfTupleType(
|
|
@@ -74049,7 +74023,7 @@ function createTypeChecker(host) {
|
|
|
74049
74023
|
/*contextFlags*/
|
|
74050
74024
|
void 0
|
|
74051
74025
|
);
|
|
74052
|
-
const contextualTypeHasPattern =
|
|
74026
|
+
const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */);
|
|
74053
74027
|
const inConstContext = isConstContext(node);
|
|
74054
74028
|
const checkFlags = inConstContext ? 8 /* Readonly */ : 0;
|
|
74055
74029
|
const isInJavascript = isInJSFile(node) && !isInJsonFile(node);
|
|
@@ -147658,21 +147632,24 @@ __export(ts_CallHierarchy_exports, {
|
|
|
147658
147632
|
function isNamedExpression(node) {
|
|
147659
147633
|
return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node);
|
|
147660
147634
|
}
|
|
147661
|
-
function
|
|
147662
|
-
return (
|
|
147635
|
+
function isVariableLike2(node) {
|
|
147636
|
+
return isPropertyDeclaration(node) || isVariableDeclaration(node);
|
|
147637
|
+
}
|
|
147638
|
+
function isAssignedExpression(node) {
|
|
147639
|
+
return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2 /* Const */) || isPropertyDeclaration(node.parent));
|
|
147663
147640
|
}
|
|
147664
147641
|
function isPossibleCallHierarchyDeclaration(node) {
|
|
147665
147642
|
return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node);
|
|
147666
147643
|
}
|
|
147667
147644
|
function isValidCallHierarchyDeclaration(node) {
|
|
147668
|
-
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) ||
|
|
147645
|
+
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node);
|
|
147669
147646
|
}
|
|
147670
147647
|
function getCallHierarchyDeclarationReferenceNode(node) {
|
|
147671
147648
|
if (isSourceFile(node))
|
|
147672
147649
|
return node;
|
|
147673
147650
|
if (isNamedDeclaration(node))
|
|
147674
147651
|
return node.name;
|
|
147675
|
-
if (
|
|
147652
|
+
if (isAssignedExpression(node))
|
|
147676
147653
|
return node.parent.name;
|
|
147677
147654
|
return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3));
|
|
147678
147655
|
}
|
|
@@ -147702,7 +147679,7 @@ function getCallHierarchyItemName(program, node) {
|
|
|
147702
147679
|
const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : "";
|
|
147703
147680
|
return { text: `${prefix}static {}`, pos, end };
|
|
147704
147681
|
}
|
|
147705
|
-
const declName =
|
|
147682
|
+
const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
147706
147683
|
let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0;
|
|
147707
147684
|
if (text === void 0) {
|
|
147708
147685
|
const typeChecker = program.getTypeChecker();
|
|
@@ -147718,8 +147695,11 @@ function getCallHierarchyItemName(program, node) {
|
|
|
147718
147695
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
147719
147696
|
}
|
|
147720
147697
|
function getCallHierarchItemContainerName(node) {
|
|
147721
|
-
var _a, _b;
|
|
147722
|
-
if (
|
|
147698
|
+
var _a, _b, _c, _d;
|
|
147699
|
+
if (isAssignedExpression(node)) {
|
|
147700
|
+
if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) {
|
|
147701
|
+
return isClassExpression(node.parent.parent) ? (_a = getAssignedName(node.parent.parent)) == null ? void 0 : _a.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText();
|
|
147702
|
+
}
|
|
147723
147703
|
if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) {
|
|
147724
147704
|
return node.parent.parent.parent.parent.parent.name.getText();
|
|
147725
147705
|
}
|
|
@@ -147730,9 +147710,9 @@ function getCallHierarchItemContainerName(node) {
|
|
|
147730
147710
|
case 178 /* SetAccessor */:
|
|
147731
147711
|
case 174 /* MethodDeclaration */:
|
|
147732
147712
|
if (node.parent.kind === 210 /* ObjectLiteralExpression */) {
|
|
147733
|
-
return (
|
|
147713
|
+
return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText();
|
|
147734
147714
|
}
|
|
147735
|
-
return (
|
|
147715
|
+
return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText();
|
|
147736
147716
|
case 262 /* FunctionDeclaration */:
|
|
147737
147717
|
case 263 /* ClassDeclaration */:
|
|
147738
147718
|
case 267 /* ModuleDeclaration */:
|
|
@@ -147805,7 +147785,7 @@ function resolveCallHierarchyDeclaration(program, location) {
|
|
|
147805
147785
|
const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);
|
|
147806
147786
|
return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);
|
|
147807
147787
|
}
|
|
147808
|
-
if (
|
|
147788
|
+
if (isVariableLike2(location.parent) && location.parent.initializer && isAssignedExpression(location.parent.initializer)) {
|
|
147809
147789
|
return location.parent.initializer;
|
|
147810
147790
|
}
|
|
147811
147791
|
return void 0;
|
|
@@ -147820,7 +147800,7 @@ function resolveCallHierarchyDeclaration(program, location) {
|
|
|
147820
147800
|
location = location.parent;
|
|
147821
147801
|
continue;
|
|
147822
147802
|
}
|
|
147823
|
-
if (isVariableDeclaration(location) && location.initializer &&
|
|
147803
|
+
if (isVariableDeclaration(location) && location.initializer && isAssignedExpression(location.initializer)) {
|
|
147824
147804
|
return location.initializer;
|
|
147825
147805
|
}
|
|
147826
147806
|
if (!followingSymbol) {
|
|
@@ -153893,7 +153873,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ
|
|
|
153893
153873
|
/*enclosingDeclaration*/
|
|
153894
153874
|
void 0,
|
|
153895
153875
|
/*flags*/
|
|
153896
|
-
|
|
153876
|
+
64 /* UseFullyQualifiedType */
|
|
153897
153877
|
);
|
|
153898
153878
|
return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));
|
|
153899
153879
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -37918,9 +37918,11 @@ ${lanes.join("\n")}
|
|
|
37918
37918
|
// Host only
|
|
37919
37919
|
["dom", "lib.dom.d.ts"],
|
|
37920
37920
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
37921
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
37921
37922
|
["webworker", "lib.webworker.d.ts"],
|
|
37922
37923
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
37923
37924
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
37925
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
37924
37926
|
["scripthost", "lib.scripthost.d.ts"],
|
|
37925
37927
|
// ES2015 Or ESNext By-feature options
|
|
37926
37928
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -46569,6 +46571,7 @@ ${lanes.join("\n")}
|
|
|
46569
46571
|
);
|
|
46570
46572
|
var errorType = createIntrinsicType(1 /* Any */, "error");
|
|
46571
46573
|
var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
|
|
46574
|
+
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
46572
46575
|
var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
|
|
46573
46576
|
var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
46574
46577
|
var nonNullUnknownType = createIntrinsicType(
|
|
@@ -46578,7 +46581,6 @@ ${lanes.join("\n")}
|
|
|
46578
46581
|
void 0,
|
|
46579
46582
|
"non-null"
|
|
46580
46583
|
);
|
|
46581
|
-
var nonInferrableUnknownType = createIntrinsicType(2 /* Unknown */, "unknown", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
46582
46584
|
var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
46583
46585
|
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
|
|
46584
46586
|
var missingType = createIntrinsicType(
|
|
@@ -55129,7 +55131,7 @@ ${lanes.join("\n")}
|
|
|
55129
55131
|
if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {
|
|
55130
55132
|
reportImplicitAny(element, anyType);
|
|
55131
55133
|
}
|
|
55132
|
-
return includePatternInType ?
|
|
55134
|
+
return includePatternInType ? nonInferrableAnyType : anyType;
|
|
55133
55135
|
}
|
|
55134
55136
|
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) {
|
|
55135
55137
|
const members = createSymbolTable();
|
|
@@ -55552,7 +55554,7 @@ ${lanes.join("\n")}
|
|
|
55552
55554
|
if (!links.writeType && links.deferralWriteConstituents) {
|
|
55553
55555
|
Debug.assertIsDefined(links.deferralParent);
|
|
55554
55556
|
Debug.assertIsDefined(links.deferralConstituents);
|
|
55555
|
-
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ?
|
|
55557
|
+
links.writeType = links.deferralParent.flags & 1048576 /* Union */ ? getIntersectionType(links.deferralWriteConstituents) : getUnionType(links.deferralWriteConstituents);
|
|
55556
55558
|
}
|
|
55557
55559
|
return links.writeType;
|
|
55558
55560
|
}
|
|
@@ -57774,7 +57776,7 @@ ${lanes.join("\n")}
|
|
|
57774
57776
|
} else {
|
|
57775
57777
|
result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
57776
57778
|
if (writeTypes) {
|
|
57777
|
-
result.links.writeType = isUnion ?
|
|
57779
|
+
result.links.writeType = isUnion ? getIntersectionType(writeTypes) : getUnionType(writeTypes);
|
|
57778
57780
|
}
|
|
57779
57781
|
}
|
|
57780
57782
|
return result;
|
|
@@ -61528,6 +61530,12 @@ ${lanes.join("\n")}
|
|
|
61528
61530
|
return type;
|
|
61529
61531
|
}
|
|
61530
61532
|
function getESSymbolLikeTypeForNode(node) {
|
|
61533
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
61534
|
+
const host2 = getJSDocHost(node);
|
|
61535
|
+
if (host2) {
|
|
61536
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
61537
|
+
}
|
|
61538
|
+
}
|
|
61531
61539
|
if (isValidESSymbolDeclaration(node)) {
|
|
61532
61540
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
61533
61541
|
if (symbol) {
|
|
@@ -63135,7 +63143,7 @@ ${lanes.join("\n")}
|
|
|
63135
63143
|
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
|
|
63136
63144
|
const s = source.flags;
|
|
63137
63145
|
const t = target.flags;
|
|
63138
|
-
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType
|
|
63146
|
+
if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType)
|
|
63139
63147
|
return true;
|
|
63140
63148
|
if (t & 2 /* Unknown */ && !(relation === strictSubtypeRelation && s & 1 /* Any */))
|
|
63141
63149
|
return true;
|
|
@@ -64472,7 +64480,7 @@ ${lanes.join("\n")}
|
|
|
64472
64480
|
}
|
|
64473
64481
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
64474
64482
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
64475
|
-
if (constraint
|
|
64483
|
+
if (constraint) {
|
|
64476
64484
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
64477
64485
|
if (result2 = isRelatedTo(
|
|
64478
64486
|
constraint,
|
|
@@ -66385,9 +66393,6 @@ ${lanes.join("\n")}
|
|
|
66385
66393
|
result = anyType;
|
|
66386
66394
|
} else if (isObjectLiteralType2(type)) {
|
|
66387
66395
|
result = getWidenedTypeOfObjectLiteral(type, context);
|
|
66388
|
-
if (type.pattern) {
|
|
66389
|
-
result.pattern = type.pattern;
|
|
66390
|
-
}
|
|
66391
66396
|
} else if (type.flags & 1048576 /* Union */) {
|
|
66392
66397
|
const unionContext = context || createWideningContext(
|
|
66393
66398
|
/*parent*/
|
|
@@ -66402,9 +66407,6 @@ ${lanes.join("\n")}
|
|
|
66402
66407
|
result = getIntersectionType(sameMap(type.types, getWidenedType));
|
|
66403
66408
|
} else if (isArrayOrTupleType(type)) {
|
|
66404
66409
|
result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType));
|
|
66405
|
-
if (type.pattern) {
|
|
66406
|
-
result.pattern = type.pattern;
|
|
66407
|
-
}
|
|
66408
66410
|
}
|
|
66409
66411
|
if (result && context === void 0) {
|
|
66410
66412
|
type.widened = result;
|
|
@@ -66738,22 +66740,12 @@ ${lanes.join("\n")}
|
|
|
66738
66740
|
return void 0;
|
|
66739
66741
|
}
|
|
66740
66742
|
if (isArrayType(source)) {
|
|
66741
|
-
|
|
66742
|
-
if (source.pattern) {
|
|
66743
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
66744
|
-
reversed2.pattern = source.pattern;
|
|
66745
|
-
}
|
|
66746
|
-
return reversed2;
|
|
66743
|
+
return createArrayType(inferReverseMappedType(getTypeArguments(source)[0], target, constraint), isReadonlyArrayType(source));
|
|
66747
66744
|
}
|
|
66748
66745
|
if (isTupleType(source)) {
|
|
66749
66746
|
const elementTypes = map(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint));
|
|
66750
66747
|
const elementFlags = getMappedTypeModifiers(target) & 4 /* IncludeOptional */ ? sameMap(source.target.elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : source.target.elementFlags;
|
|
66751
|
-
|
|
66752
|
-
if (source.pattern) {
|
|
66753
|
-
reversed2 = cloneTypeReference(reversed2);
|
|
66754
|
-
reversed2.pattern = source.pattern;
|
|
66755
|
-
}
|
|
66756
|
-
return reversed2;
|
|
66748
|
+
return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);
|
|
66757
66749
|
}
|
|
66758
66750
|
const reversed = createObjectType(
|
|
66759
66751
|
1024 /* ReverseMapped */ | 16 /* Anonymous */,
|
|
@@ -66763,9 +66755,6 @@ ${lanes.join("\n")}
|
|
|
66763
66755
|
reversed.source = source;
|
|
66764
66756
|
reversed.mappedType = target;
|
|
66765
66757
|
reversed.constraintType = constraint;
|
|
66766
|
-
if (source.pattern) {
|
|
66767
|
-
reversed.pattern = source.pattern;
|
|
66768
|
-
}
|
|
66769
66758
|
return reversed;
|
|
66770
66759
|
}
|
|
66771
66760
|
function getTypeOfReverseMappedSymbol(symbol) {
|
|
@@ -66780,7 +66769,7 @@ ${lanes.join("\n")}
|
|
|
66780
66769
|
const templateType = getTemplateTypeFromMappedType(target);
|
|
66781
66770
|
const inference = createInferenceInfo(typeParameter);
|
|
66782
66771
|
inferTypes([inference], sourceType, templateType);
|
|
66783
|
-
return getTypeFromInference(inference) ||
|
|
66772
|
+
return getTypeFromInference(inference) || unknownType;
|
|
66784
66773
|
}
|
|
66785
66774
|
function* getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) {
|
|
66786
66775
|
const properties = getPropertiesOfType(target);
|
|
@@ -66808,7 +66797,7 @@ ${lanes.join("\n")}
|
|
|
66808
66797
|
return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties));
|
|
66809
66798
|
}
|
|
66810
66799
|
function tupleTypesDefinitelyUnrelated(source, target) {
|
|
66811
|
-
return !
|
|
66800
|
+
return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength);
|
|
66812
66801
|
}
|
|
66813
66802
|
function typesDefinitelyUnrelated(source, target) {
|
|
66814
66803
|
return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty(
|
|
@@ -67027,7 +67016,7 @@ ${lanes.join("\n")}
|
|
|
67027
67016
|
}
|
|
67028
67017
|
const inference = getInferenceInfoForType(target);
|
|
67029
67018
|
if (inference) {
|
|
67030
|
-
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source ===
|
|
67019
|
+
if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
|
|
67031
67020
|
return;
|
|
67032
67021
|
}
|
|
67033
67022
|
if (!inference.isFixed) {
|
|
@@ -67589,16 +67578,12 @@ ${lanes.join("\n")}
|
|
|
67589
67578
|
function getInferredType(context, index) {
|
|
67590
67579
|
const inference = context.inferences[index];
|
|
67591
67580
|
if (!inference.inferredType) {
|
|
67592
|
-
let isFromBindingPattern = false;
|
|
67593
67581
|
let inferredType;
|
|
67594
67582
|
let fallbackType;
|
|
67595
67583
|
if (context.signature) {
|
|
67596
67584
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
67597
67585
|
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
67598
|
-
if (inferredCovariantType
|
|
67599
|
-
isFromBindingPattern = true;
|
|
67600
|
-
inferredType = inferredCovariantType;
|
|
67601
|
-
} else if (inferredCovariantType || inferredContravariantType) {
|
|
67586
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
67602
67587
|
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
67603
67588
|
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
67604
67589
|
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
@@ -67617,9 +67602,7 @@ ${lanes.join("\n")}
|
|
|
67617
67602
|
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
|
|
67618
67603
|
if (constraint) {
|
|
67619
67604
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
67620
|
-
if (
|
|
67621
|
-
inference.inferredType = getIntersectionType([inference.inferredType, instantiatedConstraint]);
|
|
67622
|
-
} else if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
67605
|
+
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
67623
67606
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
67624
67607
|
}
|
|
67625
67608
|
}
|
|
@@ -70946,16 +70929,7 @@ ${lanes.join("\n")}
|
|
|
70946
70929
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
70947
70930
|
const prop = getPropertyOfType(t, name);
|
|
70948
70931
|
if (prop) {
|
|
70949
|
-
|
|
70950
|
-
return void 0;
|
|
70951
|
-
}
|
|
70952
|
-
const type2 = getTypeOfSymbol(prop);
|
|
70953
|
-
if (type2 !== nonInferrableUnknownType) {
|
|
70954
|
-
return removeMissingType(type2, !!(prop && prop.flags & 16777216 /* Optional */));
|
|
70955
|
-
}
|
|
70956
|
-
if (t.flags & 2097152 /* Intersection */) {
|
|
70957
|
-
t = getIntersectionType(t.types.filter((t2) => !t2.pattern));
|
|
70958
|
-
}
|
|
70932
|
+
return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */));
|
|
70959
70933
|
}
|
|
70960
70934
|
if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
|
|
70961
70935
|
const restType = getElementTypeOfSliceOfTupleType(
|
|
@@ -71805,7 +71779,7 @@ ${lanes.join("\n")}
|
|
|
71805
71779
|
/*contextFlags*/
|
|
71806
71780
|
void 0
|
|
71807
71781
|
);
|
|
71808
|
-
const contextualTypeHasPattern =
|
|
71782
|
+
const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */);
|
|
71809
71783
|
const inConstContext = isConstContext(node);
|
|
71810
71784
|
const checkFlags = inConstContext ? 8 /* Readonly */ : 0;
|
|
71811
71785
|
const isInJavascript = isInJSFile(node) && !isInJsonFile(node);
|
|
@@ -146279,21 +146253,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146279
146253
|
function isNamedExpression(node) {
|
|
146280
146254
|
return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node);
|
|
146281
146255
|
}
|
|
146282
|
-
function
|
|
146283
|
-
return (
|
|
146256
|
+
function isVariableLike2(node) {
|
|
146257
|
+
return isPropertyDeclaration(node) || isVariableDeclaration(node);
|
|
146258
|
+
}
|
|
146259
|
+
function isAssignedExpression(node) {
|
|
146260
|
+
return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2 /* Const */) || isPropertyDeclaration(node.parent));
|
|
146284
146261
|
}
|
|
146285
146262
|
function isPossibleCallHierarchyDeclaration(node) {
|
|
146286
146263
|
return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node);
|
|
146287
146264
|
}
|
|
146288
146265
|
function isValidCallHierarchyDeclaration(node) {
|
|
146289
|
-
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) ||
|
|
146266
|
+
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node);
|
|
146290
146267
|
}
|
|
146291
146268
|
function getCallHierarchyDeclarationReferenceNode(node) {
|
|
146292
146269
|
if (isSourceFile(node))
|
|
146293
146270
|
return node;
|
|
146294
146271
|
if (isNamedDeclaration(node))
|
|
146295
146272
|
return node.name;
|
|
146296
|
-
if (
|
|
146273
|
+
if (isAssignedExpression(node))
|
|
146297
146274
|
return node.parent.name;
|
|
146298
146275
|
return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3));
|
|
146299
146276
|
}
|
|
@@ -146323,7 +146300,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146323
146300
|
const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : "";
|
|
146324
146301
|
return { text: `${prefix}static {}`, pos, end };
|
|
146325
146302
|
}
|
|
146326
|
-
const declName =
|
|
146303
|
+
const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
146327
146304
|
let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0;
|
|
146328
146305
|
if (text === void 0) {
|
|
146329
146306
|
const typeChecker = program.getTypeChecker();
|
|
@@ -146339,8 +146316,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146339
146316
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
146340
146317
|
}
|
|
146341
146318
|
function getCallHierarchItemContainerName(node) {
|
|
146342
|
-
var _a, _b;
|
|
146343
|
-
if (
|
|
146319
|
+
var _a, _b, _c, _d;
|
|
146320
|
+
if (isAssignedExpression(node)) {
|
|
146321
|
+
if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) {
|
|
146322
|
+
return isClassExpression(node.parent.parent) ? (_a = getAssignedName(node.parent.parent)) == null ? void 0 : _a.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText();
|
|
146323
|
+
}
|
|
146344
146324
|
if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) {
|
|
146345
146325
|
return node.parent.parent.parent.parent.parent.name.getText();
|
|
146346
146326
|
}
|
|
@@ -146351,9 +146331,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146351
146331
|
case 178 /* SetAccessor */:
|
|
146352
146332
|
case 174 /* MethodDeclaration */:
|
|
146353
146333
|
if (node.parent.kind === 210 /* ObjectLiteralExpression */) {
|
|
146354
|
-
return (
|
|
146334
|
+
return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText();
|
|
146355
146335
|
}
|
|
146356
|
-
return (
|
|
146336
|
+
return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText();
|
|
146357
146337
|
case 262 /* FunctionDeclaration */:
|
|
146358
146338
|
case 263 /* ClassDeclaration */:
|
|
146359
146339
|
case 267 /* ModuleDeclaration */:
|
|
@@ -146426,7 +146406,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146426
146406
|
const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);
|
|
146427
146407
|
return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);
|
|
146428
146408
|
}
|
|
146429
|
-
if (
|
|
146409
|
+
if (isVariableLike2(location.parent) && location.parent.initializer && isAssignedExpression(location.parent.initializer)) {
|
|
146430
146410
|
return location.parent.initializer;
|
|
146431
146411
|
}
|
|
146432
146412
|
return void 0;
|
|
@@ -146441,7 +146421,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146441
146421
|
location = location.parent;
|
|
146442
146422
|
continue;
|
|
146443
146423
|
}
|
|
146444
|
-
if (isVariableDeclaration(location) && location.initializer &&
|
|
146424
|
+
if (isVariableDeclaration(location) && location.initializer && isAssignedExpression(location.initializer)) {
|
|
146445
146425
|
return location.initializer;
|
|
146446
146426
|
}
|
|
146447
146427
|
if (!followingSymbol) {
|
|
@@ -152636,7 +152616,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
152636
152616
|
/*enclosingDeclaration*/
|
|
152637
152617
|
void 0,
|
|
152638
152618
|
/*flags*/
|
|
152639
|
-
|
|
152619
|
+
64 /* UseFullyQualifiedType */
|
|
152640
152620
|
);
|
|
152641
152621
|
return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));
|
|
152642
152622
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -25859,9 +25859,11 @@ var libEntries = [
|
|
|
25859
25859
|
// Host only
|
|
25860
25860
|
["dom", "lib.dom.d.ts"],
|
|
25861
25861
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
25862
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
25862
25863
|
["webworker", "lib.webworker.d.ts"],
|
|
25863
25864
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
25864
25865
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
25866
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
25865
25867
|
["scripthost", "lib.scripthost.d.ts"],
|
|
25866
25868
|
// ES2015 Or ESNext By-feature options
|
|
25867
25869
|
["es2015.core", "lib.es2015.core.d.ts"],
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56895-10",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "9197d6c5bbc2d40c312aaec87a2e1521d543cb3b"
|
|
118
118
|
}
|