@typescript-deploys/pr-build 5.1.0-pr-53134-21 → 5.1.0-pr-53098-13
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/ThirdPartyNoticeText.txt +13 -13
- package/lib/lib.dom.d.ts +743 -16
- package/lib/lib.dom.iterable.d.ts +28 -0
- package/lib/lib.es5.d.ts +0 -6
- package/lib/lib.webworker.d.ts +577 -4
- package/lib/lib.webworker.iterable.d.ts +28 -0
- package/lib/tsc.js +50 -68
- package/lib/tsserver.js +64 -75
- package/lib/tsserverlibrary.d.ts +0 -1
- package/lib/tsserverlibrary.js +62 -72
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +61 -71
- package/lib/typingsInstaller.js +2 -18
- package/package.json +3 -3
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.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230310`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3545,7 +3545,7 @@ ${lanes.join("\n")}
|
|
|
3545
3545
|
const name = DiagnosticCategory[d.category];
|
|
3546
3546
|
return lowerCase ? name.toLowerCase() : name;
|
|
3547
3547
|
}
|
|
3548
|
-
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
|
|
3548
|
+
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
|
|
3549
3549
|
var init_types = __esm({
|
|
3550
3550
|
"src/compiler/types.ts"() {
|
|
3551
3551
|
"use strict";
|
|
@@ -4556,6 +4556,13 @@ ${lanes.join("\n")}
|
|
|
4556
4556
|
AccessFlags2[AccessFlags2["Persistent"] = 1 /* IncludeUndefined */] = "Persistent";
|
|
4557
4557
|
return AccessFlags2;
|
|
4558
4558
|
})(AccessFlags || {});
|
|
4559
|
+
IndexFlags = /* @__PURE__ */ ((IndexFlags2) => {
|
|
4560
|
+
IndexFlags2[IndexFlags2["None"] = 0] = "None";
|
|
4561
|
+
IndexFlags2[IndexFlags2["StringsOnly"] = 1] = "StringsOnly";
|
|
4562
|
+
IndexFlags2[IndexFlags2["NoIndexSignatures"] = 2] = "NoIndexSignatures";
|
|
4563
|
+
IndexFlags2[IndexFlags2["NoReducibleCheck"] = 4] = "NoReducibleCheck";
|
|
4564
|
+
return IndexFlags2;
|
|
4565
|
+
})(IndexFlags || {});
|
|
4559
4566
|
JsxReferenceKind = /* @__PURE__ */ ((JsxReferenceKind2) => {
|
|
4560
4567
|
JsxReferenceKind2[JsxReferenceKind2["Component"] = 0] = "Component";
|
|
4561
4568
|
JsxReferenceKind2[JsxReferenceKind2["Function"] = 1] = "Function";
|
|
@@ -6098,20 +6105,6 @@ ${lanes.join("\n")}
|
|
|
6098
6105
|
(path2) => sys2.directoryExists(path2)
|
|
6099
6106
|
);
|
|
6100
6107
|
}
|
|
6101
|
-
function getNodeMajorVersion() {
|
|
6102
|
-
if (typeof process === "undefined") {
|
|
6103
|
-
return void 0;
|
|
6104
|
-
}
|
|
6105
|
-
const version2 = process.version;
|
|
6106
|
-
if (!version2) {
|
|
6107
|
-
return void 0;
|
|
6108
|
-
}
|
|
6109
|
-
const dot = version2.indexOf(".");
|
|
6110
|
-
if (dot === -1) {
|
|
6111
|
-
return void 0;
|
|
6112
|
-
}
|
|
6113
|
-
return parseInt(version2.substring(1, dot));
|
|
6114
|
-
}
|
|
6115
6108
|
function setSys(s) {
|
|
6116
6109
|
sys = s;
|
|
6117
6110
|
}
|
|
@@ -6159,14 +6152,12 @@ ${lanes.join("\n")}
|
|
|
6159
6152
|
let activeSession;
|
|
6160
6153
|
let profilePath = "./profile.cpuprofile";
|
|
6161
6154
|
const Buffer2 = require("buffer").Buffer;
|
|
6162
|
-
const nodeVersion = getNodeMajorVersion();
|
|
6163
|
-
const isNode4OrLater = nodeVersion >= 4;
|
|
6164
6155
|
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
6165
6156
|
const platform = _os.platform();
|
|
6166
6157
|
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
6167
6158
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
6168
6159
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
6169
|
-
const fsSupportsRecursiveFsWatch =
|
|
6160
|
+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
|
|
6170
6161
|
const getCurrentDirectory = memoize(() => process.cwd());
|
|
6171
6162
|
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
|
|
6172
6163
|
pollingWatchFileWorker: fsWatchFileWorker,
|
|
@@ -45092,6 +45083,7 @@ ${lanes.join("\n")}
|
|
|
45092
45083
|
var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
45093
45084
|
var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
45094
45085
|
var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
|
|
45086
|
+
var defaultIndexFlags = keyofStringsOnly ? 1 /* StringsOnly */ : 0 /* None */;
|
|
45095
45087
|
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192 /* FreshLiteral */;
|
|
45096
45088
|
var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
|
|
45097
45089
|
var checkBinaryExpression = createCheckBinaryExpression();
|
|
@@ -55080,10 +55072,9 @@ ${lanes.join("\n")}
|
|
|
55080
55072
|
return [sig.parameters];
|
|
55081
55073
|
function expandSignatureParametersWithTupleMembers(restType, restIndex) {
|
|
55082
55074
|
const elementTypes = getTypeArguments(restType);
|
|
55083
|
-
const associatedNames = restType
|
|
55075
|
+
const associatedNames = getUniqAssociatedNamesFromTupleType(restType);
|
|
55084
55076
|
const restParams = map(elementTypes, (t, i) => {
|
|
55085
|
-
const
|
|
55086
|
-
const name = tupleLabelName || getParameterNameAtPosition(sig, restIndex + i, restType);
|
|
55077
|
+
const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType);
|
|
55087
55078
|
const flags = restType.target.elementFlags[i];
|
|
55088
55079
|
const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0;
|
|
55089
55080
|
const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags);
|
|
@@ -55092,6 +55083,20 @@ ${lanes.join("\n")}
|
|
|
55092
55083
|
});
|
|
55093
55084
|
return concatenate(sig.parameters.slice(0, restIndex), restParams);
|
|
55094
55085
|
}
|
|
55086
|
+
function getUniqAssociatedNamesFromTupleType(type) {
|
|
55087
|
+
const associatedNamesMap = /* @__PURE__ */ new Map();
|
|
55088
|
+
return map(type.target.labeledElementDeclarations, (labeledElement) => {
|
|
55089
|
+
const name = getTupleElementLabel(labeledElement);
|
|
55090
|
+
const prevCounter = associatedNamesMap.get(name);
|
|
55091
|
+
if (prevCounter === void 0) {
|
|
55092
|
+
associatedNamesMap.set(name, 1);
|
|
55093
|
+
return name;
|
|
55094
|
+
} else {
|
|
55095
|
+
associatedNamesMap.set(name, prevCounter + 1);
|
|
55096
|
+
return `${name}_${prevCounter}`;
|
|
55097
|
+
}
|
|
55098
|
+
});
|
|
55099
|
+
}
|
|
55095
55100
|
}
|
|
55096
55101
|
function getDefaultConstructSignatures(classType) {
|
|
55097
55102
|
const baseConstructorType = getBaseConstructorTypeOfClass(classType);
|
|
@@ -56347,6 +56352,13 @@ ${lanes.join("\n")}
|
|
|
56347
56352
|
function isConflictingPrivateProperty(prop) {
|
|
56348
56353
|
return !prop.valueDeclaration && !!(getCheckFlags(prop) & 1024 /* ContainsPrivate */);
|
|
56349
56354
|
}
|
|
56355
|
+
function isGenericReducibleType(type) {
|
|
56356
|
+
return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type));
|
|
56357
|
+
}
|
|
56358
|
+
function isReducibleIntersection(type) {
|
|
56359
|
+
const uniqueFilled = type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
|
|
56360
|
+
return getReducedType(uniqueFilled) !== uniqueFilled;
|
|
56361
|
+
}
|
|
56350
56362
|
function elaborateNeverIntersection(errorInfo, type) {
|
|
56351
56363
|
if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) {
|
|
56352
56364
|
const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
|
|
@@ -57789,7 +57801,7 @@ ${lanes.join("\n")}
|
|
|
57789
57801
|
}
|
|
57790
57802
|
function getGlobalOmitSymbol() {
|
|
57791
57803
|
deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalTypeAliasSymbol(
|
|
57792
|
-
"
|
|
57804
|
+
"Omit",
|
|
57793
57805
|
/*arity*/
|
|
57794
57806
|
2,
|
|
57795
57807
|
/*reportErrors*/
|
|
@@ -58716,10 +58728,10 @@ ${lanes.join("\n")}
|
|
|
58716
58728
|
}
|
|
58717
58729
|
return links.resolvedType;
|
|
58718
58730
|
}
|
|
58719
|
-
function createIndexType(type,
|
|
58731
|
+
function createIndexType(type, indexFlags) {
|
|
58720
58732
|
const result = createType(4194304 /* Index */);
|
|
58721
58733
|
result.type = type;
|
|
58722
|
-
result.
|
|
58734
|
+
result.indexFlags = indexFlags;
|
|
58723
58735
|
return result;
|
|
58724
58736
|
}
|
|
58725
58737
|
function createOriginIndexType(type) {
|
|
@@ -58727,31 +58739,23 @@ ${lanes.join("\n")}
|
|
|
58727
58739
|
result.type = type;
|
|
58728
58740
|
return result;
|
|
58729
58741
|
}
|
|
58730
|
-
function getIndexTypeForGenericType(type,
|
|
58731
|
-
return
|
|
58732
|
-
type,
|
|
58733
|
-
/*stringsOnly*/
|
|
58734
|
-
true
|
|
58735
|
-
)) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(
|
|
58736
|
-
type,
|
|
58737
|
-
/*stringsOnly*/
|
|
58738
|
-
false
|
|
58739
|
-
));
|
|
58742
|
+
function getIndexTypeForGenericType(type, indexFlags) {
|
|
58743
|
+
return indexFlags & 1 /* StringsOnly */ ? type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, 1 /* StringsOnly */)) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, 0 /* None */));
|
|
58740
58744
|
}
|
|
58741
|
-
function getIndexTypeForMappedType(type,
|
|
58745
|
+
function getIndexTypeForMappedType(type, indexFlags) {
|
|
58742
58746
|
const typeParameter = getTypeParameterFromMappedType(type);
|
|
58743
58747
|
const constraintType = getConstraintTypeFromMappedType(type);
|
|
58744
58748
|
const nameType = getNameTypeFromMappedType(type.target || type);
|
|
58745
|
-
if (!nameType && !
|
|
58749
|
+
if (!nameType && !(indexFlags & 2 /* NoIndexSignatures */)) {
|
|
58746
58750
|
return constraintType;
|
|
58747
58751
|
}
|
|
58748
58752
|
const keyTypes = [];
|
|
58749
58753
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
58750
58754
|
if (!isGenericIndexType(constraintType)) {
|
|
58751
58755
|
const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
|
|
58752
|
-
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */,
|
|
58756
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */, !!(indexFlags & 1 /* StringsOnly */), addMemberForKeyType);
|
|
58753
58757
|
} else {
|
|
58754
|
-
return getIndexTypeForGenericType(type,
|
|
58758
|
+
return getIndexTypeForGenericType(type, indexFlags);
|
|
58755
58759
|
}
|
|
58756
58760
|
} else {
|
|
58757
58761
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
@@ -58759,7 +58763,7 @@ ${lanes.join("\n")}
|
|
|
58759
58763
|
if (isGenericIndexType(constraintType)) {
|
|
58760
58764
|
forEachType(constraintType, addMemberForKeyType);
|
|
58761
58765
|
}
|
|
58762
|
-
const result =
|
|
58766
|
+
const result = indexFlags & 2 /* NoIndexSignatures */ ? filterType(getUnionType(keyTypes), (t) => !(t.flags & (1 /* Any */ | 4 /* String */))) : getUnionType(keyTypes);
|
|
58763
58767
|
if (result.flags & 1048576 /* Union */ && constraintType.flags & 1048576 /* Union */ && getTypeListId(result.types) === getTypeListId(constraintType.types)) {
|
|
58764
58768
|
return constraintType;
|
|
58765
58769
|
}
|
|
@@ -58812,19 +58816,15 @@ ${lanes.join("\n")}
|
|
|
58812
58816
|
origin
|
|
58813
58817
|
);
|
|
58814
58818
|
}
|
|
58815
|
-
function
|
|
58816
|
-
|
|
58817
|
-
return getReducedType(uniqueFilled) !== uniqueFilled;
|
|
58818
|
-
}
|
|
58819
|
-
function shouldDeferIndexType(type) {
|
|
58820
|
-
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) || type.flags & 1048576 /* Union */ && some(type.types, isPossiblyReducibleByInstantiation) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
58819
|
+
function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
|
|
58820
|
+
return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
|
|
58821
58821
|
}
|
|
58822
|
-
function getIndexType(type,
|
|
58822
|
+
function getIndexType(type, indexFlags = defaultIndexFlags) {
|
|
58823
58823
|
type = getReducedType(type);
|
|
58824
|
-
return shouldDeferIndexType(type) ? getIndexTypeForGenericType(type,
|
|
58824
|
+
return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(
|
|
58825
58825
|
type,
|
|
58826
|
-
(
|
|
58827
|
-
|
|
58826
|
+
(indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */),
|
|
58827
|
+
indexFlags === defaultIndexFlags
|
|
58828
58828
|
);
|
|
58829
58829
|
}
|
|
58830
58830
|
function getExtractStringType(type) {
|
|
@@ -59364,12 +59364,13 @@ ${lanes.join("\n")}
|
|
|
59364
59364
|
if (objectType === wildcardType || indexType === wildcardType) {
|
|
59365
59365
|
return wildcardType;
|
|
59366
59366
|
}
|
|
59367
|
+
objectType = getReducedType(objectType);
|
|
59367
59368
|
if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) {
|
|
59368
59369
|
indexType = stringType;
|
|
59369
59370
|
}
|
|
59370
59371
|
if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */)
|
|
59371
59372
|
accessFlags |= 1 /* IncludeUndefined */;
|
|
59372
|
-
if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) {
|
|
59373
|
+
if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) {
|
|
59373
59374
|
if (objectType.flags & 3 /* AnyOrUnknown */) {
|
|
59374
59375
|
return objectType;
|
|
59375
59376
|
}
|
|
@@ -60555,9 +60556,6 @@ ${lanes.join("\n")}
|
|
|
60555
60556
|
}
|
|
60556
60557
|
return type;
|
|
60557
60558
|
}
|
|
60558
|
-
function getUniqueLiteralFilledInstantiation(type) {
|
|
60559
|
-
return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
|
|
60560
|
-
}
|
|
60561
60559
|
function getPermissiveInstantiation(type) {
|
|
60562
60560
|
return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));
|
|
60563
60561
|
}
|
|
@@ -62752,7 +62750,7 @@ ${lanes.join("\n")}
|
|
|
62752
62750
|
} else {
|
|
62753
62751
|
const constraint = getSimplifiedTypeOrConstraint(targetType);
|
|
62754
62752
|
if (constraint) {
|
|
62755
|
-
if (isRelatedTo(source2, getIndexType(constraint, target2.
|
|
62753
|
+
if (isRelatedTo(source2, getIndexType(constraint, target2.indexFlags | 4 /* NoReducibleCheck */), 2 /* Target */, reportErrors2) === -1 /* True */) {
|
|
62756
62754
|
return -1 /* True */;
|
|
62757
62755
|
}
|
|
62758
62756
|
} else if (isGenericMappedType(targetType)) {
|
|
@@ -62833,13 +62831,7 @@ ${lanes.join("\n")}
|
|
|
62833
62831
|
}
|
|
62834
62832
|
if (!isGenericMappedType(source2)) {
|
|
62835
62833
|
const targetKeys = keysRemapped ? getNameTypeFromMappedType(target2) : getConstraintTypeFromMappedType(target2);
|
|
62836
|
-
const sourceKeys = getIndexType(
|
|
62837
|
-
source2,
|
|
62838
|
-
/*stringsOnly*/
|
|
62839
|
-
void 0,
|
|
62840
|
-
/*noIndexSignatures*/
|
|
62841
|
-
true
|
|
62842
|
-
);
|
|
62834
|
+
const sourceKeys = getIndexType(source2, 2 /* NoIndexSignatures */);
|
|
62843
62835
|
const includeOptional = modifiers & 4 /* IncludeOptional */;
|
|
62844
62836
|
const filteredByApplicability = includeOptional ? intersectTypes(targetKeys, sourceKeys) : void 0;
|
|
62845
62837
|
if (includeOptional ? !(filteredByApplicability.flags & 131072 /* Never */) : isRelatedTo(targetKeys, sourceKeys, 3 /* Both */)) {
|
|
@@ -69671,13 +69663,14 @@ ${lanes.join("\n")}
|
|
|
69671
69663
|
const elementFlags = [];
|
|
69672
69664
|
pushCachedContextualType(node);
|
|
69673
69665
|
const inDestructuringPattern = isAssignmentTarget(node);
|
|
69674
|
-
const
|
|
69666
|
+
const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent);
|
|
69667
|
+
const inConstContext = isSpreadIntoCallOrNew || isConstContext(node);
|
|
69675
69668
|
const contextualType = getApparentTypeOfContextualType(
|
|
69676
69669
|
node,
|
|
69677
69670
|
/*contextFlags*/
|
|
69678
69671
|
void 0
|
|
69679
69672
|
);
|
|
69680
|
-
const inTupleContext = !!contextualType && someType(contextualType, isTupleLikeType);
|
|
69673
|
+
const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType);
|
|
69681
69674
|
let hasOmittedExpression = false;
|
|
69682
69675
|
for (let i = 0; i < elementCount; i++) {
|
|
69683
69676
|
const e = elements[i];
|
|
@@ -77071,11 +77064,7 @@ ${lanes.join("\n")}
|
|
|
77071
77064
|
}
|
|
77072
77065
|
const objectType = type.objectType;
|
|
77073
77066
|
const indexType = type.indexType;
|
|
77074
|
-
if (isTypeAssignableTo(indexType, getIndexType(
|
|
77075
|
-
objectType,
|
|
77076
|
-
/*stringsOnly*/
|
|
77077
|
-
false
|
|
77078
|
-
))) {
|
|
77067
|
+
if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) {
|
|
77079
77068
|
if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) {
|
|
77080
77069
|
error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
|
|
77081
77070
|
}
|
|
@@ -142589,9 +142578,10 @@ ${lanes.join("\n")}
|
|
|
142589
142578
|
if (!isMemberName(token))
|
|
142590
142579
|
return void 0;
|
|
142591
142580
|
if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) {
|
|
142581
|
+
const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token);
|
|
142592
142582
|
const properties = arrayFrom(checker.getUnmatchedProperties(
|
|
142593
142583
|
checker.getTypeAtLocation(parent2.initializer),
|
|
142594
|
-
|
|
142584
|
+
targetType,
|
|
142595
142585
|
/* requireOptionalProperties */
|
|
142596
142586
|
false,
|
|
142597
142587
|
/* matchDiscriminantProperties */
|
|
@@ -167851,6 +167841,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
167851
167841
|
ImportKind: () => ImportKind,
|
|
167852
167842
|
ImportsNotUsedAsValues: () => ImportsNotUsedAsValues,
|
|
167853
167843
|
IndentStyle: () => IndentStyle,
|
|
167844
|
+
IndexFlags: () => IndexFlags,
|
|
167854
167845
|
IndexKind: () => IndexKind,
|
|
167855
167846
|
InferenceFlags: () => InferenceFlags,
|
|
167856
167847
|
InferencePriority: () => InferencePriority,
|
|
@@ -168643,7 +168634,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
168643
168634
|
getNodeForGeneratedName: () => getNodeForGeneratedName,
|
|
168644
168635
|
getNodeId: () => getNodeId,
|
|
168645
168636
|
getNodeKind: () => getNodeKind,
|
|
168646
|
-
getNodeMajorVersion: () => getNodeMajorVersion,
|
|
168647
168637
|
getNodeModifiers: () => getNodeModifiers,
|
|
168648
168638
|
getNodeModulePathParts: () => getNodeModulePathParts,
|
|
168649
168639
|
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
|
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.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230310`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -4264,20 +4264,6 @@ function patchWriteFileEnsuringDirectory(sys2) {
|
|
|
4264
4264
|
(path3) => sys2.directoryExists(path3)
|
|
4265
4265
|
);
|
|
4266
4266
|
}
|
|
4267
|
-
function getNodeMajorVersion() {
|
|
4268
|
-
if (typeof process === "undefined") {
|
|
4269
|
-
return void 0;
|
|
4270
|
-
}
|
|
4271
|
-
const version2 = process.version;
|
|
4272
|
-
if (!version2) {
|
|
4273
|
-
return void 0;
|
|
4274
|
-
}
|
|
4275
|
-
const dot = version2.indexOf(".");
|
|
4276
|
-
if (dot === -1) {
|
|
4277
|
-
return void 0;
|
|
4278
|
-
}
|
|
4279
|
-
return parseInt(version2.substring(1, dot));
|
|
4280
|
-
}
|
|
4281
4267
|
var sys = (() => {
|
|
4282
4268
|
const byteOrderMarkIndicator = "\uFEFF";
|
|
4283
4269
|
function getNodeSystem() {
|
|
@@ -4294,14 +4280,12 @@ var sys = (() => {
|
|
|
4294
4280
|
let activeSession;
|
|
4295
4281
|
let profilePath = "./profile.cpuprofile";
|
|
4296
4282
|
const Buffer2 = require("buffer").Buffer;
|
|
4297
|
-
const nodeVersion = getNodeMajorVersion();
|
|
4298
|
-
const isNode4OrLater = nodeVersion >= 4;
|
|
4299
4283
|
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
4300
4284
|
const platform = _os.platform();
|
|
4301
4285
|
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
4302
4286
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
4303
4287
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
4304
|
-
const fsSupportsRecursiveFsWatch =
|
|
4288
|
+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
|
|
4305
4289
|
const getCurrentDirectory = memoize(() => process.cwd());
|
|
4306
4290
|
const { watchFile, watchDirectory } = createSystemWatchFunctions({
|
|
4307
4291
|
pollingWatchFileWorker: fsWatchFileWorker,
|
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.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-53098-13",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tsserver": "./bin/tsserver"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
29
|
+
"node": ">=12.20"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"bin",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "14.21.1",
|
|
114
114
|
"npm": "8.19.3"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "cc7ab93ef68f6438bb50925a24a955193989e4d9"
|
|
117
117
|
}
|