@typescript-deploys/pr-build 4.9.0-pr-51065-26 → 4.9.0-pr-51144-3
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/README.md +1 -1
- package/lib/cs/diagnosticMessages.generated.json +1 -1
- package/lib/de/diagnosticMessages.generated.json +1 -1
- package/lib/es/diagnosticMessages.generated.json +1 -1
- package/lib/fr/diagnosticMessages.generated.json +1 -1
- package/lib/it/diagnosticMessages.generated.json +1 -1
- package/lib/ja/diagnosticMessages.generated.json +1 -1
- package/lib/ko/diagnosticMessages.generated.json +1 -1
- package/lib/lib.d.ts +5 -5
- package/lib/lib.dom.d.ts +1 -1
- package/lib/lib.dom.iterable.d.ts +1 -1
- package/lib/lib.es2015.collection.d.ts +133 -133
- package/lib/lib.es2015.core.d.ts +542 -542
- package/lib/lib.es2015.d.ts +11 -11
- package/lib/lib.es2015.generator.d.ts +60 -60
- package/lib/lib.es2015.iterable.d.ts +481 -481
- package/lib/lib.es2015.promise.d.ts +64 -64
- package/lib/lib.es2015.proxy.d.ts +113 -113
- package/lib/lib.es2015.reflect.d.ts +129 -129
- package/lib/lib.es2015.symbol.d.ts +30 -30
- package/lib/lib.es2015.symbol.wellknown.d.ts +307 -307
- package/lib/lib.es2016.array.include.d.ts +100 -100
- package/lib/lib.es2016.d.ts +2 -2
- package/lib/lib.es2016.full.d.ts +5 -5
- package/lib/lib.es2017.d.ts +7 -7
- package/lib/lib.es2017.full.d.ts +5 -5
- package/lib/lib.es2017.intl.d.ts +30 -30
- package/lib/lib.es2017.object.d.ts +34 -34
- package/lib/lib.es2017.sharedmemory.d.ts +120 -120
- package/lib/lib.es2017.string.d.ts +30 -30
- package/lib/lib.es2017.typedarrays.d.ts +38 -38
- package/lib/lib.es2018.asyncgenerator.d.ts +60 -60
- package/lib/lib.es2018.asynciterable.d.ts +27 -27
- package/lib/lib.es2018.d.ts +7 -7
- package/lib/lib.es2018.full.d.ts +5 -5
- package/lib/lib.es2018.intl.d.ts +56 -56
- package/lib/lib.es2018.promise.d.ts +13 -13
- package/lib/lib.es2018.regexp.d.ts +21 -21
- package/lib/lib.es2019.array.d.ts +66 -66
- package/lib/lib.es2019.d.ts +7 -7
- package/lib/lib.es2019.full.d.ts +6 -6
- package/lib/lib.es2019.intl.d.ts +6 -6
- package/lib/lib.es2019.object.d.ts +18 -18
- package/lib/lib.es2019.string.d.ts +22 -22
- package/lib/lib.es2019.symbol.d.ts +7 -7
- package/lib/lib.es2020.bigint.d.ts +713 -713
- package/lib/lib.es2020.d.ts +10 -10
- package/lib/lib.es2020.date.d.ts +26 -26
- package/lib/lib.es2020.full.d.ts +6 -6
- package/lib/lib.es2020.intl.d.ts +416 -416
- package/lib/lib.es2020.number.d.ts +13 -13
- package/lib/lib.es2020.promise.d.ts +32 -32
- package/lib/lib.es2020.sharedmemory.d.ts +82 -82
- package/lib/lib.es2020.string.d.ts +13 -13
- package/lib/lib.es2020.symbol.wellknown.d.ts +22 -22
- package/lib/lib.es2021.d.ts +6 -6
- package/lib/lib.es2021.full.d.ts +6 -6
- package/lib/lib.es2021.intl.d.ts +137 -137
- package/lib/lib.es2021.promise.d.ts +33 -33
- package/lib/lib.es2021.string.d.ts +18 -18
- package/lib/lib.es2021.weakref.d.ts +58 -58
- package/lib/lib.es2022.array.d.ts +106 -106
- package/lib/lib.es2022.d.ts +8 -8
- package/lib/lib.es2022.error.d.ts +58 -58
- package/lib/lib.es2022.full.d.ts +6 -6
- package/lib/lib.es2022.intl.d.ts +94 -94
- package/lib/lib.es2022.object.d.ts +9 -9
- package/lib/lib.es2022.sharedmemory.d.ts +8 -8
- package/lib/lib.es2022.string.d.ts +8 -8
- package/lib/lib.es5.d.ts +4509 -4509
- package/lib/lib.es6.d.ts +6 -6
- package/lib/lib.esnext.d.ts +3 -3
- package/lib/lib.esnext.full.d.ts +5 -5
- package/lib/lib.esnext.intl.d.ts +13 -13
- package/lib/lib.scripthost.d.ts +310 -310
- package/lib/lib.webworker.d.ts +1 -1
- package/lib/lib.webworker.importscripts.d.ts +7 -7
- package/lib/lib.webworker.iterable.d.ts +1 -1
- package/lib/pl/diagnosticMessages.generated.json +1 -1
- package/lib/pt-br/diagnosticMessages.generated.json +1 -1
- package/lib/ru/diagnosticMessages.generated.json +1 -1
- package/lib/tr/diagnosticMessages.generated.json +1 -1
- package/lib/tsc.js +34 -18
- package/lib/tsserver.js +108 -43
- package/lib/tsserverlibrary.d.ts +15 -16
- package/lib/tsserverlibrary.js +108 -41
- package/lib/typescript.d.ts +2 -10
- package/lib/typescript.js +71 -31
- package/lib/typingsInstaller.js +26 -9
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -1
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -1
- package/package.json +16 -34
package/lib/typescript.js
CHANGED
|
@@ -161,6 +161,7 @@ var ts = (() => {
|
|
|
161
161
|
NodeCheckFlags: () => NodeCheckFlags,
|
|
162
162
|
NodeFactoryFlags: () => NodeFactoryFlags,
|
|
163
163
|
NodeFlags: () => NodeFlags,
|
|
164
|
+
NodeResolutionFeatures: () => NodeResolutionFeatures,
|
|
164
165
|
ObjectFlags: () => ObjectFlags,
|
|
165
166
|
OperationCanceledException: () => OperationCanceledException,
|
|
166
167
|
OperatorPrecedence: () => OperatorPrecedence,
|
|
@@ -2316,6 +2317,7 @@ var ts = (() => {
|
|
|
2316
2317
|
tokenToString: () => tokenToString,
|
|
2317
2318
|
trace: () => trace,
|
|
2318
2319
|
tracing: () => tracing,
|
|
2320
|
+
tracingEnabled: () => tracingEnabled,
|
|
2319
2321
|
transform: () => transform,
|
|
2320
2322
|
transformClassFields: () => transformClassFields,
|
|
2321
2323
|
transformDeclarations: () => transformDeclarations,
|
|
@@ -2619,6 +2621,7 @@ var ts = (() => {
|
|
|
2619
2621
|
NodeCheckFlags: () => NodeCheckFlags,
|
|
2620
2622
|
NodeFactoryFlags: () => NodeFactoryFlags,
|
|
2621
2623
|
NodeFlags: () => NodeFlags,
|
|
2624
|
+
NodeResolutionFeatures: () => NodeResolutionFeatures,
|
|
2622
2625
|
ObjectFlags: () => ObjectFlags,
|
|
2623
2626
|
OperationCanceledException: () => OperationCanceledException,
|
|
2624
2627
|
OperatorPrecedence: () => OperatorPrecedence,
|
|
@@ -4290,6 +4293,7 @@ var ts = (() => {
|
|
|
4290
4293
|
tokenToString: () => tokenToString,
|
|
4291
4294
|
trace: () => trace,
|
|
4292
4295
|
tracing: () => tracing,
|
|
4296
|
+
tracingEnabled: () => tracingEnabled,
|
|
4293
4297
|
transformClassFields: () => transformClassFields,
|
|
4294
4298
|
transformDeclarations: () => transformDeclarations,
|
|
4295
4299
|
transformECMAScriptModule: () => transformECMAScriptModule,
|
|
@@ -4383,12 +4387,12 @@ var ts = (() => {
|
|
|
4383
4387
|
|
|
4384
4388
|
// src/compiler/corePublic.ts
|
|
4385
4389
|
var versionMajorMinor = "4.9";
|
|
4386
|
-
var version = "".concat(versionMajorMinor, ".0-insiders.
|
|
4387
|
-
var Comparison = /* @__PURE__ */ ((
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
return
|
|
4390
|
+
var version = "".concat(versionMajorMinor, ".0-insiders.20221011");
|
|
4391
|
+
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
4392
|
+
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
4393
|
+
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
4394
|
+
Comparison3[Comparison3["GreaterThan"] = 1] = "GreaterThan";
|
|
4395
|
+
return Comparison3;
|
|
4392
4396
|
})(Comparison || {});
|
|
4393
4397
|
var NativeCollections;
|
|
4394
4398
|
((NativeCollections2) => {
|
|
@@ -7173,7 +7177,7 @@ var ts = (() => {
|
|
|
7173
7177
|
} catch (e) {
|
|
7174
7178
|
etwModule = void 0;
|
|
7175
7179
|
}
|
|
7176
|
-
var perfLogger = etwModule
|
|
7180
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : nullLogger;
|
|
7177
7181
|
|
|
7178
7182
|
// src/compiler/tracing.ts
|
|
7179
7183
|
var tracing;
|
|
@@ -52481,7 +52485,17 @@ var ts = (() => {
|
|
|
52481
52485
|
return !!(getObjectFlags(type) & 32 /* Mapped */ && getMappedTypeModifiers(type) & 4 /* IncludeOptional */);
|
|
52482
52486
|
}
|
|
52483
52487
|
function isGenericMappedType(type) {
|
|
52484
|
-
|
|
52488
|
+
if (getObjectFlags(type) & 32 /* Mapped */) {
|
|
52489
|
+
const constraint = getConstraintTypeFromMappedType(type);
|
|
52490
|
+
if (isGenericIndexType(constraint)) {
|
|
52491
|
+
return true;
|
|
52492
|
+
}
|
|
52493
|
+
const nameType = getNameTypeFromMappedType(type);
|
|
52494
|
+
if (nameType && isGenericIndexType(instantiateType(nameType, makeUnaryTypeMapper(getTypeParameterFromMappedType(type), constraint)))) {
|
|
52495
|
+
return true;
|
|
52496
|
+
}
|
|
52497
|
+
}
|
|
52498
|
+
return false;
|
|
52485
52499
|
}
|
|
52486
52500
|
function resolveStructuredTypeMembers(type) {
|
|
52487
52501
|
if (!type.members) {
|
|
@@ -55206,8 +55220,13 @@ var ts = (() => {
|
|
|
55206
55220
|
return getStringLiteralType(text);
|
|
55207
55221
|
}
|
|
55208
55222
|
newTexts.push(text);
|
|
55209
|
-
if (every(newTexts, (t) => t === "")
|
|
55210
|
-
|
|
55223
|
+
if (every(newTexts, (t) => t === "")) {
|
|
55224
|
+
if (every(newTypes, (t) => !!(t.flags & 4 /* String */))) {
|
|
55225
|
+
return stringType;
|
|
55226
|
+
}
|
|
55227
|
+
if (newTypes.length === 1 && isPatternLiteralType(newTypes[0])) {
|
|
55228
|
+
return newTypes[0];
|
|
55229
|
+
}
|
|
55211
55230
|
}
|
|
55212
55231
|
const id = "".concat(getTypeListId(newTypes), "|").concat(map(newTexts, (t) => t.length).join(","), "|").concat(newTexts.join(""));
|
|
55213
55232
|
let type = templateLiteralTypes.get(id);
|
|
@@ -55257,7 +55276,7 @@ var ts = (() => {
|
|
|
55257
55276
|
return type;
|
|
55258
55277
|
}
|
|
55259
55278
|
function getStringMappingType(symbol, type) {
|
|
55260
|
-
return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags &
|
|
55279
|
+
return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags & 128 /* StringLiteral */ ? getStringLiteralType(applyStringMapping(symbol, type.value)) : type.flags & 134217728 /* TemplateLiteral */ ? getTemplateLiteralType(...applyTemplateStringMapping(symbol, type.texts, type.types)) : type.flags & 268435456 /* StringMapping */ && symbol === type.symbol ? type : type.flags & (1 /* Any */ | 4 /* String */ || type.flags & 268435456 /* StringMapping */) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) : isPatternLiteralPlaceholderType(type) ? getStringMappingTypeForGenericType(symbol, getTemplateLiteralType(["", ""], [type])) : type;
|
|
55261
55280
|
}
|
|
55262
55281
|
function applyStringMapping(symbol, str) {
|
|
55263
55282
|
switch (intrinsicTypeKinds.get(symbol.escapedName)) {
|
|
@@ -55513,10 +55532,10 @@ var ts = (() => {
|
|
|
55513
55532
|
return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode;
|
|
55514
55533
|
}
|
|
55515
55534
|
function isPatternLiteralPlaceholderType(type) {
|
|
55516
|
-
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) ||
|
|
55535
|
+
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
55517
55536
|
}
|
|
55518
55537
|
function isPatternLiteralType(type) {
|
|
55519
|
-
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType);
|
|
55538
|
+
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
55520
55539
|
}
|
|
55521
55540
|
function isGenericType(type) {
|
|
55522
55541
|
return !!getGenericObjectFlags(type);
|
|
@@ -60447,7 +60466,7 @@ var ts = (() => {
|
|
|
60447
60466
|
return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
|
|
60448
60467
|
}
|
|
60449
60468
|
function isMemberOfStringMapping(source, target) {
|
|
60450
|
-
if (target.flags & (4 /* String */ |
|
|
60469
|
+
if (target.flags & (4 /* String */ | 1 /* Any */)) {
|
|
60451
60470
|
return true;
|
|
60452
60471
|
}
|
|
60453
60472
|
if (target.flags & 134217728 /* TemplateLiteral */) {
|
|
@@ -117510,9 +117529,9 @@ var ts = (() => {
|
|
|
117510
117529
|
}
|
|
117511
117530
|
if (scanner.getToken() === 15 /* TemplateHead */) {
|
|
117512
117531
|
const stack = [scanner.getToken()];
|
|
117513
|
-
let token = scanner.scan();
|
|
117514
117532
|
loop:
|
|
117515
117533
|
while (length(stack)) {
|
|
117534
|
+
const token = scanner.scan();
|
|
117516
117535
|
switch (token) {
|
|
117517
117536
|
case 1 /* EndOfFileToken */:
|
|
117518
117537
|
break loop;
|
|
@@ -117539,7 +117558,6 @@ var ts = (() => {
|
|
|
117539
117558
|
}
|
|
117540
117559
|
break;
|
|
117541
117560
|
}
|
|
117542
|
-
token = scanner.scan();
|
|
117543
117561
|
}
|
|
117544
117562
|
nextToken();
|
|
117545
117563
|
}
|
|
@@ -131196,6 +131214,7 @@ var ts = (() => {
|
|
|
131196
131214
|
CompletionSource: () => CompletionSource,
|
|
131197
131215
|
SortText: () => SortText,
|
|
131198
131216
|
StringCompletions: () => ts_Completions_StringCompletions_exports,
|
|
131217
|
+
SymbolOriginInfoKind: () => SymbolOriginInfoKind,
|
|
131199
131218
|
createCompletionDetails: () => createCompletionDetails,
|
|
131200
131219
|
createCompletionDetailsForSymbol: () => createCompletionDetailsForSymbol,
|
|
131201
131220
|
getCompletionEntriesFromSymbols: () => getCompletionEntriesFromSymbols,
|
|
@@ -131237,6 +131256,19 @@ var ts = (() => {
|
|
|
131237
131256
|
CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
|
|
131238
131257
|
return CompletionSource2;
|
|
131239
131258
|
})(CompletionSource || {});
|
|
131259
|
+
var SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {
|
|
131260
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["ThisType"] = 1] = "ThisType";
|
|
131261
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMember"] = 2] = "SymbolMember";
|
|
131262
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["Export"] = 4] = "Export";
|
|
131263
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["Promise"] = 8] = "Promise";
|
|
131264
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["Nullable"] = 16] = "Nullable";
|
|
131265
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["ResolvedExport"] = 32] = "ResolvedExport";
|
|
131266
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["TypeOnlyAlias"] = 64] = "TypeOnlyAlias";
|
|
131267
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["ObjectLiteralMethod"] = 128] = "ObjectLiteralMethod";
|
|
131268
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberNoExport"] = 2 /* SymbolMember */] = "SymbolMemberNoExport";
|
|
131269
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberExport"] = 6] = "SymbolMemberExport";
|
|
131270
|
+
return SymbolOriginInfoKind2;
|
|
131271
|
+
})(SymbolOriginInfoKind || {});
|
|
131240
131272
|
function originIsThisType(origin) {
|
|
131241
131273
|
return !!(origin.kind & 1 /* ThisType */);
|
|
131242
131274
|
}
|
|
@@ -141622,6 +141654,7 @@ var ts = (() => {
|
|
|
141622
141654
|
var ts_refactor_extractSymbol_exports = {};
|
|
141623
141655
|
__export(ts_refactor_extractSymbol_exports, {
|
|
141624
141656
|
Messages: () => Messages,
|
|
141657
|
+
RangeFacts: () => RangeFacts,
|
|
141625
141658
|
getRangeToExtract: () => getRangeToExtract2,
|
|
141626
141659
|
getRefactorActionsToExtractSymbol: () => getRefactorActionsToExtractSymbol,
|
|
141627
141660
|
getRefactorEditsToExtractSymbol: () => getRefactorEditsToExtractSymbol
|
|
@@ -141808,6 +141841,16 @@ var ts = (() => {
|
|
|
141808
141841
|
Messages2.cannotExtractToExpressionArrowFunction = createMessage("Cannot extract constant to an arrow function without a block");
|
|
141809
141842
|
Messages2.cannotExtractFunctionsContainingThisToMethod = createMessage("Cannot extract functions containing this to method");
|
|
141810
141843
|
})(Messages || (Messages = {}));
|
|
141844
|
+
var RangeFacts = /* @__PURE__ */ ((RangeFacts2) => {
|
|
141845
|
+
RangeFacts2[RangeFacts2["None"] = 0] = "None";
|
|
141846
|
+
RangeFacts2[RangeFacts2["HasReturn"] = 1] = "HasReturn";
|
|
141847
|
+
RangeFacts2[RangeFacts2["IsGenerator"] = 2] = "IsGenerator";
|
|
141848
|
+
RangeFacts2[RangeFacts2["IsAsyncFunction"] = 4] = "IsAsyncFunction";
|
|
141849
|
+
RangeFacts2[RangeFacts2["UsesThis"] = 8] = "UsesThis";
|
|
141850
|
+
RangeFacts2[RangeFacts2["UsesThisInFunction"] = 16] = "UsesThisInFunction";
|
|
141851
|
+
RangeFacts2[RangeFacts2["InStaticRegion"] = 32] = "InStaticRegion";
|
|
141852
|
+
return RangeFacts2;
|
|
141853
|
+
})(RangeFacts || {});
|
|
141811
141854
|
function getRangeToExtract2(sourceFile, span, invoked = true) {
|
|
141812
141855
|
const { length: length2 } = span;
|
|
141813
141856
|
if (length2 === 0 && !invoked) {
|
|
@@ -141819,7 +141862,6 @@ var ts = (() => {
|
|
|
141819
141862
|
const adjustedSpan = startToken && endToken && invoked ? getAdjustedSpanFromNodes(startToken, endToken, sourceFile) : span;
|
|
141820
141863
|
const start = cursorRequest ? getExtractableParent(startToken) : getParentNodeInSpan(startToken, sourceFile, adjustedSpan);
|
|
141821
141864
|
const end = cursorRequest ? start : getParentNodeInSpan(endToken, sourceFile, adjustedSpan);
|
|
141822
|
-
const declarations = [];
|
|
141823
141865
|
let rangeFacts = 0 /* None */;
|
|
141824
141866
|
let thisNode;
|
|
141825
141867
|
if (!start || !end) {
|
|
@@ -141851,7 +141893,7 @@ var ts = (() => {
|
|
|
141851
141893
|
if (!statements.length) {
|
|
141852
141894
|
return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };
|
|
141853
141895
|
}
|
|
141854
|
-
return { targetRange: { range: statements, facts: rangeFacts,
|
|
141896
|
+
return { targetRange: { range: statements, facts: rangeFacts, thisNode } };
|
|
141855
141897
|
}
|
|
141856
141898
|
if (isReturnStatement(start) && !start.expression) {
|
|
141857
141899
|
return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };
|
|
@@ -141861,17 +141903,17 @@ var ts = (() => {
|
|
|
141861
141903
|
if (errors) {
|
|
141862
141904
|
return { errors };
|
|
141863
141905
|
}
|
|
141864
|
-
return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts,
|
|
141906
|
+
return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts, thisNode } };
|
|
141865
141907
|
function refineNode(node2) {
|
|
141866
141908
|
if (isReturnStatement(node2)) {
|
|
141867
141909
|
if (node2.expression) {
|
|
141868
141910
|
return node2.expression;
|
|
141869
141911
|
}
|
|
141870
141912
|
} else if (isVariableStatement(node2) || isVariableDeclarationList(node2)) {
|
|
141871
|
-
const
|
|
141913
|
+
const declarations = isVariableStatement(node2) ? node2.declarationList.declarations : node2.declarations;
|
|
141872
141914
|
let numInitializers = 0;
|
|
141873
141915
|
let lastInitializer;
|
|
141874
|
-
for (const declaration of
|
|
141916
|
+
for (const declaration of declarations) {
|
|
141875
141917
|
if (declaration.initializer) {
|
|
141876
141918
|
numInitializers++;
|
|
141877
141919
|
lastInitializer = declaration.initializer;
|
|
@@ -141956,7 +141998,6 @@ var ts = (() => {
|
|
|
141956
141998
|
(errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity));
|
|
141957
141999
|
return true;
|
|
141958
142000
|
}
|
|
141959
|
-
declarations.push(node2.symbol);
|
|
141960
142001
|
}
|
|
141961
142002
|
switch (node2.kind) {
|
|
141962
142003
|
case 269 /* ImportDeclaration */:
|
|
@@ -149539,13 +149580,12 @@ var ts = (() => {
|
|
|
149539
149580
|
return __toCommonJS(typescript_exports);
|
|
149540
149581
|
})();
|
|
149541
149582
|
|
|
149542
|
-
|
|
149543
|
-
|
|
149544
|
-
|
|
149545
|
-
|
|
149546
|
-
|
|
149547
|
-
|
|
149548
|
-
|
|
149549
|
-
|
|
149550
|
-
|
|
149583
|
+
if (typeof module !== "undefined" && module.exports) {
|
|
149584
|
+
// If we are in a CJS context, export the ts namespace.
|
|
149585
|
+
module.exports = ts;
|
|
149586
|
+
}
|
|
149587
|
+
if (ts.server) {
|
|
149588
|
+
// If we are in a server bundle, inject the dynamicImport function.
|
|
149589
|
+
ts.server.dynamicImport = id => import(id);
|
|
149590
|
+
}
|
|
149551
149591
|
//# sourceMappingURL=typescript.js.map
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -131,6 +131,7 @@ __export(ts_exports, {
|
|
|
131
131
|
NodeCheckFlags: () => NodeCheckFlags,
|
|
132
132
|
NodeFactoryFlags: () => NodeFactoryFlags,
|
|
133
133
|
NodeFlags: () => NodeFlags,
|
|
134
|
+
NodeResolutionFeatures: () => NodeResolutionFeatures,
|
|
134
135
|
ObjectFlags: () => ObjectFlags,
|
|
135
136
|
OperationCanceledException: () => OperationCanceledException,
|
|
136
137
|
OperatorPrecedence: () => OperatorPrecedence,
|
|
@@ -1802,6 +1803,7 @@ __export(ts_exports, {
|
|
|
1802
1803
|
tokenToString: () => tokenToString,
|
|
1803
1804
|
trace: () => trace,
|
|
1804
1805
|
tracing: () => tracing,
|
|
1806
|
+
tracingEnabled: () => tracingEnabled,
|
|
1805
1807
|
transformClassFields: () => transformClassFields,
|
|
1806
1808
|
transformDeclarations: () => transformDeclarations,
|
|
1807
1809
|
transformECMAScriptModule: () => transformECMAScriptModule,
|
|
@@ -1895,7 +1897,7 @@ __export(ts_exports, {
|
|
|
1895
1897
|
|
|
1896
1898
|
// src/compiler/corePublic.ts
|
|
1897
1899
|
var versionMajorMinor = "4.9";
|
|
1898
|
-
var version = "".concat(versionMajorMinor, ".0-insiders.
|
|
1900
|
+
var version = "".concat(versionMajorMinor, ".0-insiders.20221011");
|
|
1899
1901
|
var Comparison = /* @__PURE__ */ ((Comparison2) => {
|
|
1900
1902
|
Comparison2[Comparison2["LessThan"] = -1] = "LessThan";
|
|
1901
1903
|
Comparison2[Comparison2["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4685,7 +4687,7 @@ try {
|
|
|
4685
4687
|
} catch (e) {
|
|
4686
4688
|
etwModule = void 0;
|
|
4687
4689
|
}
|
|
4688
|
-
var perfLogger = etwModule
|
|
4690
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : nullLogger;
|
|
4689
4691
|
|
|
4690
4692
|
// src/compiler/tracing.ts
|
|
4691
4693
|
var tracing;
|
|
@@ -49993,7 +49995,17 @@ function createTypeChecker(host) {
|
|
|
49993
49995
|
return !!(getObjectFlags(type) & 32 /* Mapped */ && getMappedTypeModifiers(type) & 4 /* IncludeOptional */);
|
|
49994
49996
|
}
|
|
49995
49997
|
function isGenericMappedType(type) {
|
|
49996
|
-
|
|
49998
|
+
if (getObjectFlags(type) & 32 /* Mapped */) {
|
|
49999
|
+
const constraint = getConstraintTypeFromMappedType(type);
|
|
50000
|
+
if (isGenericIndexType(constraint)) {
|
|
50001
|
+
return true;
|
|
50002
|
+
}
|
|
50003
|
+
const nameType = getNameTypeFromMappedType(type);
|
|
50004
|
+
if (nameType && isGenericIndexType(instantiateType(nameType, makeUnaryTypeMapper(getTypeParameterFromMappedType(type), constraint)))) {
|
|
50005
|
+
return true;
|
|
50006
|
+
}
|
|
50007
|
+
}
|
|
50008
|
+
return false;
|
|
49997
50009
|
}
|
|
49998
50010
|
function resolveStructuredTypeMembers(type) {
|
|
49999
50011
|
if (!type.members) {
|
|
@@ -52718,8 +52730,13 @@ function createTypeChecker(host) {
|
|
|
52718
52730
|
return getStringLiteralType(text);
|
|
52719
52731
|
}
|
|
52720
52732
|
newTexts.push(text);
|
|
52721
|
-
if (every(newTexts, (t) => t === "")
|
|
52722
|
-
|
|
52733
|
+
if (every(newTexts, (t) => t === "")) {
|
|
52734
|
+
if (every(newTypes, (t) => !!(t.flags & 4 /* String */))) {
|
|
52735
|
+
return stringType;
|
|
52736
|
+
}
|
|
52737
|
+
if (newTypes.length === 1 && isPatternLiteralType(newTypes[0])) {
|
|
52738
|
+
return newTypes[0];
|
|
52739
|
+
}
|
|
52723
52740
|
}
|
|
52724
52741
|
const id = "".concat(getTypeListId(newTypes), "|").concat(map(newTexts, (t) => t.length).join(","), "|").concat(newTexts.join(""));
|
|
52725
52742
|
let type = templateLiteralTypes.get(id);
|
|
@@ -52769,7 +52786,7 @@ function createTypeChecker(host) {
|
|
|
52769
52786
|
return type;
|
|
52770
52787
|
}
|
|
52771
52788
|
function getStringMappingType(symbol, type) {
|
|
52772
|
-
return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags &
|
|
52789
|
+
return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags & 128 /* StringLiteral */ ? getStringLiteralType(applyStringMapping(symbol, type.value)) : type.flags & 134217728 /* TemplateLiteral */ ? getTemplateLiteralType(...applyTemplateStringMapping(symbol, type.texts, type.types)) : type.flags & 268435456 /* StringMapping */ && symbol === type.symbol ? type : type.flags & (1 /* Any */ | 4 /* String */ || type.flags & 268435456 /* StringMapping */) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) : isPatternLiteralPlaceholderType(type) ? getStringMappingTypeForGenericType(symbol, getTemplateLiteralType(["", ""], [type])) : type;
|
|
52773
52790
|
}
|
|
52774
52791
|
function applyStringMapping(symbol, str) {
|
|
52775
52792
|
switch (intrinsicTypeKinds.get(symbol.escapedName)) {
|
|
@@ -53025,10 +53042,10 @@ function createTypeChecker(host) {
|
|
|
53025
53042
|
return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode;
|
|
53026
53043
|
}
|
|
53027
53044
|
function isPatternLiteralPlaceholderType(type) {
|
|
53028
|
-
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) ||
|
|
53045
|
+
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
53029
53046
|
}
|
|
53030
53047
|
function isPatternLiteralType(type) {
|
|
53031
|
-
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType);
|
|
53048
|
+
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
53032
53049
|
}
|
|
53033
53050
|
function isGenericType(type) {
|
|
53034
53051
|
return !!getGenericObjectFlags(type);
|
|
@@ -57959,7 +57976,7 @@ function createTypeChecker(host) {
|
|
|
57959
57976
|
return success && result === 9 /* BigIntLiteral */ && scanner.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) }));
|
|
57960
57977
|
}
|
|
57961
57978
|
function isMemberOfStringMapping(source, target) {
|
|
57962
|
-
if (target.flags & (4 /* String */ |
|
|
57979
|
+
if (target.flags & (4 /* String */ | 1 /* Any */)) {
|
|
57963
57980
|
return true;
|
|
57964
57981
|
}
|
|
57965
57982
|
if (target.flags & 134217728 /* TemplateLiteral */) {
|
|
@@ -1623,7 +1623,7 @@
|
|
|
1623
1623
|
"Unexpected_token_1012": "意外的标记。",
|
|
1624
1624
|
"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "意外的标记。应为构造函数、方法、访问器或属性。",
|
|
1625
1625
|
"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "意外的标记。类型参数名不应包含大括号。",
|
|
1626
|
-
"Unexpected_token_Did_you_mean_or_gt_1382": "意外的标记。你是想使用 `{'>'}` 还是
|
|
1626
|
+
"Unexpected_token_Did_you_mean_or_gt_1382": "意外的标记。你是想使用 `{'>'}` 还是 `>`?",
|
|
1627
1627
|
"Unexpected_token_Did_you_mean_or_rbrace_1381": "意外的标记。你是想使用 `{'}'}` 还是 `}`?",
|
|
1628
1628
|
"Unexpected_token_expected_1179": "意外标记。应为 \"{\"。",
|
|
1629
1629
|
"Unknown_build_option_0_5072": "未知的生成选项 \"{0}\"。",
|
|
@@ -1623,7 +1623,7 @@
|
|
|
1623
1623
|
"Unexpected_token_1012": "未預期的語彙基元。",
|
|
1624
1624
|
"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "未預期的語彙基元。必須是建構函式、方法、存取子或屬性。",
|
|
1625
1625
|
"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "權杖錯誤。類型參數名稱不應有大括號。",
|
|
1626
|
-
"Unexpected_token_Did_you_mean_or_gt_1382": "未預期的語彙基元。您是指 `{'>'}` 或
|
|
1626
|
+
"Unexpected_token_Did_you_mean_or_gt_1382": "未預期的語彙基元。您是指 `{'>'}` 或 `>` 嗎?",
|
|
1627
1627
|
"Unexpected_token_Did_you_mean_or_rbrace_1381": "未預期的語彙基元。您是指 `{'}'}` 或 `}` 嗎?",
|
|
1628
1628
|
"Unexpected_token_expected_1179": "未預期的語彙基元。必須是 '{'。",
|
|
1629
1629
|
"Unknown_build_option_0_5072": "未知的組建選項 '{0}'。",
|
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": "4.9.0-pr-
|
|
5
|
+
"version": "4.9.0-pr-51144-3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -43,21 +43,13 @@
|
|
|
43
43
|
"@types/chai": "latest",
|
|
44
44
|
"@types/fs-extra": "^9.0.13",
|
|
45
45
|
"@types/glob": "latest",
|
|
46
|
-
"@types/gulp": "^4.0.9",
|
|
47
|
-
"@types/gulp-concat": "latest",
|
|
48
|
-
"@types/gulp-newer": "latest",
|
|
49
|
-
"@types/gulp-rename": "latest",
|
|
50
|
-
"@types/gulp-sourcemaps": "latest",
|
|
51
|
-
"@types/merge2": "latest",
|
|
52
46
|
"@types/microsoft__typescript-etw": "latest",
|
|
53
47
|
"@types/minimist": "latest",
|
|
54
|
-
"@types/mkdirp": "latest",
|
|
55
48
|
"@types/mocha": "latest",
|
|
56
49
|
"@types/ms": "latest",
|
|
57
50
|
"@types/node": "latest",
|
|
58
|
-
"@types/node-fetch": "^2.6.2",
|
|
59
51
|
"@types/source-map-support": "latest",
|
|
60
|
-
"@types/
|
|
52
|
+
"@types/which": "^2.0.1",
|
|
61
53
|
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
62
54
|
"@typescript-eslint/parser": "^5.33.1",
|
|
63
55
|
"@typescript-eslint/utils": "^5.33.1",
|
|
@@ -73,42 +65,32 @@
|
|
|
73
65
|
"eslint-plugin-jsdoc": "^39.3.6",
|
|
74
66
|
"eslint-plugin-local": "^1.0.0",
|
|
75
67
|
"eslint-plugin-no-null": "^1.0.2",
|
|
76
|
-
"
|
|
68
|
+
"fast-xml-parser": "^4.0.11",
|
|
77
69
|
"fs-extra": "^9.1.0",
|
|
78
70
|
"glob": "latest",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"gulp-insert": "latest",
|
|
82
|
-
"gulp-newer": "latest",
|
|
83
|
-
"gulp-rename": "latest",
|
|
84
|
-
"gulp-sourcemaps": "latest",
|
|
85
|
-
"merge2": "latest",
|
|
71
|
+
"hereby": "^1.5.0",
|
|
72
|
+
"jsonc-parser": "^3.2.0",
|
|
86
73
|
"minimist": "latest",
|
|
87
|
-
"mkdirp": "latest",
|
|
88
74
|
"mocha": "latest",
|
|
89
75
|
"mocha-fivemat-progress-reporter": "latest",
|
|
90
76
|
"ms": "^2.1.3",
|
|
91
|
-
"node-fetch": "^2.
|
|
77
|
+
"node-fetch": "^3.2.10",
|
|
92
78
|
"source-map-support": "latest",
|
|
93
79
|
"typescript": "^4.8.4",
|
|
94
|
-
"
|
|
95
|
-
"which": "^2.0.2",
|
|
96
|
-
"xml2js": "^0.4.23"
|
|
97
|
-
},
|
|
98
|
-
"overrides": {
|
|
99
|
-
"es5-ext": "0.10.53"
|
|
80
|
+
"which": "^2.0.2"
|
|
100
81
|
},
|
|
101
82
|
"scripts": {
|
|
102
|
-
"
|
|
103
|
-
"test
|
|
83
|
+
"postinstall": "node ./scripts/installGulpShim.mjs",
|
|
84
|
+
"test": "hereby runtests-parallel --light=false",
|
|
85
|
+
"test:eslint-rules": "hereby run-eslint-rules-tests",
|
|
104
86
|
"build": "npm run build:compiler && npm run build:tests",
|
|
105
|
-
"build:compiler": "
|
|
106
|
-
"build:tests": "
|
|
87
|
+
"build:compiler": "hereby local",
|
|
88
|
+
"build:tests": "hereby tests",
|
|
107
89
|
"start": "node lib/tsc",
|
|
108
|
-
"clean": "
|
|
109
|
-
"gulp": "
|
|
110
|
-
"lint": "
|
|
111
|
-
"setup-hooks": "node scripts/link-hooks.
|
|
90
|
+
"clean": "hereby clean",
|
|
91
|
+
"gulp": "hereby",
|
|
92
|
+
"lint": "hereby lint",
|
|
93
|
+
"setup-hooks": "node scripts/link-hooks.mjs",
|
|
112
94
|
"prepare": ""
|
|
113
95
|
},
|
|
114
96
|
"browser": {
|