Update checked-in dependencies
This commit is contained in:
parent
ee304a3057
commit
ca2d8a2534
6 changed files with 319 additions and 155 deletions
12
node_modules/.package-lock.json
generated
vendored
12
node_modules/.package-lock.json
generated
vendored
|
|
@ -455,9 +455,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "9.7.0",
|
"version": "9.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.8.0.tgz",
|
||||||
"integrity": "sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==",
|
"integrity": "sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
|
|
@ -5659,9 +5659,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.5.3",
|
"version": "5.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
||||||
"integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
|
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|
|
||||||
2
node_modules/@eslint/js/package.json
generated
vendored
2
node_modules/@eslint/js/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@eslint/js",
|
"name": "@eslint/js",
|
||||||
"version": "9.7.0",
|
"version": "9.8.0",
|
||||||
"description": "ESLint JavaScript language implementation",
|
"description": "ESLint JavaScript language implementation",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
|
|
|
||||||
10
node_modules/typescript/lib/lib.es2023.array.d.ts
generated
vendored
10
node_modules/typescript/lib/lib.es2023.array.d.ts
generated
vendored
|
|
@ -203,7 +203,7 @@ interface Int8Array {
|
||||||
/**
|
/**
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
* Copies the array and returns the copy with the elements in reverse order.
|
||||||
*/
|
*/
|
||||||
toReversed(): Uint8Array;
|
toReversed(): Int8Array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies and sorts the array.
|
* Copies and sorts the array.
|
||||||
|
|
@ -211,11 +211,11 @@ interface Int8Array {
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
* value otherwise. If omitted, the elements are sorted in ascending order.
|
||||||
* ```ts
|
* ```ts
|
||||||
* const myNums = Uint8Array.from([11, 2, 22, 1]);
|
* const myNums = Int8Array.from([11, 2, 22, 1]);
|
||||||
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
|
* myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22]
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array;
|
toSorted(compareFn?: (a: number, b: number) => number): Int8Array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the array and inserts the given number at the provided index.
|
* Copies the array and inserts the given number at the provided index.
|
||||||
|
|
@ -224,7 +224,7 @@ interface Int8Array {
|
||||||
* @param value The value to insert into the copied array.
|
* @param value The value to insert into the copied array.
|
||||||
* @returns A copy of the original array with the inserted value.
|
* @returns A copy of the original array with the inserted value.
|
||||||
*/
|
*/
|
||||||
with(index: number, value: number): Uint8Array;
|
with(index: number, value: number): Int8Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Uint8Array {
|
interface Uint8Array {
|
||||||
|
|
|
||||||
179
node_modules/typescript/lib/tsc.js
generated
vendored
179
node_modules/typescript/lib/tsc.js
generated
vendored
|
|
@ -18,7 +18,7 @@ and limitations under the License.
|
||||||
|
|
||||||
// src/compiler/corePublic.ts
|
// src/compiler/corePublic.ts
|
||||||
var versionMajorMinor = "5.5";
|
var versionMajorMinor = "5.5";
|
||||||
var version = "5.5.3";
|
var version = "5.5.4";
|
||||||
|
|
||||||
// src/compiler/core.ts
|
// src/compiler/core.ts
|
||||||
var emptyArray = [];
|
var emptyArray = [];
|
||||||
|
|
@ -2509,10 +2509,12 @@ function tryGetPerformance() {
|
||||||
if (isNodeLikeSystem()) {
|
if (isNodeLikeSystem()) {
|
||||||
try {
|
try {
|
||||||
const { performance: performance2 } = require("perf_hooks");
|
const { performance: performance2 } = require("perf_hooks");
|
||||||
|
if (performance2) {
|
||||||
return {
|
return {
|
||||||
shouldWriteNativeEvents: false,
|
shouldWriteNativeEvents: false,
|
||||||
performance: performance2
|
performance: performance2
|
||||||
};
|
};
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -8547,6 +8549,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
var tokenFlags;
|
var tokenFlags;
|
||||||
var commentDirectives;
|
var commentDirectives;
|
||||||
var skipJsDocLeadingAsterisks = 0;
|
var skipJsDocLeadingAsterisks = 0;
|
||||||
|
var asteriskSeen = false;
|
||||||
var scriptKind = 0 /* Unknown */;
|
var scriptKind = 0 /* Unknown */;
|
||||||
var jsDocParsingMode = 0 /* ParseAll */;
|
var jsDocParsingMode = 0 /* ParseAll */;
|
||||||
setText(text, start, length2);
|
setText(text, start, length2);
|
||||||
|
|
@ -8598,6 +8601,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
resetTokenState,
|
resetTokenState,
|
||||||
setTextPos: resetTokenState,
|
setTextPos: resetTokenState,
|
||||||
setSkipJsDocLeadingAsterisks,
|
setSkipJsDocLeadingAsterisks,
|
||||||
|
hasLeadingAsterisks,
|
||||||
tryScan,
|
tryScan,
|
||||||
lookAhead,
|
lookAhead,
|
||||||
scanRange
|
scanRange
|
||||||
|
|
@ -9204,7 +9208,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
function scan() {
|
function scan() {
|
||||||
fullStartPos = pos;
|
fullStartPos = pos;
|
||||||
tokenFlags = 0 /* None */;
|
tokenFlags = 0 /* None */;
|
||||||
let asteriskSeen = false;
|
asteriskSeen = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
tokenStart = pos;
|
tokenStart = pos;
|
||||||
if (pos >= end) {
|
if (pos >= end) {
|
||||||
|
|
@ -11007,6 +11011,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
function setSkipJsDocLeadingAsterisks(skip) {
|
function setSkipJsDocLeadingAsterisks(skip) {
|
||||||
skipJsDocLeadingAsterisks += skip ? 1 : -1;
|
skipJsDocLeadingAsterisks += skip ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
function hasLeadingAsterisks() {
|
||||||
|
return asteriskSeen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function codePointAt(s, i) {
|
function codePointAt(s, i) {
|
||||||
return s.codePointAt(i);
|
return s.codePointAt(i);
|
||||||
|
|
@ -12745,7 +12752,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
||||||
}
|
}
|
||||||
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
||||||
return skipTrivia(
|
return skipTrivia(
|
||||||
(sourceFile || getSourceFileOfNode(node)).text,
|
(sourceFile ?? getSourceFileOfNode(node)).text,
|
||||||
node.pos,
|
node.pos,
|
||||||
/*stopAfterLineBreak*/
|
/*stopAfterLineBreak*/
|
||||||
false,
|
false,
|
||||||
|
|
@ -12757,13 +12764,14 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
||||||
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
||||||
}
|
}
|
||||||
if (node.kind === 352 /* SyntaxList */) {
|
if (node.kind === 352 /* SyntaxList */) {
|
||||||
const first2 = firstOrUndefined(getNodeChildren(node));
|
sourceFile ?? (sourceFile = getSourceFileOfNode(node));
|
||||||
|
const first2 = firstOrUndefined(getNodeChildren(node, sourceFile));
|
||||||
if (first2) {
|
if (first2) {
|
||||||
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return skipTrivia(
|
return skipTrivia(
|
||||||
(sourceFile || getSourceFileOfNode(node)).text,
|
(sourceFile ?? getSourceFileOfNode(node)).text,
|
||||||
node.pos,
|
node.pos,
|
||||||
/*stopAfterLineBreak*/
|
/*stopAfterLineBreak*/
|
||||||
false,
|
false,
|
||||||
|
|
@ -16086,11 +16094,11 @@ function getOwnEmitOutputFilePath(fileName, host, extension) {
|
||||||
return emitOutputFilePathWithoutExtension + extension;
|
return emitOutputFilePathWithoutExtension + extension;
|
||||||
}
|
}
|
||||||
function getDeclarationEmitOutputFilePath(fileName, host) {
|
function getDeclarationEmitOutputFilePath(fileName, host) {
|
||||||
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f));
|
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host);
|
||||||
}
|
}
|
||||||
function getDeclarationEmitOutputFilePathWorker(fileName, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
|
function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
|
||||||
const outputDir = options.declarationDir || options.outDir;
|
const outputDir = options.declarationDir || options.outDir;
|
||||||
const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName;
|
const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
|
||||||
const declarationExtension = getDeclarationEmitExtensionForPath(path);
|
const declarationExtension = getDeclarationEmitExtensionForPath(path);
|
||||||
return removeFileExtension(path) + declarationExtension;
|
return removeFileExtension(path) + declarationExtension;
|
||||||
}
|
}
|
||||||
|
|
@ -23436,7 +23444,7 @@ function createNodeFactory(flags, baseFactory2) {
|
||||||
}
|
}
|
||||||
function createSyntaxList(children) {
|
function createSyntaxList(children) {
|
||||||
const node = createBaseNode(352 /* SyntaxList */);
|
const node = createBaseNode(352 /* SyntaxList */);
|
||||||
setNodeChildren(node, children);
|
node._children = children;
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
function createNotEmittedStatement(original) {
|
function createNotEmittedStatement(original) {
|
||||||
|
|
@ -26204,17 +26212,31 @@ function isJSDocImportTag(node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/compiler/factory/nodeChildren.ts
|
// src/compiler/factory/nodeChildren.ts
|
||||||
var nodeChildren = /* @__PURE__ */ new WeakMap();
|
var sourceFileToNodeChildren = /* @__PURE__ */ new WeakMap();
|
||||||
function getNodeChildren(node) {
|
function getNodeChildren(node, sourceFile) {
|
||||||
if (!isNodeKind(node.kind)) return emptyArray;
|
var _a;
|
||||||
return nodeChildren.get(node);
|
const kind = node.kind;
|
||||||
|
if (!isNodeKind(kind)) {
|
||||||
|
return emptyArray;
|
||||||
}
|
}
|
||||||
function setNodeChildren(node, children) {
|
if (kind === 352 /* SyntaxList */) {
|
||||||
nodeChildren.set(node, children);
|
return node._children;
|
||||||
return children;
|
}
|
||||||
|
return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);
|
||||||
|
}
|
||||||
|
function unsetNodeChildren(node, origSourceFile) {
|
||||||
|
var _a;
|
||||||
|
if (node.kind === 352 /* SyntaxList */) {
|
||||||
|
Debug.fail("Did not expect to unset the children of a SyntaxList.");
|
||||||
|
}
|
||||||
|
(_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node);
|
||||||
|
}
|
||||||
|
function transferSourceFileChildren(sourceFile, targetSourceFile) {
|
||||||
|
const map2 = sourceFileToNodeChildren.get(sourceFile);
|
||||||
|
if (map2 !== void 0) {
|
||||||
|
sourceFileToNodeChildren.delete(sourceFile);
|
||||||
|
sourceFileToNodeChildren.set(targetSourceFile, map2);
|
||||||
}
|
}
|
||||||
function unsetNodeChildren(node) {
|
|
||||||
nodeChildren.delete(node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/compiler/factory/utilities.ts
|
// src/compiler/factory/utilities.ts
|
||||||
|
|
@ -28849,7 +28871,7 @@ var Parser;
|
||||||
function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {
|
function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {
|
||||||
if (isIdentifier3) {
|
if (isIdentifier3) {
|
||||||
identifierCount++;
|
identifierCount++;
|
||||||
const pos = getNodePos();
|
const pos = scanner.hasLeadingAsterisks() ? scanner.getTokenStart() : getNodePos();
|
||||||
const originalKeywordKind = token();
|
const originalKeywordKind = token();
|
||||||
const text = internIdentifier(scanner.getTokenValue());
|
const text = internIdentifier(scanner.getTokenValue());
|
||||||
const hasExtendedUnicodeEscape = scanner.hasExtendedUnicodeEscape();
|
const hasExtendedUnicodeEscape = scanner.hasExtendedUnicodeEscape();
|
||||||
|
|
@ -34785,6 +34807,7 @@ var IncrementalParser;
|
||||||
aggressiveChecks
|
aggressiveChecks
|
||||||
);
|
);
|
||||||
result.impliedNodeFormat = sourceFile.impliedNodeFormat;
|
result.impliedNodeFormat = sourceFile.impliedNodeFormat;
|
||||||
|
transferSourceFileChildren(sourceFile, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
IncrementalParser2.updateSourceFile = updateSourceFile;
|
IncrementalParser2.updateSourceFile = updateSourceFile;
|
||||||
|
|
@ -34820,7 +34843,7 @@ var IncrementalParser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) {
|
function moveElementEntirelyPastChangeRange(element, origSourceFile, isArray2, delta, oldText, newText, aggressiveChecks) {
|
||||||
if (isArray2) {
|
if (isArray2) {
|
||||||
visitArray2(element);
|
visitArray2(element);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -34832,7 +34855,7 @@ var IncrementalParser;
|
||||||
if (aggressiveChecks && shouldCheckNode(node)) {
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
||||||
text = oldText.substring(node.pos, node.end);
|
text = oldText.substring(node.pos, node.end);
|
||||||
}
|
}
|
||||||
unsetNodeChildren(node);
|
unsetNodeChildren(node, origSourceFile);
|
||||||
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
||||||
if (aggressiveChecks && shouldCheckNode(node)) {
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
||||||
Debug.assert(text === newText.substring(node.pos, node.end));
|
Debug.assert(text === newText.substring(node.pos, node.end));
|
||||||
|
|
@ -34906,6 +34929,7 @@ var IncrementalParser;
|
||||||
if (child.pos > changeRangeOldEnd) {
|
if (child.pos > changeRangeOldEnd) {
|
||||||
moveElementEntirelyPastChangeRange(
|
moveElementEntirelyPastChangeRange(
|
||||||
child,
|
child,
|
||||||
|
sourceFile,
|
||||||
/*isArray*/
|
/*isArray*/
|
||||||
false,
|
false,
|
||||||
delta,
|
delta,
|
||||||
|
|
@ -34918,7 +34942,7 @@ var IncrementalParser;
|
||||||
const fullEnd = child.end;
|
const fullEnd = child.end;
|
||||||
if (fullEnd >= changeStart) {
|
if (fullEnd >= changeStart) {
|
||||||
markAsIntersectingIncrementalChange(child);
|
markAsIntersectingIncrementalChange(child);
|
||||||
unsetNodeChildren(child);
|
unsetNodeChildren(child, sourceFile);
|
||||||
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
||||||
forEachChild(child, visitNode3, visitArray2);
|
forEachChild(child, visitNode3, visitArray2);
|
||||||
if (hasJSDocNodes(child)) {
|
if (hasJSDocNodes(child)) {
|
||||||
|
|
@ -34936,6 +34960,7 @@ var IncrementalParser;
|
||||||
if (array.pos > changeRangeOldEnd) {
|
if (array.pos > changeRangeOldEnd) {
|
||||||
moveElementEntirelyPastChangeRange(
|
moveElementEntirelyPastChangeRange(
|
||||||
array,
|
array,
|
||||||
|
sourceFile,
|
||||||
/*isArray*/
|
/*isArray*/
|
||||||
true,
|
true,
|
||||||
delta,
|
delta,
|
||||||
|
|
@ -35636,7 +35661,6 @@ var commonOptionsWithBuild = [
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
showInSimplifiedHelpView: true,
|
showInSimplifiedHelpView: true,
|
||||||
category: Diagnostics.Emit,
|
category: Diagnostics.Emit,
|
||||||
transpileOptionValue: void 0,
|
|
||||||
defaultValueDescription: false,
|
defaultValueDescription: false,
|
||||||
description: Diagnostics.Create_sourcemaps_for_d_ts_files
|
description: Diagnostics.Create_sourcemaps_for_d_ts_files
|
||||||
},
|
},
|
||||||
|
|
@ -35962,6 +35986,7 @@ var commandOptionsWithoutBuild = [
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
affectsEmit: true,
|
affectsEmit: true,
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
|
affectsSourceFile: true,
|
||||||
category: Diagnostics.Emit,
|
category: Diagnostics.Emit,
|
||||||
description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
||||||
defaultValueDescription: false
|
defaultValueDescription: false
|
||||||
|
|
@ -36426,6 +36451,7 @@ var commandOptionsWithoutBuild = [
|
||||||
affectsEmit: true,
|
affectsEmit: true,
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
affectsModuleResolution: true,
|
affectsModuleResolution: true,
|
||||||
|
affectsSourceFile: true,
|
||||||
category: Diagnostics.Language_and_Environment,
|
category: Diagnostics.Language_and_Environment,
|
||||||
description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
||||||
defaultValueDescription: "react"
|
defaultValueDescription: "react"
|
||||||
|
|
@ -45124,7 +45150,8 @@ function createTypeChecker(host) {
|
||||||
isUndefinedIdentifierExpression(node) {
|
isUndefinedIdentifierExpression(node) {
|
||||||
Debug.assert(isExpressionNode(node));
|
Debug.assert(isExpressionNode(node));
|
||||||
return getSymbolAtLocation(node) === undefinedSymbol;
|
return getSymbolAtLocation(node) === undefinedSymbol;
|
||||||
}
|
},
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject
|
||||||
});
|
});
|
||||||
var evaluate = createEvaluator({
|
var evaluate = createEvaluator({
|
||||||
evaluateElementAccessExpression,
|
evaluateElementAccessExpression,
|
||||||
|
|
@ -45954,6 +45981,7 @@ function createTypeChecker(host) {
|
||||||
};
|
};
|
||||||
var amalgamatedDuplicates;
|
var amalgamatedDuplicates;
|
||||||
var reverseMappedCache = /* @__PURE__ */ new Map();
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
||||||
|
var reverseHomomorphicMappedCache = /* @__PURE__ */ new Map();
|
||||||
var ambientModulesCache;
|
var ambientModulesCache;
|
||||||
var patternAmbientModules;
|
var patternAmbientModules;
|
||||||
var patternAmbientModuleAugmentations;
|
var patternAmbientModuleAugmentations;
|
||||||
|
|
@ -46081,6 +46109,21 @@ function createTypeChecker(host) {
|
||||||
];
|
];
|
||||||
initializeTypeChecker();
|
initializeTypeChecker();
|
||||||
return checker;
|
return checker;
|
||||||
|
function isDefinitelyReferenceToGlobalSymbolObject(node) {
|
||||||
|
if (!isPropertyAccessExpression(node)) return false;
|
||||||
|
if (!isIdentifier(node.name)) return false;
|
||||||
|
if (!isPropertyAccessExpression(node.expression) && !isIdentifier(node.expression)) return false;
|
||||||
|
if (isIdentifier(node.expression)) {
|
||||||
|
return idText(node.expression) === "Symbol" && getResolvedSymbol(node.expression) === (getGlobalSymbol(
|
||||||
|
"Symbol",
|
||||||
|
111551 /* Value */ | 1048576 /* ExportValue */,
|
||||||
|
/*diagnostic*/
|
||||||
|
void 0
|
||||||
|
) || unknownSymbol);
|
||||||
|
}
|
||||||
|
if (!isIdentifier(node.expression.expression)) return false;
|
||||||
|
return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;
|
||||||
|
}
|
||||||
function getCachedType(key) {
|
function getCachedType(key) {
|
||||||
return key ? cachedTypes.get(key) : void 0;
|
return key ? cachedTypes.get(key) : void 0;
|
||||||
}
|
}
|
||||||
|
|
@ -49293,11 +49336,11 @@ function createTypeChecker(host) {
|
||||||
function tryReuseExistingTypeNode(context, typeNode, type, host2, addUndefined) {
|
function tryReuseExistingTypeNode(context, typeNode, type, host2, addUndefined) {
|
||||||
const originalType = type;
|
const originalType = type;
|
||||||
if (addUndefined) {
|
if (addUndefined) {
|
||||||
type = getOptionalType(type);
|
type = getOptionalType(type, !isParameter(host2));
|
||||||
}
|
}
|
||||||
const clone = tryReuseExistingNonParameterTypeNode(context, typeNode, type, host2);
|
const clone = tryReuseExistingNonParameterTypeNode(context, typeNode, type, host2);
|
||||||
if (clone) {
|
if (clone) {
|
||||||
if (addUndefined && !someType(getTypeFromTypeNode2(context, typeNode), (t) => !!(t.flags & 32768 /* Undefined */))) {
|
if (addUndefined && containsNonMissingUndefinedType(type) && !someType(getTypeFromTypeNode2(context, typeNode), (t) => !!(t.flags & 32768 /* Undefined */))) {
|
||||||
return factory.createUnionTypeNode([clone, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);
|
return factory.createUnionTypeNode([clone, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);
|
||||||
}
|
}
|
||||||
return clone;
|
return clone;
|
||||||
|
|
@ -50157,7 +50200,21 @@ function createTypeChecker(host) {
|
||||||
}
|
}
|
||||||
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
||||||
var _a;
|
var _a;
|
||||||
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
const depth = 3;
|
||||||
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */) || isDeeplyNestedReverseMappedTypeProperty());
|
||||||
|
function isDeeplyNestedReverseMappedTypeProperty() {
|
||||||
|
var _a2;
|
||||||
|
if ((((_a2 = context.reverseMappedStack) == null ? void 0 : _a2.length) ?? 0) < depth) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < depth; i++) {
|
||||||
|
const prop = context.reverseMappedStack[context.reverseMappedStack.length - 1 - i];
|
||||||
|
if (prop.links.mappedType.symbol !== propertySymbol.links.mappedType.symbol) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
||||||
var _a;
|
var _a;
|
||||||
|
|
@ -51244,8 +51301,8 @@ function createTypeChecker(host) {
|
||||||
return enclosingDeclaration;
|
return enclosingDeclaration;
|
||||||
}
|
}
|
||||||
function serializeTypeForDeclaration(context, declaration, type, symbol) {
|
function serializeTypeForDeclaration(context, declaration, type, symbol) {
|
||||||
var _a;
|
var _a, _b;
|
||||||
const addUndefined = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
|
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
|
||||||
const enclosingDeclaration = context.enclosingDeclaration;
|
const enclosingDeclaration = context.enclosingDeclaration;
|
||||||
const oldFlags = context.flags;
|
const oldFlags = context.flags;
|
||||||
if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) {
|
if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) {
|
||||||
|
|
@ -51256,6 +51313,7 @@ function createTypeChecker(host) {
|
||||||
const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol);
|
const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol);
|
||||||
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
||||||
const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
||||||
|
const addUndefined = addUndefinedForParameter || !!(symbol.flags & 4 /* Property */ && symbol.flags & 16777216 /* Optional */ && isOptionalDeclaration(declWithExistingAnnotation) && ((_a = symbol.links) == null ? void 0 : _a.mappedType) && containsNonMissingUndefinedType(type));
|
||||||
const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined);
|
const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined);
|
||||||
if (result2) {
|
if (result2) {
|
||||||
context.flags = oldFlags;
|
context.flags = oldFlags;
|
||||||
|
|
@ -51266,9 +51324,9 @@ function createTypeChecker(host) {
|
||||||
if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) {
|
if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) {
|
||||||
context.flags |= 1048576 /* AllowUniqueESSymbolType */;
|
context.flags |= 1048576 /* AllowUniqueESSymbolType */;
|
||||||
}
|
}
|
||||||
const decl = declaration ?? symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
const decl = declaration ?? symbol.valueDeclaration ?? ((_b = symbol.declarations) == null ? void 0 : _b[0]);
|
||||||
const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
|
const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
|
||||||
const result = expressionOrTypeToTypeNode(context, expr, type, addUndefined);
|
const result = expressionOrTypeToTypeNode(context, expr, type, addUndefinedForParameter);
|
||||||
context.flags = oldFlags;
|
context.flags = oldFlags;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -51303,9 +51361,9 @@ function createTypeChecker(host) {
|
||||||
const typePredicate = getTypePredicateOfSignature(signature);
|
const typePredicate = getTypePredicateOfSignature(signature);
|
||||||
const type = getReturnTypeOfSignature(signature);
|
const type = getReturnTypeOfSignature(signature);
|
||||||
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
||||||
const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
const annotation = getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
||||||
if (annotation && getTypeFromTypeNode2(context, annotation) === type) {
|
if (annotation) {
|
||||||
const result = tryReuseExistingTypeNodeHelper(context, annotation);
|
const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -51799,7 +51857,10 @@ function createTypeChecker(host) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !isLateBindableName(node.name)) {
|
if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !isLateBindableName(node.name)) {
|
||||||
if (!(context.flags & 1 /* AllowUnresolvedNames */ && hasDynamicName(node) && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */)) {
|
if (!hasDynamicName(node)) {
|
||||||
|
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
||||||
|
}
|
||||||
|
if (!(context.flags & 1 /* AllowUnresolvedNames */ && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */)) {
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51929,7 +51990,7 @@ function createTypeChecker(host) {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result.pos !== -1 || result.end !== -1) {
|
if (result.pos !== -1 || result.end !== -1) {
|
||||||
if (result === nodes) {
|
if (result === nodes) {
|
||||||
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
result = factory.createNodeArray(nodes.slice(), nodes.hasTrailingComma);
|
||||||
}
|
}
|
||||||
setTextRangePosEnd(result, -1, -1);
|
setTextRangePosEnd(result, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
@ -57886,7 +57947,7 @@ function createTypeChecker(host) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
function createSignatureTypeMapper(signature, typeArguments) {
|
function createSignatureTypeMapper(signature, typeArguments) {
|
||||||
return createTypeMapper(signature.typeParameters, typeArguments);
|
return createTypeMapper(sameMap(signature.typeParameters, (tp) => tp.mapper ? instantiateType(tp, tp.mapper) : tp), typeArguments);
|
||||||
}
|
}
|
||||||
function getErasedSignature(signature) {
|
function getErasedSignature(signature) {
|
||||||
return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;
|
return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;
|
||||||
|
|
@ -62529,6 +62590,10 @@ function createTypeChecker(host) {
|
||||||
function containsUndefinedType(type) {
|
function containsUndefinedType(type) {
|
||||||
return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */);
|
return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */);
|
||||||
}
|
}
|
||||||
|
function containsNonMissingUndefinedType(type) {
|
||||||
|
const candidate = type.flags & 1048576 /* Union */ ? type.types[0] : type;
|
||||||
|
return !!(candidate.flags & 32768 /* Undefined */) && candidate !== missingType;
|
||||||
|
}
|
||||||
function isStringIndexSignatureOnlyType(type) {
|
function isStringIndexSignatureOnlyType(type) {
|
||||||
return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false;
|
return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false;
|
||||||
}
|
}
|
||||||
|
|
@ -66177,11 +66242,11 @@ function createTypeChecker(host) {
|
||||||
}
|
}
|
||||||
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
||||||
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
||||||
if (reverseMappedCache.has(cacheKey)) {
|
if (reverseHomomorphicMappedCache.has(cacheKey)) {
|
||||||
return reverseMappedCache.get(cacheKey);
|
return reverseHomomorphicMappedCache.get(cacheKey);
|
||||||
}
|
}
|
||||||
const type = createReverseMappedType(source, target, constraint);
|
const type = createReverseMappedType(source, target, constraint);
|
||||||
reverseMappedCache.set(cacheKey, type);
|
reverseHomomorphicMappedCache.set(cacheKey, type);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
function isPartiallyInferableType(type) {
|
function isPartiallyInferableType(type) {
|
||||||
|
|
@ -69409,7 +69474,7 @@ function createTypeChecker(host) {
|
||||||
if (!canCollectSymbolAliasAccessabilityData) {
|
if (!canCollectSymbolAliasAccessabilityData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (location.flags & 33554432 /* Ambient */) {
|
if (location.flags & 33554432 /* Ambient */ && !isPropertySignature(location) && !isPropertyDeclaration(location)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (hint) {
|
switch (hint) {
|
||||||
|
|
@ -72413,7 +72478,7 @@ function createTypeChecker(host) {
|
||||||
checkGrammarJsxElement(node);
|
checkGrammarJsxElement(node);
|
||||||
}
|
}
|
||||||
checkJsxPreconditions(node);
|
checkJsxPreconditions(node);
|
||||||
markLinkedReferences(node, 4 /* Jsx */);
|
markJsxAliasReferenced(node);
|
||||||
if (isNodeOpeningLikeElement) {
|
if (isNodeOpeningLikeElement) {
|
||||||
const jsxOpeningLikeNode = node;
|
const jsxOpeningLikeNode = node;
|
||||||
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
||||||
|
|
@ -85149,15 +85214,14 @@ function createTypeChecker(host) {
|
||||||
function checkChildIdentifiers(node2) {
|
function checkChildIdentifiers(node2) {
|
||||||
forEachNodeRecursively(node2, checkIdentifiers);
|
forEachNodeRecursively(node2, checkIdentifiers);
|
||||||
}
|
}
|
||||||
|
function isExpressionNodeOrShorthandPropertyAssignmentName(node2) {
|
||||||
|
return isExpressionNode(node2) || isShorthandPropertyAssignment(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2;
|
||||||
|
}
|
||||||
function checkSingleIdentifier(node2) {
|
function checkSingleIdentifier(node2) {
|
||||||
const nodeLinks2 = getNodeLinks(node2);
|
const nodeLinks2 = getNodeLinks(node2);
|
||||||
nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
|
nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
|
||||||
if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
if (isIdentifier(node2) && isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
||||||
const s = getSymbolAtLocation(
|
const s = getResolvedSymbol(node2);
|
||||||
node2,
|
|
||||||
/*ignoreErrors*/
|
|
||||||
true
|
|
||||||
);
|
|
||||||
if (s && s !== unknownSymbol) {
|
if (s && s !== unknownSymbol) {
|
||||||
checkIdentifierCalculateNodeCheckFlags(node2, s);
|
checkIdentifierCalculateNodeCheckFlags(node2, s);
|
||||||
}
|
}
|
||||||
|
|
@ -85625,7 +85689,8 @@ function createTypeChecker(host) {
|
||||||
resolveExternalModuleSymbol(sym);
|
resolveExternalModuleSymbol(sym);
|
||||||
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
|
||||||
},
|
},
|
||||||
isImportRequiredByAugmentation
|
isImportRequiredByAugmentation,
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject
|
||||||
};
|
};
|
||||||
function isImportRequiredByAugmentation(node) {
|
function isImportRequiredByAugmentation(node) {
|
||||||
const file = getSourceFileOfNode(node);
|
const file = getSourceFileOfNode(node);
|
||||||
|
|
@ -110759,6 +110824,7 @@ function transformDeclarations(context) {
|
||||||
}
|
}
|
||||||
function reportInferenceFallback(node) {
|
function reportInferenceFallback(node) {
|
||||||
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
||||||
|
if (getSourceFileOfNode(node) !== currentSourceFile) return;
|
||||||
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
|
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
|
||||||
reportExpandoFunctionErrors(node);
|
reportExpandoFunctionErrors(node);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -111397,6 +111463,7 @@ function transformDeclarations(context) {
|
||||||
if (isDeclarationAndNotVisible(input)) return;
|
if (isDeclarationAndNotVisible(input)) return;
|
||||||
if (hasDynamicName(input)) {
|
if (hasDynamicName(input)) {
|
||||||
if (isolatedDeclarations) {
|
if (isolatedDeclarations) {
|
||||||
|
if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) {
|
||||||
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
||||||
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
||||||
return;
|
return;
|
||||||
|
|
@ -111407,6 +111474,7 @@ function transformDeclarations(context) {
|
||||||
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
|
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
} else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -113130,7 +113198,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
||||||
noEmitHelpers: true,
|
noEmitHelpers: true,
|
||||||
module: compilerOptions.module,
|
module: compilerOptions.module,
|
||||||
target: compilerOptions.target,
|
target: compilerOptions.target,
|
||||||
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
sourceMap: emitOnly !== 2 /* BuilderSignature */ && compilerOptions.declarationMap,
|
||||||
inlineSourceMap: compilerOptions.inlineSourceMap,
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
||||||
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
||||||
onlyPrintJsDocStyle: true,
|
onlyPrintJsDocStyle: true,
|
||||||
|
|
@ -113353,7 +113421,8 @@ var notImplementedResolver = {
|
||||||
getJsxFragmentFactoryEntity: notImplemented,
|
getJsxFragmentFactoryEntity: notImplemented,
|
||||||
isBindingCapturedByNode: notImplemented,
|
isBindingCapturedByNode: notImplemented,
|
||||||
getDeclarationStatementsForSourceFile: notImplemented,
|
getDeclarationStatementsForSourceFile: notImplemented,
|
||||||
isImportRequiredByAugmentation: notImplemented
|
isImportRequiredByAugmentation: notImplemented,
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject: notImplemented
|
||||||
};
|
};
|
||||||
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
||||||
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
||||||
|
|
@ -121383,7 +121452,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||||
if (options.outDir || // there is --outDir specified
|
if (options.outDir || // there is --outDir specified
|
||||||
options.rootDir || // there is --rootDir specified
|
options.rootDir || // there is --rootDir specified
|
||||||
options.sourceRoot || // there is --sourceRoot specified
|
options.sourceRoot || // there is --sourceRoot specified
|
||||||
options.mapRoot) {
|
options.mapRoot || // there is --mapRoot specified
|
||||||
|
getEmitDeclarations(options) && options.declarationDir) {
|
||||||
const dir = getCommonSourceDirectory2();
|
const dir = getCommonSourceDirectory2();
|
||||||
if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
|
if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
|
||||||
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
||||||
|
|
@ -122468,8 +122538,7 @@ var BuilderState;
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
cancellationToken,
|
cancellationToken,
|
||||||
/*emitOnly*/
|
2 /* BuilderSignature */,
|
||||||
true,
|
|
||||||
/*customTransformers*/
|
/*customTransformers*/
|
||||||
void 0,
|
void 0,
|
||||||
/*forceDtsEmit*/
|
/*forceDtsEmit*/
|
||||||
|
|
@ -129606,7 +129675,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||||
expression,
|
expression,
|
||||||
/*includeBigInt*/
|
/*includeBigInt*/
|
||||||
false
|
false
|
||||||
)) {
|
) && !resolver.isDefinitelyReferenceToGlobalSymbolObject(expression)) {
|
||||||
context.tracker.reportInferenceFallback(prop.name);
|
context.tracker.reportInferenceFallback(prop.name);
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
215
node_modules/typescript/lib/typescript.js
generated
vendored
215
node_modules/typescript/lib/typescript.js
generated
vendored
|
|
@ -2254,6 +2254,7 @@ __export(typescript_exports, {
|
||||||
trace: () => trace,
|
trace: () => trace,
|
||||||
tracing: () => tracing,
|
tracing: () => tracing,
|
||||||
tracingEnabled: () => tracingEnabled,
|
tracingEnabled: () => tracingEnabled,
|
||||||
|
transferSourceFileChildren: () => transferSourceFileChildren,
|
||||||
transform: () => transform,
|
transform: () => transform,
|
||||||
transformClassFields: () => transformClassFields,
|
transformClassFields: () => transformClassFields,
|
||||||
transformDeclarations: () => transformDeclarations,
|
transformDeclarations: () => transformDeclarations,
|
||||||
|
|
@ -2366,7 +2367,7 @@ module.exports = __toCommonJS(typescript_exports);
|
||||||
|
|
||||||
// src/compiler/corePublic.ts
|
// src/compiler/corePublic.ts
|
||||||
var versionMajorMinor = "5.5";
|
var versionMajorMinor = "5.5";
|
||||||
var version = "5.5.3";
|
var version = "5.5.4";
|
||||||
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||||
|
|
@ -5239,10 +5240,12 @@ function tryGetPerformance() {
|
||||||
if (isNodeLikeSystem()) {
|
if (isNodeLikeSystem()) {
|
||||||
try {
|
try {
|
||||||
const { performance: performance2 } = require("perf_hooks");
|
const { performance: performance2 } = require("perf_hooks");
|
||||||
|
if (performance2) {
|
||||||
return {
|
return {
|
||||||
shouldWriteNativeEvents: false,
|
shouldWriteNativeEvents: false,
|
||||||
performance: performance2
|
performance: performance2
|
||||||
};
|
};
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6280,6 +6283,7 @@ var FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagno
|
||||||
var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
|
var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
|
||||||
EmitOnly4[EmitOnly4["Js"] = 0] = "Js";
|
EmitOnly4[EmitOnly4["Js"] = 0] = "Js";
|
||||||
EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts";
|
EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts";
|
||||||
|
EmitOnly4[EmitOnly4["BuilderSignature"] = 2] = "BuilderSignature";
|
||||||
return EmitOnly4;
|
return EmitOnly4;
|
||||||
})(EmitOnly || {});
|
})(EmitOnly || {});
|
||||||
var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {
|
var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {
|
||||||
|
|
@ -12149,6 +12153,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
var tokenFlags;
|
var tokenFlags;
|
||||||
var commentDirectives;
|
var commentDirectives;
|
||||||
var skipJsDocLeadingAsterisks = 0;
|
var skipJsDocLeadingAsterisks = 0;
|
||||||
|
var asteriskSeen = false;
|
||||||
var scriptKind = 0 /* Unknown */;
|
var scriptKind = 0 /* Unknown */;
|
||||||
var jsDocParsingMode = 0 /* ParseAll */;
|
var jsDocParsingMode = 0 /* ParseAll */;
|
||||||
setText(text, start, length2);
|
setText(text, start, length2);
|
||||||
|
|
@ -12200,6 +12205,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
resetTokenState,
|
resetTokenState,
|
||||||
setTextPos: resetTokenState,
|
setTextPos: resetTokenState,
|
||||||
setSkipJsDocLeadingAsterisks,
|
setSkipJsDocLeadingAsterisks,
|
||||||
|
hasLeadingAsterisks,
|
||||||
tryScan,
|
tryScan,
|
||||||
lookAhead,
|
lookAhead,
|
||||||
scanRange
|
scanRange
|
||||||
|
|
@ -12806,7 +12812,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
function scan() {
|
function scan() {
|
||||||
fullStartPos = pos;
|
fullStartPos = pos;
|
||||||
tokenFlags = 0 /* None */;
|
tokenFlags = 0 /* None */;
|
||||||
let asteriskSeen = false;
|
asteriskSeen = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
tokenStart = pos;
|
tokenStart = pos;
|
||||||
if (pos >= end) {
|
if (pos >= end) {
|
||||||
|
|
@ -14609,6 +14615,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
||||||
function setSkipJsDocLeadingAsterisks(skip) {
|
function setSkipJsDocLeadingAsterisks(skip) {
|
||||||
skipJsDocLeadingAsterisks += skip ? 1 : -1;
|
skipJsDocLeadingAsterisks += skip ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
function hasLeadingAsterisks() {
|
||||||
|
return asteriskSeen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function codePointAt(s, i) {
|
function codePointAt(s, i) {
|
||||||
return s.codePointAt(i);
|
return s.codePointAt(i);
|
||||||
|
|
@ -16552,7 +16561,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
||||||
}
|
}
|
||||||
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
||||||
return skipTrivia(
|
return skipTrivia(
|
||||||
(sourceFile || getSourceFileOfNode(node)).text,
|
(sourceFile ?? getSourceFileOfNode(node)).text,
|
||||||
node.pos,
|
node.pos,
|
||||||
/*stopAfterLineBreak*/
|
/*stopAfterLineBreak*/
|
||||||
false,
|
false,
|
||||||
|
|
@ -16564,13 +16573,14 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
||||||
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
||||||
}
|
}
|
||||||
if (node.kind === 352 /* SyntaxList */) {
|
if (node.kind === 352 /* SyntaxList */) {
|
||||||
const first2 = firstOrUndefined(getNodeChildren(node));
|
sourceFile ?? (sourceFile = getSourceFileOfNode(node));
|
||||||
|
const first2 = firstOrUndefined(getNodeChildren(node, sourceFile));
|
||||||
if (first2) {
|
if (first2) {
|
||||||
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return skipTrivia(
|
return skipTrivia(
|
||||||
(sourceFile || getSourceFileOfNode(node)).text,
|
(sourceFile ?? getSourceFileOfNode(node)).text,
|
||||||
node.pos,
|
node.pos,
|
||||||
/*stopAfterLineBreak*/
|
/*stopAfterLineBreak*/
|
||||||
false,
|
false,
|
||||||
|
|
@ -20113,11 +20123,11 @@ function getOwnEmitOutputFilePath(fileName, host, extension) {
|
||||||
return emitOutputFilePathWithoutExtension + extension;
|
return emitOutputFilePathWithoutExtension + extension;
|
||||||
}
|
}
|
||||||
function getDeclarationEmitOutputFilePath(fileName, host) {
|
function getDeclarationEmitOutputFilePath(fileName, host) {
|
||||||
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f));
|
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host);
|
||||||
}
|
}
|
||||||
function getDeclarationEmitOutputFilePathWorker(fileName, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
|
function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
|
||||||
const outputDir = options.declarationDir || options.outDir;
|
const outputDir = options.declarationDir || options.outDir;
|
||||||
const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName;
|
const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
|
||||||
const declarationExtension = getDeclarationEmitExtensionForPath(path);
|
const declarationExtension = getDeclarationEmitExtensionForPath(path);
|
||||||
return removeFileExtension(path) + declarationExtension;
|
return removeFileExtension(path) + declarationExtension;
|
||||||
}
|
}
|
||||||
|
|
@ -27685,7 +27695,7 @@ function createNodeFactory(flags, baseFactory2) {
|
||||||
}
|
}
|
||||||
function createSyntaxList3(children) {
|
function createSyntaxList3(children) {
|
||||||
const node = createBaseNode(352 /* SyntaxList */);
|
const node = createBaseNode(352 /* SyntaxList */);
|
||||||
setNodeChildren(node, children);
|
node._children = children;
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
function createNotEmittedStatement(original) {
|
function createNotEmittedStatement(original) {
|
||||||
|
|
@ -30578,17 +30588,43 @@ function isSyntaxList(n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/compiler/factory/nodeChildren.ts
|
// src/compiler/factory/nodeChildren.ts
|
||||||
var nodeChildren = /* @__PURE__ */ new WeakMap();
|
var sourceFileToNodeChildren = /* @__PURE__ */ new WeakMap();
|
||||||
function getNodeChildren(node) {
|
function getNodeChildren(node, sourceFile) {
|
||||||
if (!isNodeKind(node.kind)) return emptyArray;
|
var _a;
|
||||||
return nodeChildren.get(node);
|
const kind = node.kind;
|
||||||
|
if (!isNodeKind(kind)) {
|
||||||
|
return emptyArray;
|
||||||
}
|
}
|
||||||
function setNodeChildren(node, children) {
|
if (kind === 352 /* SyntaxList */) {
|
||||||
nodeChildren.set(node, children);
|
return node._children;
|
||||||
|
}
|
||||||
|
return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);
|
||||||
|
}
|
||||||
|
function setNodeChildren(node, sourceFile, children) {
|
||||||
|
if (node.kind === 352 /* SyntaxList */) {
|
||||||
|
Debug.fail("Should not need to re-set the children of a SyntaxList.");
|
||||||
|
}
|
||||||
|
let map2 = sourceFileToNodeChildren.get(sourceFile);
|
||||||
|
if (map2 === void 0) {
|
||||||
|
map2 = /* @__PURE__ */ new WeakMap();
|
||||||
|
sourceFileToNodeChildren.set(sourceFile, map2);
|
||||||
|
}
|
||||||
|
map2.set(node, children);
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
function unsetNodeChildren(node) {
|
function unsetNodeChildren(node, origSourceFile) {
|
||||||
nodeChildren.delete(node);
|
var _a;
|
||||||
|
if (node.kind === 352 /* SyntaxList */) {
|
||||||
|
Debug.fail("Did not expect to unset the children of a SyntaxList.");
|
||||||
|
}
|
||||||
|
(_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node);
|
||||||
|
}
|
||||||
|
function transferSourceFileChildren(sourceFile, targetSourceFile) {
|
||||||
|
const map2 = sourceFileToNodeChildren.get(sourceFile);
|
||||||
|
if (map2 !== void 0) {
|
||||||
|
sourceFileToNodeChildren.delete(sourceFile);
|
||||||
|
sourceFileToNodeChildren.set(targetSourceFile, map2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// src/compiler/factory/utilities.ts
|
// src/compiler/factory/utilities.ts
|
||||||
|
|
@ -33264,7 +33300,7 @@ var Parser;
|
||||||
function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {
|
function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {
|
||||||
if (isIdentifier3) {
|
if (isIdentifier3) {
|
||||||
identifierCount++;
|
identifierCount++;
|
||||||
const pos = getNodePos();
|
const pos = scanner2.hasLeadingAsterisks() ? scanner2.getTokenStart() : getNodePos();
|
||||||
const originalKeywordKind = token();
|
const originalKeywordKind = token();
|
||||||
const text = internIdentifier(scanner2.getTokenValue());
|
const text = internIdentifier(scanner2.getTokenValue());
|
||||||
const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
|
const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
|
||||||
|
|
@ -39200,6 +39236,7 @@ var IncrementalParser;
|
||||||
aggressiveChecks
|
aggressiveChecks
|
||||||
);
|
);
|
||||||
result.impliedNodeFormat = sourceFile.impliedNodeFormat;
|
result.impliedNodeFormat = sourceFile.impliedNodeFormat;
|
||||||
|
transferSourceFileChildren(sourceFile, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
IncrementalParser2.updateSourceFile = updateSourceFile2;
|
IncrementalParser2.updateSourceFile = updateSourceFile2;
|
||||||
|
|
@ -39235,7 +39272,7 @@ var IncrementalParser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) {
|
function moveElementEntirelyPastChangeRange(element, origSourceFile, isArray2, delta, oldText, newText, aggressiveChecks) {
|
||||||
if (isArray2) {
|
if (isArray2) {
|
||||||
visitArray2(element);
|
visitArray2(element);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -39247,7 +39284,7 @@ var IncrementalParser;
|
||||||
if (aggressiveChecks && shouldCheckNode(node)) {
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
||||||
text = oldText.substring(node.pos, node.end);
|
text = oldText.substring(node.pos, node.end);
|
||||||
}
|
}
|
||||||
unsetNodeChildren(node);
|
unsetNodeChildren(node, origSourceFile);
|
||||||
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
||||||
if (aggressiveChecks && shouldCheckNode(node)) {
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
||||||
Debug.assert(text === newText.substring(node.pos, node.end));
|
Debug.assert(text === newText.substring(node.pos, node.end));
|
||||||
|
|
@ -39321,6 +39358,7 @@ var IncrementalParser;
|
||||||
if (child.pos > changeRangeOldEnd) {
|
if (child.pos > changeRangeOldEnd) {
|
||||||
moveElementEntirelyPastChangeRange(
|
moveElementEntirelyPastChangeRange(
|
||||||
child,
|
child,
|
||||||
|
sourceFile,
|
||||||
/*isArray*/
|
/*isArray*/
|
||||||
false,
|
false,
|
||||||
delta,
|
delta,
|
||||||
|
|
@ -39333,7 +39371,7 @@ var IncrementalParser;
|
||||||
const fullEnd = child.end;
|
const fullEnd = child.end;
|
||||||
if (fullEnd >= changeStart) {
|
if (fullEnd >= changeStart) {
|
||||||
markAsIntersectingIncrementalChange(child);
|
markAsIntersectingIncrementalChange(child);
|
||||||
unsetNodeChildren(child);
|
unsetNodeChildren(child, sourceFile);
|
||||||
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
||||||
forEachChild(child, visitNode3, visitArray2);
|
forEachChild(child, visitNode3, visitArray2);
|
||||||
if (hasJSDocNodes(child)) {
|
if (hasJSDocNodes(child)) {
|
||||||
|
|
@ -39351,6 +39389,7 @@ var IncrementalParser;
|
||||||
if (array.pos > changeRangeOldEnd) {
|
if (array.pos > changeRangeOldEnd) {
|
||||||
moveElementEntirelyPastChangeRange(
|
moveElementEntirelyPastChangeRange(
|
||||||
array,
|
array,
|
||||||
|
sourceFile,
|
||||||
/*isArray*/
|
/*isArray*/
|
||||||
true,
|
true,
|
||||||
delta,
|
delta,
|
||||||
|
|
@ -40051,7 +40090,6 @@ var commonOptionsWithBuild = [
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
showInSimplifiedHelpView: true,
|
showInSimplifiedHelpView: true,
|
||||||
category: Diagnostics.Emit,
|
category: Diagnostics.Emit,
|
||||||
transpileOptionValue: void 0,
|
|
||||||
defaultValueDescription: false,
|
defaultValueDescription: false,
|
||||||
description: Diagnostics.Create_sourcemaps_for_d_ts_files
|
description: Diagnostics.Create_sourcemaps_for_d_ts_files
|
||||||
},
|
},
|
||||||
|
|
@ -40377,6 +40415,7 @@ var commandOptionsWithoutBuild = [
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
affectsEmit: true,
|
affectsEmit: true,
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
|
affectsSourceFile: true,
|
||||||
category: Diagnostics.Emit,
|
category: Diagnostics.Emit,
|
||||||
description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
||||||
defaultValueDescription: false
|
defaultValueDescription: false
|
||||||
|
|
@ -40841,6 +40880,7 @@ var commandOptionsWithoutBuild = [
|
||||||
affectsEmit: true,
|
affectsEmit: true,
|
||||||
affectsBuildInfo: true,
|
affectsBuildInfo: true,
|
||||||
affectsModuleResolution: true,
|
affectsModuleResolution: true,
|
||||||
|
affectsSourceFile: true,
|
||||||
category: Diagnostics.Language_and_Environment,
|
category: Diagnostics.Language_and_Environment,
|
||||||
description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
||||||
defaultValueDescription: "react"
|
defaultValueDescription: "react"
|
||||||
|
|
@ -49888,7 +49928,8 @@ function createTypeChecker(host) {
|
||||||
isUndefinedIdentifierExpression(node) {
|
isUndefinedIdentifierExpression(node) {
|
||||||
Debug.assert(isExpressionNode(node));
|
Debug.assert(isExpressionNode(node));
|
||||||
return getSymbolAtLocation(node) === undefinedSymbol;
|
return getSymbolAtLocation(node) === undefinedSymbol;
|
||||||
}
|
},
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject
|
||||||
});
|
});
|
||||||
var evaluate = createEvaluator({
|
var evaluate = createEvaluator({
|
||||||
evaluateElementAccessExpression,
|
evaluateElementAccessExpression,
|
||||||
|
|
@ -50718,6 +50759,7 @@ function createTypeChecker(host) {
|
||||||
};
|
};
|
||||||
var amalgamatedDuplicates;
|
var amalgamatedDuplicates;
|
||||||
var reverseMappedCache = /* @__PURE__ */ new Map();
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
||||||
|
var reverseHomomorphicMappedCache = /* @__PURE__ */ new Map();
|
||||||
var ambientModulesCache;
|
var ambientModulesCache;
|
||||||
var patternAmbientModules;
|
var patternAmbientModules;
|
||||||
var patternAmbientModuleAugmentations;
|
var patternAmbientModuleAugmentations;
|
||||||
|
|
@ -50845,6 +50887,21 @@ function createTypeChecker(host) {
|
||||||
];
|
];
|
||||||
initializeTypeChecker();
|
initializeTypeChecker();
|
||||||
return checker;
|
return checker;
|
||||||
|
function isDefinitelyReferenceToGlobalSymbolObject(node) {
|
||||||
|
if (!isPropertyAccessExpression(node)) return false;
|
||||||
|
if (!isIdentifier(node.name)) return false;
|
||||||
|
if (!isPropertyAccessExpression(node.expression) && !isIdentifier(node.expression)) return false;
|
||||||
|
if (isIdentifier(node.expression)) {
|
||||||
|
return idText(node.expression) === "Symbol" && getResolvedSymbol(node.expression) === (getGlobalSymbol(
|
||||||
|
"Symbol",
|
||||||
|
111551 /* Value */ | 1048576 /* ExportValue */,
|
||||||
|
/*diagnostic*/
|
||||||
|
void 0
|
||||||
|
) || unknownSymbol);
|
||||||
|
}
|
||||||
|
if (!isIdentifier(node.expression.expression)) return false;
|
||||||
|
return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;
|
||||||
|
}
|
||||||
function getCachedType(key) {
|
function getCachedType(key) {
|
||||||
return key ? cachedTypes.get(key) : void 0;
|
return key ? cachedTypes.get(key) : void 0;
|
||||||
}
|
}
|
||||||
|
|
@ -54057,11 +54114,11 @@ function createTypeChecker(host) {
|
||||||
function tryReuseExistingTypeNode(context, typeNode, type, host2, addUndefined) {
|
function tryReuseExistingTypeNode(context, typeNode, type, host2, addUndefined) {
|
||||||
const originalType = type;
|
const originalType = type;
|
||||||
if (addUndefined) {
|
if (addUndefined) {
|
||||||
type = getOptionalType(type);
|
type = getOptionalType(type, !isParameter(host2));
|
||||||
}
|
}
|
||||||
const clone2 = tryReuseExistingNonParameterTypeNode(context, typeNode, type, host2);
|
const clone2 = tryReuseExistingNonParameterTypeNode(context, typeNode, type, host2);
|
||||||
if (clone2) {
|
if (clone2) {
|
||||||
if (addUndefined && !someType(getTypeFromTypeNode2(context, typeNode), (t) => !!(t.flags & 32768 /* Undefined */))) {
|
if (addUndefined && containsNonMissingUndefinedType(type) && !someType(getTypeFromTypeNode2(context, typeNode), (t) => !!(t.flags & 32768 /* Undefined */))) {
|
||||||
return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);
|
return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);
|
||||||
}
|
}
|
||||||
return clone2;
|
return clone2;
|
||||||
|
|
@ -54921,7 +54978,21 @@ function createTypeChecker(host) {
|
||||||
}
|
}
|
||||||
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
function shouldUsePlaceholderForProperty(propertySymbol, context) {
|
||||||
var _a;
|
var _a;
|
||||||
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
const depth = 3;
|
||||||
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */) || isDeeplyNestedReverseMappedTypeProperty());
|
||||||
|
function isDeeplyNestedReverseMappedTypeProperty() {
|
||||||
|
var _a2;
|
||||||
|
if ((((_a2 = context.reverseMappedStack) == null ? void 0 : _a2.length) ?? 0) < depth) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < depth; i++) {
|
||||||
|
const prop = context.reverseMappedStack[context.reverseMappedStack.length - 1 - i];
|
||||||
|
if (prop.links.mappedType.symbol !== propertySymbol.links.mappedType.symbol) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
||||||
var _a;
|
var _a;
|
||||||
|
|
@ -56008,8 +56079,8 @@ function createTypeChecker(host) {
|
||||||
return enclosingDeclaration;
|
return enclosingDeclaration;
|
||||||
}
|
}
|
||||||
function serializeTypeForDeclaration(context, declaration, type, symbol) {
|
function serializeTypeForDeclaration(context, declaration, type, symbol) {
|
||||||
var _a;
|
var _a, _b;
|
||||||
const addUndefined = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
|
const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration);
|
||||||
const enclosingDeclaration = context.enclosingDeclaration;
|
const enclosingDeclaration = context.enclosingDeclaration;
|
||||||
const oldFlags = context.flags;
|
const oldFlags = context.flags;
|
||||||
if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) {
|
if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) {
|
||||||
|
|
@ -56020,6 +56091,7 @@ function createTypeChecker(host) {
|
||||||
const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol);
|
const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol);
|
||||||
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
||||||
const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
||||||
|
const addUndefined = addUndefinedForParameter || !!(symbol.flags & 4 /* Property */ && symbol.flags & 16777216 /* Optional */ && isOptionalDeclaration(declWithExistingAnnotation) && ((_a = symbol.links) == null ? void 0 : _a.mappedType) && containsNonMissingUndefinedType(type));
|
||||||
const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined);
|
const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined);
|
||||||
if (result2) {
|
if (result2) {
|
||||||
context.flags = oldFlags;
|
context.flags = oldFlags;
|
||||||
|
|
@ -56030,9 +56102,9 @@ function createTypeChecker(host) {
|
||||||
if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) {
|
if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) {
|
||||||
context.flags |= 1048576 /* AllowUniqueESSymbolType */;
|
context.flags |= 1048576 /* AllowUniqueESSymbolType */;
|
||||||
}
|
}
|
||||||
const decl = declaration ?? symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
const decl = declaration ?? symbol.valueDeclaration ?? ((_b = symbol.declarations) == null ? void 0 : _b[0]);
|
||||||
const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
|
const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0;
|
||||||
const result = expressionOrTypeToTypeNode(context, expr, type, addUndefined);
|
const result = expressionOrTypeToTypeNode(context, expr, type, addUndefinedForParameter);
|
||||||
context.flags = oldFlags;
|
context.flags = oldFlags;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -56067,9 +56139,9 @@ function createTypeChecker(host) {
|
||||||
const typePredicate = getTypePredicateOfSignature(signature);
|
const typePredicate = getTypePredicateOfSignature(signature);
|
||||||
const type = getReturnTypeOfSignature(signature);
|
const type = getReturnTypeOfSignature(signature);
|
||||||
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
||||||
const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
const annotation = getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
||||||
if (annotation && getTypeFromTypeNode2(context, annotation) === type) {
|
if (annotation) {
|
||||||
const result = tryReuseExistingTypeNodeHelper(context, annotation);
|
const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -56563,7 +56635,10 @@ function createTypeChecker(host) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !isLateBindableName(node.name)) {
|
if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !isLateBindableName(node.name)) {
|
||||||
if (!(context.flags & 1 /* AllowUnresolvedNames */ && hasDynamicName(node) && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */)) {
|
if (!hasDynamicName(node)) {
|
||||||
|
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
||||||
|
}
|
||||||
|
if (!(context.flags & 1 /* AllowUnresolvedNames */ && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */)) {
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56693,7 +56768,7 @@ function createTypeChecker(host) {
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result.pos !== -1 || result.end !== -1) {
|
if (result.pos !== -1 || result.end !== -1) {
|
||||||
if (result === nodes) {
|
if (result === nodes) {
|
||||||
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
result = factory.createNodeArray(nodes.slice(), nodes.hasTrailingComma);
|
||||||
}
|
}
|
||||||
setTextRangePosEnd(result, -1, -1);
|
setTextRangePosEnd(result, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
@ -62650,7 +62725,7 @@ function createTypeChecker(host) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
function createSignatureTypeMapper(signature, typeArguments) {
|
function createSignatureTypeMapper(signature, typeArguments) {
|
||||||
return createTypeMapper(signature.typeParameters, typeArguments);
|
return createTypeMapper(sameMap(signature.typeParameters, (tp) => tp.mapper ? instantiateType(tp, tp.mapper) : tp), typeArguments);
|
||||||
}
|
}
|
||||||
function getErasedSignature(signature) {
|
function getErasedSignature(signature) {
|
||||||
return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;
|
return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;
|
||||||
|
|
@ -67293,6 +67368,10 @@ function createTypeChecker(host) {
|
||||||
function containsUndefinedType(type) {
|
function containsUndefinedType(type) {
|
||||||
return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */);
|
return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */);
|
||||||
}
|
}
|
||||||
|
function containsNonMissingUndefinedType(type) {
|
||||||
|
const candidate = type.flags & 1048576 /* Union */ ? type.types[0] : type;
|
||||||
|
return !!(candidate.flags & 32768 /* Undefined */) && candidate !== missingType;
|
||||||
|
}
|
||||||
function isStringIndexSignatureOnlyType(type) {
|
function isStringIndexSignatureOnlyType(type) {
|
||||||
return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false;
|
return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false;
|
||||||
}
|
}
|
||||||
|
|
@ -70941,11 +71020,11 @@ function createTypeChecker(host) {
|
||||||
}
|
}
|
||||||
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
||||||
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
||||||
if (reverseMappedCache.has(cacheKey)) {
|
if (reverseHomomorphicMappedCache.has(cacheKey)) {
|
||||||
return reverseMappedCache.get(cacheKey);
|
return reverseHomomorphicMappedCache.get(cacheKey);
|
||||||
}
|
}
|
||||||
const type = createReverseMappedType(source, target, constraint);
|
const type = createReverseMappedType(source, target, constraint);
|
||||||
reverseMappedCache.set(cacheKey, type);
|
reverseHomomorphicMappedCache.set(cacheKey, type);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
function isPartiallyInferableType(type) {
|
function isPartiallyInferableType(type) {
|
||||||
|
|
@ -74173,7 +74252,7 @@ function createTypeChecker(host) {
|
||||||
if (!canCollectSymbolAliasAccessabilityData) {
|
if (!canCollectSymbolAliasAccessabilityData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (location.flags & 33554432 /* Ambient */) {
|
if (location.flags & 33554432 /* Ambient */ && !isPropertySignature(location) && !isPropertyDeclaration(location)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (hint) {
|
switch (hint) {
|
||||||
|
|
@ -77177,7 +77256,7 @@ function createTypeChecker(host) {
|
||||||
checkGrammarJsxElement(node);
|
checkGrammarJsxElement(node);
|
||||||
}
|
}
|
||||||
checkJsxPreconditions(node);
|
checkJsxPreconditions(node);
|
||||||
markLinkedReferences(node, 4 /* Jsx */);
|
markJsxAliasReferenced(node);
|
||||||
if (isNodeOpeningLikeElement) {
|
if (isNodeOpeningLikeElement) {
|
||||||
const jsxOpeningLikeNode = node;
|
const jsxOpeningLikeNode = node;
|
||||||
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
||||||
|
|
@ -89913,15 +89992,14 @@ function createTypeChecker(host) {
|
||||||
function checkChildIdentifiers(node2) {
|
function checkChildIdentifiers(node2) {
|
||||||
forEachNodeRecursively(node2, checkIdentifiers);
|
forEachNodeRecursively(node2, checkIdentifiers);
|
||||||
}
|
}
|
||||||
|
function isExpressionNodeOrShorthandPropertyAssignmentName(node2) {
|
||||||
|
return isExpressionNode(node2) || isShorthandPropertyAssignment(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2;
|
||||||
|
}
|
||||||
function checkSingleIdentifier(node2) {
|
function checkSingleIdentifier(node2) {
|
||||||
const nodeLinks2 = getNodeLinks(node2);
|
const nodeLinks2 = getNodeLinks(node2);
|
||||||
nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
|
nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
|
||||||
if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
if (isIdentifier(node2) && isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
|
||||||
const s = getSymbolAtLocation(
|
const s = getResolvedSymbol(node2);
|
||||||
node2,
|
|
||||||
/*ignoreErrors*/
|
|
||||||
true
|
|
||||||
);
|
|
||||||
if (s && s !== unknownSymbol) {
|
if (s && s !== unknownSymbol) {
|
||||||
checkIdentifierCalculateNodeCheckFlags(node2, s);
|
checkIdentifierCalculateNodeCheckFlags(node2, s);
|
||||||
}
|
}
|
||||||
|
|
@ -90389,7 +90467,8 @@ function createTypeChecker(host) {
|
||||||
resolveExternalModuleSymbol(sym);
|
resolveExternalModuleSymbol(sym);
|
||||||
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
|
return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
|
||||||
},
|
},
|
||||||
isImportRequiredByAugmentation
|
isImportRequiredByAugmentation,
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject
|
||||||
};
|
};
|
||||||
function isImportRequiredByAugmentation(node) {
|
function isImportRequiredByAugmentation(node) {
|
||||||
const file = getSourceFileOfNode(node);
|
const file = getSourceFileOfNode(node);
|
||||||
|
|
@ -115705,6 +115784,7 @@ function transformDeclarations(context) {
|
||||||
}
|
}
|
||||||
function reportInferenceFallback(node) {
|
function reportInferenceFallback(node) {
|
||||||
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
|
||||||
|
if (getSourceFileOfNode(node) !== currentSourceFile) return;
|
||||||
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
|
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
|
||||||
reportExpandoFunctionErrors(node);
|
reportExpandoFunctionErrors(node);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -116343,6 +116423,7 @@ function transformDeclarations(context) {
|
||||||
if (isDeclarationAndNotVisible(input)) return;
|
if (isDeclarationAndNotVisible(input)) return;
|
||||||
if (hasDynamicName(input)) {
|
if (hasDynamicName(input)) {
|
||||||
if (isolatedDeclarations) {
|
if (isolatedDeclarations) {
|
||||||
|
if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) {
|
||||||
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {
|
||||||
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));
|
||||||
return;
|
return;
|
||||||
|
|
@ -116353,6 +116434,7 @@ function transformDeclarations(context) {
|
||||||
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
|
context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
} else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -118087,7 +118169,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
||||||
noEmitHelpers: true,
|
noEmitHelpers: true,
|
||||||
module: compilerOptions.module,
|
module: compilerOptions.module,
|
||||||
target: compilerOptions.target,
|
target: compilerOptions.target,
|
||||||
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
sourceMap: emitOnly !== 2 /* BuilderSignature */ && compilerOptions.declarationMap,
|
||||||
inlineSourceMap: compilerOptions.inlineSourceMap,
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
||||||
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
||||||
onlyPrintJsDocStyle: true,
|
onlyPrintJsDocStyle: true,
|
||||||
|
|
@ -118310,7 +118392,8 @@ var notImplementedResolver = {
|
||||||
getJsxFragmentFactoryEntity: notImplemented,
|
getJsxFragmentFactoryEntity: notImplemented,
|
||||||
isBindingCapturedByNode: notImplemented,
|
isBindingCapturedByNode: notImplemented,
|
||||||
getDeclarationStatementsForSourceFile: notImplemented,
|
getDeclarationStatementsForSourceFile: notImplemented,
|
||||||
isImportRequiredByAugmentation: notImplemented
|
isImportRequiredByAugmentation: notImplemented,
|
||||||
|
isDefinitelyReferenceToGlobalSymbolObject: notImplemented
|
||||||
};
|
};
|
||||||
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
||||||
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
||||||
|
|
@ -126383,7 +126466,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||||
if (options.outDir || // there is --outDir specified
|
if (options.outDir || // there is --outDir specified
|
||||||
options.rootDir || // there is --rootDir specified
|
options.rootDir || // there is --rootDir specified
|
||||||
options.sourceRoot || // there is --sourceRoot specified
|
options.sourceRoot || // there is --sourceRoot specified
|
||||||
options.mapRoot) {
|
options.mapRoot || // there is --mapRoot specified
|
||||||
|
getEmitDeclarations(options) && options.declarationDir) {
|
||||||
const dir = getCommonSourceDirectory2();
|
const dir = getCommonSourceDirectory2();
|
||||||
if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
|
if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) {
|
||||||
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
||||||
|
|
@ -127482,8 +127566,7 @@ var BuilderState;
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
cancellationToken,
|
cancellationToken,
|
||||||
/*emitOnly*/
|
2 /* BuilderSignature */,
|
||||||
true,
|
|
||||||
/*customTransformers*/
|
/*customTransformers*/
|
||||||
void 0,
|
void 0,
|
||||||
/*forceDtsEmit*/
|
/*forceDtsEmit*/
|
||||||
|
|
@ -134703,7 +134786,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
||||||
expression,
|
expression,
|
||||||
/*includeBigInt*/
|
/*includeBigInt*/
|
||||||
false
|
false
|
||||||
)) {
|
) && !resolver.isDefinitelyReferenceToGlobalSymbolObject(expression)) {
|
||||||
context.tracker.reportInferenceFallback(prop.name);
|
context.tracker.reportInferenceFallback(prop.name);
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
@ -138675,6 +138758,7 @@ function isImportableSymbol(symbol, checker) {
|
||||||
function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, preferCapitalizedNames, cb) {
|
function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, preferCapitalizedNames, cb) {
|
||||||
let chain;
|
let chain;
|
||||||
let current = defaultExport;
|
let current = defaultExport;
|
||||||
|
const seen = /* @__PURE__ */ new Map();
|
||||||
while (current) {
|
while (current) {
|
||||||
const fromDeclaration = getDefaultLikeExportNameFromDeclaration(current);
|
const fromDeclaration = getDefaultLikeExportNameFromDeclaration(current);
|
||||||
if (fromDeclaration) {
|
if (fromDeclaration) {
|
||||||
|
|
@ -138686,6 +138770,7 @@ function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, pre
|
||||||
if (final) return final;
|
if (final) return final;
|
||||||
}
|
}
|
||||||
chain = append(chain, current);
|
chain = append(chain, current);
|
||||||
|
if (!addToSeen(seen, current)) break;
|
||||||
current = current.flags & 2097152 /* Alias */ ? checker.getImmediateAliasedSymbol(current) : void 0;
|
current = current.flags & 2097152 /* Alias */ ? checker.getImmediateAliasedSymbol(current) : void 0;
|
||||||
}
|
}
|
||||||
for (const symbol of chain ?? emptyArray) {
|
for (const symbol of chain ?? emptyArray) {
|
||||||
|
|
@ -141124,7 +141209,7 @@ function getSourceMapper(host) {
|
||||||
}
|
}
|
||||||
const options = program.getCompilerOptions();
|
const options = program.getCompilerOptions();
|
||||||
const outPath = options.outFile;
|
const outPath = options.outFile;
|
||||||
const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), currentDirectory, program.getCommonSourceDirectory(), getCanonicalFileName);
|
const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), program);
|
||||||
if (declarationPath === void 0) return void 0;
|
if (declarationPath === void 0) return void 0;
|
||||||
const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);
|
const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);
|
||||||
return newLoc === info ? void 0 : newLoc;
|
return newLoc === info ? void 0 : newLoc;
|
||||||
|
|
@ -147943,9 +148028,9 @@ var NodeObject = class {
|
||||||
getChildAt(index, sourceFile) {
|
getChildAt(index, sourceFile) {
|
||||||
return this.getChildren(sourceFile)[index];
|
return this.getChildren(sourceFile)[index];
|
||||||
}
|
}
|
||||||
getChildren(sourceFile) {
|
getChildren(sourceFile = getSourceFileOfNode(this)) {
|
||||||
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");
|
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");
|
||||||
return getNodeChildren(this) ?? setNodeChildren(this, createChildren(this, sourceFile));
|
return getNodeChildren(this, sourceFile) ?? setNodeChildren(this, sourceFile, createChildren(this, sourceFile));
|
||||||
}
|
}
|
||||||
getFirstToken(sourceFile) {
|
getFirstToken(sourceFile) {
|
||||||
this.assertHasRealPosition();
|
this.assertHasRealPosition();
|
||||||
|
|
@ -148026,7 +148111,7 @@ function createSyntaxList(nodes, parent2) {
|
||||||
pos = node.end;
|
pos = node.end;
|
||||||
}
|
}
|
||||||
addSyntheticNodes(children, pos, nodes.end, parent2);
|
addSyntheticNodes(children, pos, nodes.end, parent2);
|
||||||
setNodeChildren(list, children);
|
list._children = children;
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
var TokenOrIdentifierObject = class {
|
var TokenOrIdentifierObject = class {
|
||||||
|
|
@ -161234,6 +161319,14 @@ function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget)
|
||||||
function visit(node) {
|
function visit(node) {
|
||||||
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
||||||
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
||||||
|
if (!firstIdentifier.symbol) {
|
||||||
|
return visitEachChild(
|
||||||
|
node,
|
||||||
|
visit,
|
||||||
|
/*context*/
|
||||||
|
void 0
|
||||||
|
);
|
||||||
|
}
|
||||||
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
||||||
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
||||||
symbols = append(symbols, firstIdentifier.symbol);
|
symbols = append(symbols, firstIdentifier.symbol);
|
||||||
|
|
@ -167625,7 +167718,7 @@ function getContainingModuleSymbol(importer, checker) {
|
||||||
return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
|
return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);
|
||||||
}
|
}
|
||||||
function getSourceFileLikeForImportDeclaration(node) {
|
function getSourceFileLikeForImportDeclaration(node) {
|
||||||
if (node.kind === 213 /* CallExpression */) {
|
if (node.kind === 213 /* CallExpression */ || node.kind === 351 /* JSDocImportTag */) {
|
||||||
return node.getSourceFile();
|
return node.getSourceFile();
|
||||||
}
|
}
|
||||||
const { parent: parent2 } = node;
|
const { parent: parent2 } = node;
|
||||||
|
|
@ -180368,6 +180461,7 @@ __export(ts_exports2, {
|
||||||
trace: () => trace,
|
trace: () => trace,
|
||||||
tracing: () => tracing,
|
tracing: () => tracing,
|
||||||
tracingEnabled: () => tracingEnabled,
|
tracingEnabled: () => tracingEnabled,
|
||||||
|
transferSourceFileChildren: () => transferSourceFileChildren,
|
||||||
transform: () => transform,
|
transform: () => transform,
|
||||||
transformClassFields: () => transformClassFields,
|
transformClassFields: () => transformClassFields,
|
||||||
transformDeclarations: () => transformDeclarations,
|
transformDeclarations: () => transformDeclarations,
|
||||||
|
|
@ -183190,7 +183284,7 @@ var Project3 = class _Project {
|
||||||
this.generatedFilesMap.forEach((watcher, source) => {
|
this.generatedFilesMap.forEach((watcher, source) => {
|
||||||
const sourceFile = this.program.getSourceFileByPath(source);
|
const sourceFile = this.program.getSourceFileByPath(source);
|
||||||
if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher(
|
if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher(
|
||||||
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName),
|
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program),
|
||||||
watcher
|
watcher
|
||||||
)) {
|
)) {
|
||||||
closeFileWatcherOf(watcher);
|
closeFileWatcherOf(watcher);
|
||||||
|
|
@ -194798,6 +194892,7 @@ if (typeof console !== "undefined") {
|
||||||
trace,
|
trace,
|
||||||
tracing,
|
tracing,
|
||||||
tracingEnabled,
|
tracingEnabled,
|
||||||
|
transferSourceFileChildren,
|
||||||
transform,
|
transform,
|
||||||
transformClassFields,
|
transformClassFields,
|
||||||
transformDeclarations,
|
transformDeclarations,
|
||||||
|
|
|
||||||
4
node_modules/typescript/package.json
generated
vendored
4
node_modules/typescript/package.json
generated
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "typescript",
|
"name": "typescript",
|
||||||
"author": "Microsoft Corp.",
|
"author": "Microsoft Corp.",
|
||||||
"homepage": "https://www.typescriptlang.org/",
|
"homepage": "https://www.typescriptlang.org/",
|
||||||
"version": "5.5.3",
|
"version": "5.5.4",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "TypeScript is a language for application scale JavaScript development",
|
"description": "TypeScript is a language for application scale JavaScript development",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
@ -112,5 +112,5 @@
|
||||||
"node": "20.1.0",
|
"node": "20.1.0",
|
||||||
"npm": "8.19.4"
|
"npm": "8.19.4"
|
||||||
},
|
},
|
||||||
"gitHead": "f0e992167440686f948965e5441a918b34251886"
|
"gitHead": "c8a7d589e647e19c94150d9892909f3aa93e48eb"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue