@storm-software/linting-tools 1.85.2 → 1.85.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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/bin/lint.js +169 -79
- package/package.json +1 -1
- package/src/cli/index.js +169 -79
package/bin/lint.js
CHANGED
|
@@ -92883,9 +92883,9 @@ var require_source_map_support = __commonJS({
|
|
|
92883
92883
|
}
|
|
92884
92884
|
});
|
|
92885
92885
|
|
|
92886
|
-
// node_modules/.pnpm/typescript@5.5.
|
|
92886
|
+
// node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/typescript.js
|
|
92887
92887
|
var require_typescript = __commonJS({
|
|
92888
|
-
"node_modules/.pnpm/typescript@5.5.
|
|
92888
|
+
"node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/typescript.js"(exports, module) {
|
|
92889
92889
|
/*! *****************************************************************************
|
|
92890
92890
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
92891
92891
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -95140,6 +95140,7 @@ var require_typescript = __commonJS({
|
|
|
95140
95140
|
trace: () => trace2,
|
|
95141
95141
|
tracing: () => tracing,
|
|
95142
95142
|
tracingEnabled: () => tracingEnabled,
|
|
95143
|
+
transferSourceFileChildren: () => transferSourceFileChildren,
|
|
95143
95144
|
transform: () => transform6,
|
|
95144
95145
|
transformClassFields: () => transformClassFields,
|
|
95145
95146
|
transformDeclarations: () => transformDeclarations,
|
|
@@ -95250,7 +95251,7 @@ var require_typescript = __commonJS({
|
|
|
95250
95251
|
});
|
|
95251
95252
|
module2.exports = __toCommonJS2(typescript_exports);
|
|
95252
95253
|
var versionMajorMinor = "5.5";
|
|
95253
|
-
var version4 = "5.5.
|
|
95254
|
+
var version4 = "5.5.4";
|
|
95254
95255
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
95255
95256
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
95256
95257
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -98123,10 +98124,12 @@ ${lanes.join("\n")}
|
|
|
98123
98124
|
if (isNodeLikeSystem()) {
|
|
98124
98125
|
try {
|
|
98125
98126
|
const { performance: performance2 } = __require("perf_hooks");
|
|
98126
|
-
|
|
98127
|
-
|
|
98128
|
-
|
|
98129
|
-
|
|
98127
|
+
if (performance2) {
|
|
98128
|
+
return {
|
|
98129
|
+
shouldWriteNativeEvents: false,
|
|
98130
|
+
performance: performance2
|
|
98131
|
+
};
|
|
98132
|
+
}
|
|
98130
98133
|
} catch {
|
|
98131
98134
|
}
|
|
98132
98135
|
}
|
|
@@ -99271,6 +99274,7 @@ ${lanes.join("\n")}
|
|
|
99271
99274
|
var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
|
|
99272
99275
|
EmitOnly4[EmitOnly4["Js"] = 0] = "Js";
|
|
99273
99276
|
EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts";
|
|
99277
|
+
EmitOnly4[EmitOnly4["BuilderSignature"] = 2] = "BuilderSignature";
|
|
99274
99278
|
return EmitOnly4;
|
|
99275
99279
|
})(EmitOnly || {});
|
|
99276
99280
|
var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {
|
|
@@ -105456,6 +105460,7 @@ ${lanes.join("\n")}
|
|
|
105456
105460
|
var tokenFlags;
|
|
105457
105461
|
var commentDirectives;
|
|
105458
105462
|
var skipJsDocLeadingAsterisks = 0;
|
|
105463
|
+
var asteriskSeen = false;
|
|
105459
105464
|
var scriptKind = 0;
|
|
105460
105465
|
var jsDocParsingMode = 0;
|
|
105461
105466
|
setText(text, start, length2);
|
|
@@ -105507,6 +105512,7 @@ ${lanes.join("\n")}
|
|
|
105507
105512
|
resetTokenState,
|
|
105508
105513
|
setTextPos: resetTokenState,
|
|
105509
105514
|
setSkipJsDocLeadingAsterisks,
|
|
105515
|
+
hasLeadingAsterisks,
|
|
105510
105516
|
tryScan,
|
|
105511
105517
|
lookAhead,
|
|
105512
105518
|
scanRange
|
|
@@ -106116,7 +106122,7 @@ ${lanes.join("\n")}
|
|
|
106116
106122
|
function scan3() {
|
|
106117
106123
|
fullStartPos = pos;
|
|
106118
106124
|
tokenFlags = 0;
|
|
106119
|
-
|
|
106125
|
+
asteriskSeen = false;
|
|
106120
106126
|
while (true) {
|
|
106121
106127
|
tokenStart = pos;
|
|
106122
106128
|
if (pos >= end) {
|
|
@@ -107991,6 +107997,9 @@ ${lanes.join("\n")}
|
|
|
107991
107997
|
function setSkipJsDocLeadingAsterisks(skip3) {
|
|
107992
107998
|
skipJsDocLeadingAsterisks += skip3 ? 1 : -1;
|
|
107993
107999
|
}
|
|
108000
|
+
function hasLeadingAsterisks() {
|
|
108001
|
+
return asteriskSeen;
|
|
108002
|
+
}
|
|
107994
108003
|
}
|
|
107995
108004
|
function codePointAt2(s2, i3) {
|
|
107996
108005
|
return s2.codePointAt(i3);
|
|
@@ -109953,7 +109962,7 @@ ${lanes.join("\n")}
|
|
|
109953
109962
|
}
|
|
109954
109963
|
if (isJSDocNode(node) || node.kind === 12) {
|
|
109955
109964
|
return skipTrivia(
|
|
109956
|
-
(sourceFile
|
|
109965
|
+
(sourceFile ?? getSourceFileOfNode(node)).text,
|
|
109957
109966
|
node.pos,
|
|
109958
109967
|
/*stopAfterLineBreak*/
|
|
109959
109968
|
false,
|
|
@@ -109965,13 +109974,14 @@ ${lanes.join("\n")}
|
|
|
109965
109974
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
109966
109975
|
}
|
|
109967
109976
|
if (node.kind === 352) {
|
|
109968
|
-
|
|
109977
|
+
sourceFile ?? (sourceFile = getSourceFileOfNode(node));
|
|
109978
|
+
const first22 = firstOrUndefined(getNodeChildren(node, sourceFile));
|
|
109969
109979
|
if (first22) {
|
|
109970
109980
|
return getTokenPosOfNode(first22, sourceFile, includeJsDoc);
|
|
109971
109981
|
}
|
|
109972
109982
|
}
|
|
109973
109983
|
return skipTrivia(
|
|
109974
|
-
(sourceFile
|
|
109984
|
+
(sourceFile ?? getSourceFileOfNode(node)).text,
|
|
109975
109985
|
node.pos,
|
|
109976
109986
|
/*stopAfterLineBreak*/
|
|
109977
109987
|
false,
|
|
@@ -113574,11 +113584,11 @@ ${lanes.join("\n")}
|
|
|
113574
113584
|
return emitOutputFilePathWithoutExtension + extension;
|
|
113575
113585
|
}
|
|
113576
113586
|
function getDeclarationEmitOutputFilePath(fileName, host) {
|
|
113577
|
-
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host
|
|
113587
|
+
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host);
|
|
113578
113588
|
}
|
|
113579
|
-
function getDeclarationEmitOutputFilePathWorker(fileName, options,
|
|
113589
|
+
function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
|
|
113580
113590
|
const outputDir = options.declarationDir || options.outDir;
|
|
113581
|
-
const path40 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir,
|
|
113591
|
+
const path40 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f2) => host.getCanonicalFileName(f2)) : fileName;
|
|
113582
113592
|
const declarationExtension = getDeclarationEmitExtensionForPath(path40);
|
|
113583
113593
|
return removeFileExtension(path40) + declarationExtension;
|
|
113584
113594
|
}
|
|
@@ -122164,7 +122174,7 @@ ${lanes.join("\n")}
|
|
|
122164
122174
|
352
|
|
122165
122175
|
/* SyntaxList */
|
|
122166
122176
|
);
|
|
122167
|
-
|
|
122177
|
+
node._children = children;
|
|
122168
122178
|
return node;
|
|
122169
122179
|
}
|
|
122170
122180
|
function createNotEmittedStatement(original) {
|
|
@@ -125101,17 +125111,43 @@ ${lanes.join("\n")}
|
|
|
125101
125111
|
function isSyntaxList(n2) {
|
|
125102
125112
|
return n2.kind === 352;
|
|
125103
125113
|
}
|
|
125104
|
-
var
|
|
125105
|
-
function getNodeChildren(node) {
|
|
125106
|
-
|
|
125107
|
-
|
|
125114
|
+
var sourceFileToNodeChildren = /* @__PURE__ */ new WeakMap();
|
|
125115
|
+
function getNodeChildren(node, sourceFile) {
|
|
125116
|
+
var _a;
|
|
125117
|
+
const kind = node.kind;
|
|
125118
|
+
if (!isNodeKind(kind)) {
|
|
125119
|
+
return emptyArray;
|
|
125120
|
+
}
|
|
125121
|
+
if (kind === 352) {
|
|
125122
|
+
return node._children;
|
|
125123
|
+
}
|
|
125124
|
+
return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);
|
|
125108
125125
|
}
|
|
125109
|
-
function setNodeChildren(node, children) {
|
|
125110
|
-
|
|
125126
|
+
function setNodeChildren(node, sourceFile, children) {
|
|
125127
|
+
if (node.kind === 352) {
|
|
125128
|
+
Debug.fail("Should not need to re-set the children of a SyntaxList.");
|
|
125129
|
+
}
|
|
125130
|
+
let map22 = sourceFileToNodeChildren.get(sourceFile);
|
|
125131
|
+
if (map22 === void 0) {
|
|
125132
|
+
map22 = /* @__PURE__ */ new WeakMap();
|
|
125133
|
+
sourceFileToNodeChildren.set(sourceFile, map22);
|
|
125134
|
+
}
|
|
125135
|
+
map22.set(node, children);
|
|
125111
125136
|
return children;
|
|
125112
125137
|
}
|
|
125113
|
-
function unsetNodeChildren(node) {
|
|
125114
|
-
|
|
125138
|
+
function unsetNodeChildren(node, origSourceFile) {
|
|
125139
|
+
var _a;
|
|
125140
|
+
if (node.kind === 352) {
|
|
125141
|
+
Debug.fail("Did not expect to unset the children of a SyntaxList.");
|
|
125142
|
+
}
|
|
125143
|
+
(_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node);
|
|
125144
|
+
}
|
|
125145
|
+
function transferSourceFileChildren(sourceFile, targetSourceFile) {
|
|
125146
|
+
const map22 = sourceFileToNodeChildren.get(sourceFile);
|
|
125147
|
+
if (map22 !== void 0) {
|
|
125148
|
+
sourceFileToNodeChildren.delete(sourceFile);
|
|
125149
|
+
sourceFileToNodeChildren.set(targetSourceFile, map22);
|
|
125150
|
+
}
|
|
125115
125151
|
}
|
|
125116
125152
|
function createEmptyExports(factory2) {
|
|
125117
125153
|
return factory2.createExportDeclaration(
|
|
@@ -128419,7 +128455,7 @@ ${lanes.join("\n")}
|
|
|
128419
128455
|
function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {
|
|
128420
128456
|
if (isIdentifier3) {
|
|
128421
128457
|
identifierCount++;
|
|
128422
|
-
const pos = getNodePos();
|
|
128458
|
+
const pos = scanner2.hasLeadingAsterisks() ? scanner2.getTokenStart() : getNodePos();
|
|
128423
128459
|
const originalKeywordKind = token();
|
|
128424
128460
|
const text = internIdentifier(scanner2.getTokenValue());
|
|
128425
128461
|
const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
|
|
@@ -135260,6 +135296,7 @@ ${lanes.join("\n")}
|
|
|
135260
135296
|
aggressiveChecks
|
|
135261
135297
|
);
|
|
135262
135298
|
result.impliedNodeFormat = sourceFile.impliedNodeFormat;
|
|
135299
|
+
transferSourceFileChildren(sourceFile, result);
|
|
135263
135300
|
return result;
|
|
135264
135301
|
}
|
|
135265
135302
|
IncrementalParser2.updateSourceFile = updateSourceFile2;
|
|
@@ -135295,7 +135332,7 @@ ${lanes.join("\n")}
|
|
|
135295
135332
|
}
|
|
135296
135333
|
}
|
|
135297
135334
|
}
|
|
135298
|
-
function moveElementEntirelyPastChangeRange(element, isArray22, delta, oldText, newText, aggressiveChecks) {
|
|
135335
|
+
function moveElementEntirelyPastChangeRange(element, origSourceFile, isArray22, delta, oldText, newText, aggressiveChecks) {
|
|
135299
135336
|
if (isArray22) {
|
|
135300
135337
|
visitArray2(element);
|
|
135301
135338
|
} else {
|
|
@@ -135307,7 +135344,7 @@ ${lanes.join("\n")}
|
|
|
135307
135344
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
135308
135345
|
text = oldText.substring(node.pos, node.end);
|
|
135309
135346
|
}
|
|
135310
|
-
unsetNodeChildren(node);
|
|
135347
|
+
unsetNodeChildren(node, origSourceFile);
|
|
135311
135348
|
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
|
135312
135349
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
135313
135350
|
Debug.assert(text === newText.substring(node.pos, node.end));
|
|
@@ -135381,6 +135418,7 @@ ${lanes.join("\n")}
|
|
|
135381
135418
|
if (child.pos > changeRangeOldEnd) {
|
|
135382
135419
|
moveElementEntirelyPastChangeRange(
|
|
135383
135420
|
child,
|
|
135421
|
+
sourceFile,
|
|
135384
135422
|
/*isArray*/
|
|
135385
135423
|
false,
|
|
135386
135424
|
delta,
|
|
@@ -135393,7 +135431,7 @@ ${lanes.join("\n")}
|
|
|
135393
135431
|
const fullEnd = child.end;
|
|
135394
135432
|
if (fullEnd >= changeStart) {
|
|
135395
135433
|
markAsIntersectingIncrementalChange(child);
|
|
135396
|
-
unsetNodeChildren(child);
|
|
135434
|
+
unsetNodeChildren(child, sourceFile);
|
|
135397
135435
|
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
|
135398
135436
|
forEachChild(child, visitNode3, visitArray2);
|
|
135399
135437
|
if (hasJSDocNodes(child)) {
|
|
@@ -135411,6 +135449,7 @@ ${lanes.join("\n")}
|
|
|
135411
135449
|
if (array.pos > changeRangeOldEnd) {
|
|
135412
135450
|
moveElementEntirelyPastChangeRange(
|
|
135413
135451
|
array,
|
|
135452
|
+
sourceFile,
|
|
135414
135453
|
/*isArray*/
|
|
135415
135454
|
true,
|
|
135416
135455
|
delta,
|
|
@@ -136123,7 +136162,6 @@ ${lanes.join("\n")}
|
|
|
136123
136162
|
affectsBuildInfo: true,
|
|
136124
136163
|
showInSimplifiedHelpView: true,
|
|
136125
136164
|
category: Diagnostics.Emit,
|
|
136126
|
-
transpileOptionValue: void 0,
|
|
136127
136165
|
defaultValueDescription: false,
|
|
136128
136166
|
description: Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
136129
136167
|
},
|
|
@@ -136452,6 +136490,7 @@ ${lanes.join("\n")}
|
|
|
136452
136490
|
type: "boolean",
|
|
136453
136491
|
affectsEmit: true,
|
|
136454
136492
|
affectsBuildInfo: true,
|
|
136493
|
+
affectsSourceFile: true,
|
|
136455
136494
|
category: Diagnostics.Emit,
|
|
136456
136495
|
description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
136457
136496
|
defaultValueDescription: false
|
|
@@ -136919,6 +136958,7 @@ ${lanes.join("\n")}
|
|
|
136919
136958
|
affectsEmit: true,
|
|
136920
136959
|
affectsBuildInfo: true,
|
|
136921
136960
|
affectsModuleResolution: true,
|
|
136961
|
+
affectsSourceFile: true,
|
|
136922
136962
|
category: Diagnostics.Language_and_Environment,
|
|
136923
136963
|
description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
136924
136964
|
defaultValueDescription: "react"
|
|
@@ -146551,7 +146591,8 @@ ${lanes.join("\n")}
|
|
|
146551
146591
|
isUndefinedIdentifierExpression(node) {
|
|
146552
146592
|
Debug.assert(isExpressionNode(node));
|
|
146553
146593
|
return getSymbolAtLocation(node) === undefinedSymbol;
|
|
146554
|
-
}
|
|
146594
|
+
},
|
|
146595
|
+
isDefinitelyReferenceToGlobalSymbolObject
|
|
146555
146596
|
});
|
|
146556
146597
|
var evaluate = createEvaluator({
|
|
146557
146598
|
evaluateElementAccessExpression,
|
|
@@ -147416,6 +147457,7 @@ ${lanes.join("\n")}
|
|
|
147416
147457
|
};
|
|
147417
147458
|
var amalgamatedDuplicates;
|
|
147418
147459
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
|
147460
|
+
var reverseHomomorphicMappedCache = /* @__PURE__ */ new Map();
|
|
147419
147461
|
var ambientModulesCache;
|
|
147420
147462
|
var patternAmbientModules;
|
|
147421
147463
|
var patternAmbientModuleAugmentations;
|
|
@@ -147543,6 +147585,21 @@ ${lanes.join("\n")}
|
|
|
147543
147585
|
];
|
|
147544
147586
|
initializeTypeChecker();
|
|
147545
147587
|
return checker;
|
|
147588
|
+
function isDefinitelyReferenceToGlobalSymbolObject(node) {
|
|
147589
|
+
if (!isPropertyAccessExpression(node)) return false;
|
|
147590
|
+
if (!isIdentifier(node.name)) return false;
|
|
147591
|
+
if (!isPropertyAccessExpression(node.expression) && !isIdentifier(node.expression)) return false;
|
|
147592
|
+
if (isIdentifier(node.expression)) {
|
|
147593
|
+
return idText(node.expression) === "Symbol" && getResolvedSymbol(node.expression) === (getGlobalSymbol(
|
|
147594
|
+
"Symbol",
|
|
147595
|
+
111551 | 1048576,
|
|
147596
|
+
/*diagnostic*/
|
|
147597
|
+
void 0
|
|
147598
|
+
) || unknownSymbol);
|
|
147599
|
+
}
|
|
147600
|
+
if (!isIdentifier(node.expression.expression)) return false;
|
|
147601
|
+
return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;
|
|
147602
|
+
}
|
|
147546
147603
|
function getCachedType(key) {
|
|
147547
147604
|
return key ? cachedTypes.get(key) : void 0;
|
|
147548
147605
|
}
|
|
@@ -150932,11 +150989,11 @@ ${lanes.join("\n")}
|
|
|
150932
150989
|
function tryReuseExistingTypeNode(context, typeNode, type2, host2, addUndefined) {
|
|
150933
150990
|
const originalType = type2;
|
|
150934
150991
|
if (addUndefined) {
|
|
150935
|
-
type2 = getOptionalType(type2);
|
|
150992
|
+
type2 = getOptionalType(type2, !isParameter(host2));
|
|
150936
150993
|
}
|
|
150937
150994
|
const clone2 = tryReuseExistingNonParameterTypeNode(context, typeNode, type2, host2);
|
|
150938
150995
|
if (clone2) {
|
|
150939
|
-
if (addUndefined && !someType(getTypeFromTypeNode2(context, typeNode), (t2) => !!(t2.flags & 32768))) {
|
|
150996
|
+
if (addUndefined && containsNonMissingUndefinedType(type2) && !someType(getTypeFromTypeNode2(context, typeNode), (t2) => !!(t2.flags & 32768))) {
|
|
150940
150997
|
return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(
|
|
150941
150998
|
157
|
|
150942
150999
|
/* UndefinedKeyword */
|
|
@@ -151922,7 +151979,21 @@ ${lanes.join("\n")}
|
|
|
151922
151979
|
}
|
|
151923
151980
|
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
|
151924
151981
|
var _a;
|
|
151925
|
-
|
|
151982
|
+
const depth2 = 3;
|
|
151983
|
+
return !!(getCheckFlags(propertySymbol) & 8192) && (contains2(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16) || isDeeplyNestedReverseMappedTypeProperty());
|
|
151984
|
+
function isDeeplyNestedReverseMappedTypeProperty() {
|
|
151985
|
+
var _a2;
|
|
151986
|
+
if ((((_a2 = context.reverseMappedStack) == null ? void 0 : _a2.length) ?? 0) < depth2) {
|
|
151987
|
+
return false;
|
|
151988
|
+
}
|
|
151989
|
+
for (let i3 = 0; i3 < depth2; i3++) {
|
|
151990
|
+
const prop = context.reverseMappedStack[context.reverseMappedStack.length - 1 - i3];
|
|
151991
|
+
if (prop.links.mappedType.symbol !== propertySymbol.links.mappedType.symbol) {
|
|
151992
|
+
return false;
|
|
151993
|
+
}
|
|
151994
|
+
}
|
|
151995
|
+
return true;
|
|
151996
|
+
}
|
|
151926
151997
|
}
|
|
151927
151998
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
151928
151999
|
var _a;
|
|
@@ -153126,8 +153197,8 @@ ${lanes.join("\n")}
|
|
|
153126
153197
|
return enclosingDeclaration;
|
|
153127
153198
|
}
|
|
153128
153199
|
function serializeTypeForDeclaration(context, declaration, type2, symbol) {
|
|
153129
|
-
var _a;
|
|
153130
|
-
const
|
|
153200
|
+
var _a, _b;
|
|
153201
|
+
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
|
|
153131
153202
|
const enclosingDeclaration = context.enclosingDeclaration;
|
|
153132
153203
|
const oldFlags = context.flags;
|
|
153133
153204
|
if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648)) {
|
|
@@ -153138,6 +153209,7 @@ ${lanes.join("\n")}
|
|
|
153138
153209
|
const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol);
|
|
153139
153210
|
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
|
153140
153211
|
const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
|
153212
|
+
const addUndefined = addUndefinedForParameter || !!(symbol.flags & 4 && symbol.flags & 16777216 && isOptionalDeclaration(declWithExistingAnnotation) && ((_a = symbol.links) == null ? void 0 : _a.mappedType) && containsNonMissingUndefinedType(type2));
|
|
153141
153213
|
const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type2, declWithExistingAnnotation, addUndefined);
|
|
153142
153214
|
if (result2) {
|
|
153143
153215
|
context.flags = oldFlags;
|
|
@@ -153148,9 +153220,9 @@ ${lanes.join("\n")}
|
|
|
153148
153220
|
if (type2.flags & 8192 && type2.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d3) => getSourceFileOfNode(d3) === getSourceFileOfNode(context.enclosingDeclaration)))) {
|
|
153149
153221
|
context.flags |= 1048576;
|
|
153150
153222
|
}
|
|
153151
|
-
const decl = declaration ?? symbol.valueDeclaration ?? ((
|
|
153223
|
+
const decl = declaration ?? symbol.valueDeclaration ?? ((_b = symbol.declarations) == null ? void 0 : _b[0]);
|
|
153152
153224
|
const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
|
|
153153
|
-
const result = expressionOrTypeToTypeNode(context, expr, type2,
|
|
153225
|
+
const result = expressionOrTypeToTypeNode(context, expr, type2, addUndefinedForParameter);
|
|
153154
153226
|
context.flags = oldFlags;
|
|
153155
153227
|
return result;
|
|
153156
153228
|
}
|
|
@@ -153192,9 +153264,9 @@ ${lanes.join("\n")}
|
|
|
153192
153264
|
const typePredicate = getTypePredicateOfSignature(signature);
|
|
153193
153265
|
const type2 = getReturnTypeOfSignature(signature);
|
|
153194
153266
|
if (context.enclosingDeclaration && (!isErrorType(type2) || context.flags & 1) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
|
153195
|
-
const annotation =
|
|
153196
|
-
if (annotation
|
|
153197
|
-
const result =
|
|
153267
|
+
const annotation = getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
|
153268
|
+
if (annotation) {
|
|
153269
|
+
const result = tryReuseExistingTypeNode(context, annotation, type2, context.enclosingDeclaration);
|
|
153198
153270
|
if (result) {
|
|
153199
153271
|
return result;
|
|
153200
153272
|
}
|
|
@@ -153720,7 +153792,10 @@ ${lanes.join("\n")}
|
|
|
153720
153792
|
);
|
|
153721
153793
|
}
|
|
153722
153794
|
if (isNamedDeclaration(node) && node.name.kind === 167 && !isLateBindableName(node.name)) {
|
|
153723
|
-
if (!
|
|
153795
|
+
if (!hasDynamicName(node)) {
|
|
153796
|
+
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
153797
|
+
}
|
|
153798
|
+
if (!(context.flags & 1 && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1)) {
|
|
153724
153799
|
return void 0;
|
|
153725
153800
|
}
|
|
153726
153801
|
}
|
|
@@ -153853,7 +153928,7 @@ ${lanes.join("\n")}
|
|
|
153853
153928
|
if (result) {
|
|
153854
153929
|
if (result.pos !== -1 || result.end !== -1) {
|
|
153855
153930
|
if (result === nodes) {
|
|
153856
|
-
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
|
153931
|
+
result = factory.createNodeArray(nodes.slice(), nodes.hasTrailingComma);
|
|
153857
153932
|
}
|
|
153858
153933
|
setTextRangePosEnd(result, -1, -1);
|
|
153859
153934
|
}
|
|
@@ -160278,7 +160353,7 @@ ${lanes.join("\n")}
|
|
|
160278
160353
|
);
|
|
160279
160354
|
}
|
|
160280
160355
|
function createSignatureTypeMapper(signature, typeArguments) {
|
|
160281
|
-
return createTypeMapper(signature.typeParameters, typeArguments);
|
|
160356
|
+
return createTypeMapper(sameMap(signature.typeParameters, (tp) => tp.mapper ? instantiateType(tp, tp.mapper) : tp), typeArguments);
|
|
160282
160357
|
}
|
|
160283
160358
|
function getErasedSignature(signature) {
|
|
160284
160359
|
return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;
|
|
@@ -165116,6 +165191,10 @@ ${lanes.join("\n")}
|
|
|
165116
165191
|
function containsUndefinedType(type2) {
|
|
165117
165192
|
return !!((type2.flags & 1048576 ? type2.types[0] : type2).flags & 32768);
|
|
165118
165193
|
}
|
|
165194
|
+
function containsNonMissingUndefinedType(type2) {
|
|
165195
|
+
const candidate = type2.flags & 1048576 ? type2.types[0] : type2;
|
|
165196
|
+
return !!(candidate.flags & 32768) && candidate !== missingType;
|
|
165197
|
+
}
|
|
165119
165198
|
function isStringIndexSignatureOnlyType(type2) {
|
|
165120
165199
|
return type2.flags & 524288 && !isGenericMappedType(type2) && getPropertiesOfType(type2).length === 0 && getIndexInfosOfType(type2).length === 1 && !!getIndexInfoOfType(type2, stringType2) || type2.flags & 3145728 && every(type2.types, isStringIndexSignatureOnlyType) || false;
|
|
165121
165200
|
}
|
|
@@ -168994,11 +169073,11 @@ ${lanes.join("\n")}
|
|
|
168994
169073
|
}
|
|
168995
169074
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
168996
169075
|
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
168997
|
-
if (
|
|
168998
|
-
return
|
|
169076
|
+
if (reverseHomomorphicMappedCache.has(cacheKey)) {
|
|
169077
|
+
return reverseHomomorphicMappedCache.get(cacheKey);
|
|
168999
169078
|
}
|
|
169000
169079
|
const type2 = createReverseMappedType(source, target, constraint);
|
|
169001
|
-
|
|
169080
|
+
reverseHomomorphicMappedCache.set(cacheKey, type2);
|
|
169002
169081
|
return type2;
|
|
169003
169082
|
}
|
|
169004
169083
|
function isPartiallyInferableType(type2) {
|
|
@@ -172550,7 +172629,7 @@ ${lanes.join("\n")}
|
|
|
172550
172629
|
if (!canCollectSymbolAliasAccessabilityData) {
|
|
172551
172630
|
return;
|
|
172552
172631
|
}
|
|
172553
|
-
if (location2.flags & 33554432) {
|
|
172632
|
+
if (location2.flags & 33554432 && !isPropertySignature(location2) && !isPropertyDeclaration(location2)) {
|
|
172554
172633
|
return;
|
|
172555
172634
|
}
|
|
172556
172635
|
switch (hint) {
|
|
@@ -175744,11 +175823,7 @@ ${lanes.join("\n")}
|
|
|
175744
175823
|
checkGrammarJsxElement(node);
|
|
175745
175824
|
}
|
|
175746
175825
|
checkJsxPreconditions(node);
|
|
175747
|
-
|
|
175748
|
-
node,
|
|
175749
|
-
4
|
|
175750
|
-
/* Jsx */
|
|
175751
|
-
);
|
|
175826
|
+
markJsxAliasReferenced(node);
|
|
175752
175827
|
if (isNodeOpeningLikeElement) {
|
|
175753
175828
|
const jsxOpeningLikeNode = node;
|
|
175754
175829
|
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
|
@@ -189522,15 +189597,14 @@ ${lanes.join("\n")}
|
|
|
189522
189597
|
function checkChildIdentifiers(node2) {
|
|
189523
189598
|
forEachNodeRecursively(node2, checkIdentifiers);
|
|
189524
189599
|
}
|
|
189600
|
+
function isExpressionNodeOrShorthandPropertyAssignmentName(node2) {
|
|
189601
|
+
return isExpressionNode(node2) || isShorthandPropertyAssignment(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2;
|
|
189602
|
+
}
|
|
189525
189603
|
function checkSingleIdentifier(node2) {
|
|
189526
189604
|
const nodeLinks2 = getNodeLinks(node2);
|
|
189527
189605
|
nodeLinks2.calculatedFlags |= 536870912 | 16384 | 32768;
|
|
189528
|
-
if (isIdentifier(node2) &&
|
|
189529
|
-
const s2 =
|
|
189530
|
-
node2,
|
|
189531
|
-
/*ignoreErrors*/
|
|
189532
|
-
true
|
|
189533
|
-
);
|
|
189606
|
+
if (isIdentifier(node2) && isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
|
189607
|
+
const s2 = getResolvedSymbol(node2);
|
|
189534
189608
|
if (s2 && s2 !== unknownSymbol) {
|
|
189535
189609
|
checkIdentifierCalculateNodeCheckFlags(node2, s2);
|
|
189536
189610
|
}
|
|
@@ -190047,7 +190121,8 @@ ${lanes.join("\n")}
|
|
|
190047
190121
|
resolveExternalModuleSymbol(sym);
|
|
190048
190122
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
|
|
190049
190123
|
},
|
|
190050
|
-
isImportRequiredByAugmentation
|
|
190124
|
+
isImportRequiredByAugmentation,
|
|
190125
|
+
isDefinitelyReferenceToGlobalSymbolObject
|
|
190051
190126
|
};
|
|
190052
190127
|
function isImportRequiredByAugmentation(node) {
|
|
190053
190128
|
const file = getSourceFileOfNode(node);
|
|
@@ -217328,6 +217403,7 @@ ${lanes.join("\n")}
|
|
|
217328
217403
|
}
|
|
217329
217404
|
function reportInferenceFallback(node) {
|
|
217330
217405
|
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
|
217406
|
+
if (getSourceFileOfNode(node) !== currentSourceFile) return;
|
|
217331
217407
|
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
|
|
217332
217408
|
reportExpandoFunctionErrors(node);
|
|
217333
217409
|
} else {
|
|
@@ -217987,15 +218063,17 @@ ${lanes.join("\n")}
|
|
|
217987
218063
|
if (isDeclarationAndNotVisible(input)) return;
|
|
217988
218064
|
if (hasDynamicName(input)) {
|
|
217989
218065
|
if (isolatedDeclarations) {
|
|
217990
|
-
if (
|
|
217991
|
-
|
|
217992
|
-
|
|
217993
|
-
|
|
217994
|
-
|
|
217995
|
-
|
|
217996
|
-
|
|
217997
|
-
|
|
217998
|
-
|
|
218066
|
+
if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) {
|
|
218067
|
+
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
|
218068
|
+
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
|
218069
|
+
return;
|
|
218070
|
+
} else if (
|
|
218071
|
+
// Type declarations just need to double-check that the input computed name is an entity name expression
|
|
218072
|
+
(isInterfaceDeclaration(input.parent) || isTypeLiteralNode(input.parent)) && !isEntityNameExpression(input.name.expression)
|
|
218073
|
+
) {
|
|
218074
|
+
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
|
|
218075
|
+
return;
|
|
218076
|
+
}
|
|
217999
218077
|
}
|
|
218000
218078
|
} else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
|
218001
218079
|
return;
|
|
@@ -219875,7 +219953,7 @@ ${lanes.join("\n")}
|
|
|
219875
219953
|
noEmitHelpers: true,
|
|
219876
219954
|
module: compilerOptions.module,
|
|
219877
219955
|
target: compilerOptions.target,
|
|
219878
|
-
sourceMap:
|
|
219956
|
+
sourceMap: emitOnly !== 2 && compilerOptions.declarationMap,
|
|
219879
219957
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
219880
219958
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
219881
219959
|
onlyPrintJsDocStyle: true,
|
|
@@ -220102,7 +220180,8 @@ ${lanes.join("\n")}
|
|
|
220102
220180
|
getJsxFragmentFactoryEntity: notImplemented,
|
|
220103
220181
|
isBindingCapturedByNode: notImplemented,
|
|
220104
220182
|
getDeclarationStatementsForSourceFile: notImplemented,
|
|
220105
|
-
isImportRequiredByAugmentation: notImplemented
|
|
220183
|
+
isImportRequiredByAugmentation: notImplemented,
|
|
220184
|
+
isDefinitelyReferenceToGlobalSymbolObject: notImplemented
|
|
220106
220185
|
};
|
|
220107
220186
|
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
|
220108
220187
|
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
|
@@ -228498,7 +228577,8 @@ ${lanes.join("\n")}
|
|
|
228498
228577
|
if (options.outDir || // there is --outDir specified
|
|
228499
228578
|
options.rootDir || // there is --rootDir specified
|
|
228500
228579
|
options.sourceRoot || // there is --sourceRoot specified
|
|
228501
|
-
options.mapRoot
|
|
228580
|
+
options.mapRoot || // there is --mapRoot specified
|
|
228581
|
+
getEmitDeclarations(options) && options.declarationDir) {
|
|
228502
228582
|
const dir = getCommonSourceDirectory2();
|
|
228503
228583
|
if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
|
|
228504
228584
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
@@ -229605,8 +229685,7 @@ ${lanes.join("\n")}
|
|
|
229605
229685
|
);
|
|
229606
229686
|
},
|
|
229607
229687
|
cancellationToken,
|
|
229608
|
-
|
|
229609
|
-
true,
|
|
229688
|
+
2,
|
|
229610
229689
|
/*customTransformers*/
|
|
229611
229690
|
void 0,
|
|
229612
229691
|
/*forceDtsEmit*/
|
|
@@ -237045,7 +237124,7 @@ ${lanes.join("\n")}
|
|
|
237045
237124
|
expression,
|
|
237046
237125
|
/*includeBigInt*/
|
|
237047
237126
|
false
|
|
237048
|
-
)) {
|
|
237127
|
+
) && !resolver.isDefinitelyReferenceToGlobalSymbolObject(expression)) {
|
|
237049
237128
|
context.tracker.reportInferenceFallback(prop.name);
|
|
237050
237129
|
result = false;
|
|
237051
237130
|
}
|
|
@@ -241160,6 +241239,7 @@ ${lanes.join("\n")}
|
|
|
241160
241239
|
function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, preferCapitalizedNames, cb) {
|
|
241161
241240
|
let chain;
|
|
241162
241241
|
let current2 = defaultExport;
|
|
241242
|
+
const seen = /* @__PURE__ */ new Map();
|
|
241163
241243
|
while (current2) {
|
|
241164
241244
|
const fromDeclaration = getDefaultLikeExportNameFromDeclaration(current2);
|
|
241165
241245
|
if (fromDeclaration) {
|
|
@@ -241171,6 +241251,7 @@ ${lanes.join("\n")}
|
|
|
241171
241251
|
if (final) return final;
|
|
241172
241252
|
}
|
|
241173
241253
|
chain = append(chain, current2);
|
|
241254
|
+
if (!addToSeen(seen, current2)) break;
|
|
241174
241255
|
current2 = current2.flags & 2097152 ? checker.getImmediateAliasedSymbol(current2) : void 0;
|
|
241175
241256
|
}
|
|
241176
241257
|
for (const symbol of chain ?? emptyArray) {
|
|
@@ -243782,7 +243863,7 @@ ${lanes.join("\n")}
|
|
|
243782
243863
|
}
|
|
243783
243864
|
const options = program2.getCompilerOptions();
|
|
243784
243865
|
const outPath = options.outFile;
|
|
243785
|
-
const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" : getDeclarationEmitOutputFilePathWorker(info.fileName, program2.getCompilerOptions(),
|
|
243866
|
+
const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" : getDeclarationEmitOutputFilePathWorker(info.fileName, program2.getCompilerOptions(), program2);
|
|
243786
243867
|
if (declarationPath === void 0) return void 0;
|
|
243787
243868
|
const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);
|
|
243788
243869
|
return newLoc === info ? void 0 : newLoc;
|
|
@@ -250875,9 +250956,9 @@ ${newComment.split("\n").map((c3) => ` * ${c3}`).join("\n")}
|
|
|
250875
250956
|
getChildAt(index2, sourceFile) {
|
|
250876
250957
|
return this.getChildren(sourceFile)[index2];
|
|
250877
250958
|
}
|
|
250878
|
-
getChildren(sourceFile) {
|
|
250959
|
+
getChildren(sourceFile = getSourceFileOfNode(this)) {
|
|
250879
250960
|
this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine");
|
|
250880
|
-
return getNodeChildren(this) ?? setNodeChildren(this, createChildren(this, sourceFile));
|
|
250961
|
+
return getNodeChildren(this, sourceFile) ?? setNodeChildren(this, sourceFile, createChildren(this, sourceFile));
|
|
250881
250962
|
}
|
|
250882
250963
|
getFirstToken(sourceFile) {
|
|
250883
250964
|
this.assertHasRealPosition();
|
|
@@ -250962,7 +251043,7 @@ ${newComment.split("\n").map((c3) => ` * ${c3}`).join("\n")}
|
|
|
250962
251043
|
pos = node.end;
|
|
250963
251044
|
}
|
|
250964
251045
|
addSyntheticNodes(children, pos, nodes.end, parent2);
|
|
250965
|
-
|
|
251046
|
+
list._children = children;
|
|
250966
251047
|
return list;
|
|
250967
251048
|
}
|
|
250968
251049
|
var TokenOrIdentifierObject = class {
|
|
@@ -264552,6 +264633,14 @@ ${newComment.split("\n").map((c3) => ` * ${c3}`).join("\n")}
|
|
|
264552
264633
|
function visit3(node) {
|
|
264553
264634
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
|
264554
264635
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
|
264636
|
+
if (!firstIdentifier.symbol) {
|
|
264637
|
+
return visitEachChild(
|
|
264638
|
+
node,
|
|
264639
|
+
visit3,
|
|
264640
|
+
/*context*/
|
|
264641
|
+
void 0
|
|
264642
|
+
);
|
|
264643
|
+
}
|
|
264555
264644
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
|
264556
264645
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
|
264557
264646
|
symbols = append(symbols, firstIdentifier.symbol);
|
|
@@ -271131,7 +271220,7 @@ ${newComment.split("\n").map((c3) => ` * ${c3}`).join("\n")}
|
|
|
271131
271220
|
return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
|
|
271132
271221
|
}
|
|
271133
271222
|
function getSourceFileLikeForImportDeclaration(node) {
|
|
271134
|
-
if (node.kind === 213) {
|
|
271223
|
+
if (node.kind === 213 || node.kind === 351) {
|
|
271135
271224
|
return node.getSourceFile();
|
|
271136
271225
|
}
|
|
271137
271226
|
const { parent: parent2 } = node;
|
|
@@ -285510,6 +285599,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
285510
285599
|
trace: () => trace2,
|
|
285511
285600
|
tracing: () => tracing,
|
|
285512
285601
|
tracingEnabled: () => tracingEnabled,
|
|
285602
|
+
transferSourceFileChildren: () => transferSourceFileChildren,
|
|
285513
285603
|
transform: () => transform6,
|
|
285514
285604
|
transformClassFields: () => transformClassFields,
|
|
285515
285605
|
transformDeclarations: () => transformDeclarations,
|
|
@@ -288320,7 +288410,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
288320
288410
|
this.generatedFilesMap.forEach((watcher, source) => {
|
|
288321
288411
|
const sourceFile = this.program.getSourceFileByPath(source);
|
|
288322
288412
|
if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher(
|
|
288323
|
-
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.
|
|
288413
|
+
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program),
|
|
288324
288414
|
watcher
|
|
288325
288415
|
)) {
|
|
288326
288416
|
closeFileWatcherOf(watcher);
|