Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region-based semantic diagnostics #57842

Merged
merged 83 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ce6ed79
WIP
gabritto Feb 27, 2024
33ed16a
add nodesToCheck param; compute it from ranges
gabritto Mar 1, 2024
cf54694
more end-to-end changes
gabritto Mar 2, 2024
9647997
lint fixes, api baseline changes
gabritto Mar 2, 2024
9cd0edc
small fix, update baseline
gabritto Mar 4, 2024
eeb91c5
get project right before checking for errors
gabritto Mar 4, 2024
38861fb
fix type error and tests
gabritto Mar 5, 2024
b46560a
WIP: return spans in region diagnostics event
gabritto Mar 7, 2024
22637a4
add perf for testing
gabritto Mar 8, 2024
6e03d01
include less nodes in nodes to check
gabritto Mar 12, 2024
7af55c2
add unit test, more fixes
gabritto Mar 15, 2024
1d2b665
fix things and add unit test
gabritto Mar 15, 2024
e0cf3c6
Merge branch 'main' into gabritto/regiondiag
gabritto Mar 19, 2024
c25a879
refactors
gabritto Mar 19, 2024
0a55946
refactor type
gabritto Mar 19, 2024
1b4e458
update protocol comment
gabritto Mar 22, 2024
a936ff0
restore checker arrays between region and full check
gabritto Mar 26, 2024
13543e1
fmt
gabritto Mar 26, 2024
7b53e4f
only include unused directive errors for checked range
gabritto Mar 28, 2024
69aacf4
properly compute checked span
gabritto Mar 28, 2024
63c543d
update comments
gabritto Mar 28, 2024
b51921d
pass around compressed spans so that we do unused directive check mor…
gabritto Mar 28, 2024
aac18b1
Revert "pass around compressed spans so that we do unused directive c…
gabritto Mar 31, 2024
9a1c344
don't error on unused directives
gabritto Mar 31, 2024
64d0699
tweak node selection
gabritto Apr 1, 2024
d445be5
add region semantic test infra; inconsistent diagnostic test
gabritto Apr 1, 2024
43712cd
Merge branch 'main' into gabritto/regiondiag
gabritto Apr 1, 2024
ab5a25c
update test baseline
gabritto Apr 1, 2024
148f9ad
add inconsistent 2307 test
gabritto Apr 2, 2024
58a4f5f
2354 inconsistent position test
gabritto Apr 2, 2024
1ac37e8
test for extra 2344
gabritto Apr 2, 2024
9276bd3
add test for spans checked by region check
gabritto Apr 3, 2024
caf6fc4
add test for extra 2416
gabritto Apr 3, 2024
e102e49
add test for 2740 extra
gabritto Apr 3, 2024
32ec3b1
add test for react error
gabritto Apr 4, 2024
52b9e33
avoid re-checking nodes
gabritto Apr 10, 2024
80698d3
format
gabritto Apr 10, 2024
467b1a2
Merge branch 'main' into gabritto/regiondiag
gabritto Apr 25, 2024
ae6a7ec
remove console.log
gabritto Apr 26, 2024
0a47d91
Merge branch 'main' into gabritto/regiondiag
gabritto Apr 29, 2024
46813c7
update baseline
gabritto Apr 29, 2024
dee2885
remove failing tests
gabritto May 3, 2024
898325f
Merge branch 'main' into gabritto/regiondiag
gabritto May 3, 2024
13a7ab7
fmt
gabritto May 3, 2024
7e8d763
fix default for var
gabritto May 3, 2024
b51af9c
CR: get rid of unnecessary boolean flag for partial check
gabritto May 21, 2024
a3cdc74
CR: get rid of option to exclude duration from diagnostics event, san…
gabritto May 21, 2024
4d3f068
CR: make `shouldDoRegionCheck` internal and override it in `TestSession`
gabritto May 21, 2024
11b7966
CR: clean up session's semantic check perf data when file is closed
gabritto May 21, 2024
f02cef4
CR: make unit test helper `verifyGetErrRequest` support region-based …
gabritto May 21, 2024
e62ec2e
CR: mark region diagnostics methods as internal
gabritto May 21, 2024
90ef005
CR: add test for multiple files; fix testing helper to support region…
gabritto May 22, 2024
eaa9b53
fix overload lint error
gabritto May 22, 2024
3e49b6b
CR: add unit tests with suggestions
gabritto May 22, 2024
0ef9bb8
change order of checking for files with specified regions
gabritto May 22, 2024
8e160cf
fix log sanitizing regex
gabritto May 22, 2024
30a0aad
Merge branch 'main' into gabritto/regiondiag
gabritto May 22, 2024
ece3c41
update unit tests logs with duration
gabritto May 23, 2024
0251194
remove unused baseline
gabritto May 23, 2024
7076d14
optimization: don't do region node selection if we will skip checking…
gabritto May 23, 2024
48f87a8
don't record semantic diagnostic time if could have done region check
gabritto May 23, 2024
81dc370
improve optimization
gabritto May 23, 2024
5e6ce98
add line count and use it for deciding on region check
gabritto May 24, 2024
3254be9
TEMPORARY FOR TESTING VSCODE
gabritto May 30, 2024
ef6e4d5
get rid of performance checking in heuristic for now
gabritto May 30, 2024
c07b226
CR: mark internal
gabritto May 30, 2024
1f262cd
CR: refactor session.ts
gabritto May 30, 2024
34bcbb2
always do semantic check in next immediate step
gabritto Jun 7, 2024
52eadaa
fix rebase problem
gabritto Jun 7, 2024
12979b7
fix baselines
gabritto Jun 10, 2024
830c118
check files in the order of the request
gabritto Jun 10, 2024
d3a8f41
refactor unit test
gabritto Jun 11, 2024
1752f8f
add option for test session to always enable region checking
gabritto Jun 11, 2024
9320a45
add test for skipped region diagnostics
gabritto Jun 11, 2024
68831d1
format
gabritto Jun 11, 2024
2f2e02f
Merge branch 'main' into gabritto/regiondiag
gabritto Jun 11, 2024
eb168b6
add test for file with ts-nocheck
gabritto Jun 11, 2024
c571ae0
Merge branch 'main' into gabritto/regiondiag
gabritto Jun 12, 2024
7c512ac
add comments and minor refactor
gabritto Jun 12, 2024
9f2727b
Merge branch 'main' into gabritto/regiondiag
gabritto Jun 13, 2024
ec6772c
refactor
gabritto Jun 13, 2024
f1d87dc
refactor updateErrorCheck to delay work again
gabritto Jun 13, 2024
5ed581a
mark region threshold as internal
gabritto Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 68 additions & 14 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47103,6 +47103,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}

function checkSourceElementWorker(node: Node): void {
if (getNodeCheckFlags(node) & NodeCheckFlags.PartiallyTypeChecked) {
return;
}

if (canHaveJSDoc(node)) {
forEach(node.jsDoc, ({ comment, tags }) => {
checkJSDocCommentWorker(comment);
Expand Down Expand Up @@ -47131,6 +47135,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected);
}

// If editing this, keep `isSourceElement` in utilities up to date.
switch (kind) {
case SyntaxKind.TypeParameter:
return checkTypeParameter(node as TypeParameterDeclaration);
Expand Down Expand Up @@ -47495,12 +47500,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
tracing?.pop();
}

function checkSourceFile(node: SourceFile) {
tracing?.push(tracing.Phase.Check, "checkSourceFile", { path: node.path }, /*separateBeginAndEnd*/ true);
performance.mark("beforeCheck");
checkSourceFileWorker(node);
performance.mark("afterCheck");
performance.measure("Check", "beforeCheck", "afterCheck");
function checkSourceFile(node: SourceFile, nodesToCheck: Node[] | undefined) {
tracing?.push(tracing.Phase.Check, nodesToCheck ? "checkSourceFileNodes" : "checkSourceFile", { path: node.path }, /*separateBeginAndEnd*/ true);
const beforeMark = nodesToCheck ? "beforeCheckNodes" : "beforeCheck";
const afterMark = nodesToCheck ? "afterCheckNodes" : "afterCheck";
performance.mark(beforeMark);
nodesToCheck ? checkSourceFileNodesWorker(node, nodesToCheck) : checkSourceFileWorker(node);
performance.mark(afterMark);
performance.measure("Check", beforeMark, afterMark);
tracing?.pop();
}

Expand Down Expand Up @@ -47539,6 +47546,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
clear(potentialReflectCollisions);
clear(potentialUnusedRenamedBindingElementsInTypes);

if (links.flags & NodeCheckFlags.PartiallyTypeChecked) {
potentialThisCollisions = links.potentialThisCollisions!;
potentialNewTargetCollisions = links.potentialNewTargetCollisions!;
potentialWeakMapSetCollisions = links.potentialWeakMapSetCollisions!;
potentialReflectCollisions = links.potentialReflectCollisions!;
potentialUnusedRenamedBindingElementsInTypes = links.potentialUnusedRenamedBindingElementsInTypes!;
}

forEach(node.statements, checkSourceElement);
checkSourceElement(node.endOfFileToken);

Expand Down Expand Up @@ -47590,13 +47605,49 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
}

function getDiagnostics(sourceFile: SourceFile, ct: CancellationToken): Diagnostic[] {
function checkSourceFileNodesWorker(file: SourceFile, nodes: readonly Node[]) {
const links = getNodeLinks(file);
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
if (skipTypeChecking(file, compilerOptions, host)) {
return;
}

// Grammar checking
checkGrammarSourceFile(file);

clear(potentialThisCollisions);
clear(potentialNewTargetCollisions);
clear(potentialWeakMapSetCollisions);
clear(potentialReflectCollisions);
clear(potentialUnusedRenamedBindingElementsInTypes);

forEach(nodes, checkSourceElement);

checkDeferredNodes(file);

(links.potentialThisCollisions || (links.potentialThisCollisions = [])).push(...potentialThisCollisions);
(links.potentialNewTargetCollisions || (links.potentialNewTargetCollisions = [])).push(...potentialNewTargetCollisions);
(links.potentialWeakMapSetCollisions || (links.potentialWeakMapSetCollisions = [])).push(...potentialWeakMapSetCollisions);
(links.potentialReflectCollisions || (links.potentialReflectCollisions = [])).push(...potentialReflectCollisions);
(links.potentialUnusedRenamedBindingElementsInTypes || (links.potentialUnusedRenamedBindingElementsInTypes = [])).push(
...potentialUnusedRenamedBindingElementsInTypes,
);

links.flags |= NodeCheckFlags.PartiallyTypeChecked;
for (const node of nodes) {
const nodeLinks = getNodeLinks(node);
nodeLinks.flags |= NodeCheckFlags.PartiallyTypeChecked;
}
}
}

function getDiagnostics(sourceFile: SourceFile, ct: CancellationToken, nodesToCheck?: Node[]): Diagnostic[] {
try {
// Record the cancellation token so it can be checked later on during checkSourceElement.
// Do this in a finally block so we can ensure that it gets reset back to nothing after
// this call is done.
cancellationToken = ct;
return getDiagnosticsWorker(sourceFile);
return getDiagnosticsWorker(sourceFile, nodesToCheck);
}
finally {
cancellationToken = undefined;
Expand All @@ -47611,7 +47662,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
deferredDiagnosticsCallbacks = [];
}

function checkSourceFileWithEagerDiagnostics(sourceFile: SourceFile) {
function checkSourceFileWithEagerDiagnostics(sourceFile: SourceFile, nodesToCheck?: Node[]) {
ensurePendingDiagnosticWorkComplete();
// then setup diagnostics for immediate invocation (as we are about to collect them, and
// this avoids the overhead of longer-lived callbacks we don't need to allocate)
Expand All @@ -47620,11 +47671,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// thus much more likely retaining the same union ordering as before we had lazy diagnostics)
const oldAddLazyDiagnostics = addLazyDiagnostic;
addLazyDiagnostic = cb => cb();
checkSourceFile(sourceFile);
checkSourceFile(sourceFile, nodesToCheck);
addLazyDiagnostic = oldAddLazyDiagnostics;
}

function getDiagnosticsWorker(sourceFile: SourceFile): Diagnostic[] {
function getDiagnosticsWorker(sourceFile: SourceFile, nodesToCheck: Node[] | undefined): Diagnostic[] {
if (sourceFile) {
ensurePendingDiagnosticWorkComplete();
// Some global diagnostics are deferred until they are needed and
Expand All @@ -47633,9 +47684,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length;

checkSourceFileWithEagerDiagnostics(sourceFile);

checkSourceFileWithEagerDiagnostics(sourceFile, nodesToCheck);
const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName);
if (nodesToCheck) {
// No need to get global diagnostics.
return semanticDiagnostics;
}
const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
if (currentGlobalDiagnostics !== previousGlobalDiagnostics) {
// If the arrays are not the same reference, new diagnostics were added.
Expand All @@ -47654,7 +47708,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {

// Global diagnostics are always added when a file is not provided to
// getDiagnostics
forEach(host.getSourceFiles(), checkSourceFileWithEagerDiagnostics);
forEach(host.getSourceFiles(), file => checkSourceFileWithEagerDiagnostics(file));
return diagnostics.getDiagnostics();
}

Expand Down
64 changes: 45 additions & 19 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ import {
ScriptTarget,
setParent,
setParentRecursive,
shouldIncludeBindAndCheckDiagnostics,
skipTrivia,
skipTypeChecking,
some,
Expand Down Expand Up @@ -2927,8 +2928,12 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
}

function getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[] {
return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken);
function getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken, nodesToCheck?: Node[]): readonly Diagnostic[] {
return getDiagnosticsHelper(
sourceFile,
(sourceFile, cancellationToken) => getSemanticDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck),
cancellationToken,
);
}

function getCachedSemanticDiagnostics(sourceFile?: SourceFile): readonly Diagnostic[] | undefined {
Expand All @@ -2938,7 +2943,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
}

function getBindAndCheckDiagnostics(sourceFile: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[] {
return getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken);
return getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, /*nodesToCheck*/ undefined);
}

function getProgramDiagnostics(sourceFile: SourceFile): readonly Diagnostic[] {
Expand Down Expand Up @@ -2992,18 +2997,33 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
}
}

function getSemanticDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): readonly Diagnostic[] {
function getSemanticDiagnosticsForFile(
sourceFile: SourceFile,
cancellationToken: CancellationToken | undefined,
nodesToCheck: Node[] | undefined,
): readonly Diagnostic[] {
return concatenate(
filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken), options),
filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck), options),
getProgramDiagnostics(sourceFile),
);
}

function getBindAndCheckDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): readonly Diagnostic[] {
function getBindAndCheckDiagnosticsForFile(
sourceFile: SourceFile,
cancellationToken: CancellationToken | undefined,
nodesToCheck: Node[] | undefined,
): readonly Diagnostic[] {
if (nodesToCheck) {
return getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck);
}
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache);
}

function getBindAndCheckDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): readonly Diagnostic[] {
function getBindAndCheckDiagnosticsForFileNoCache(
sourceFile: SourceFile,
cancellationToken: CancellationToken | undefined,
nodesToCheck?: Node[],
): readonly Diagnostic[] {
return runWithCancellationToken(() => {
if (skipTypeChecking(sourceFile, options, program)) {
return emptyArray;
Expand All @@ -3014,35 +3034,41 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
Debug.assert(!!sourceFile.bindDiagnostics);

const isJs = sourceFile.scriptKind === ScriptKind.JS || sourceFile.scriptKind === ScriptKind.JSX;
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
const isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;

// By default, only type-check .ts, .tsx, Deferred, plain JS, checked JS and External
// - plain JS: .js files with no // ts-check and checkJs: undefined
// - check JS: .js files with either // ts-check or checkJs: true
// - external: files that are added by plugins
const includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === ScriptKind.TS || sourceFile.scriptKind === ScriptKind.TSX
|| sourceFile.scriptKind === ScriptKind.External || isPlainJs || isCheckJs || sourceFile.scriptKind === ScriptKind.Deferred);
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);

const includeBindAndCheckDiagnostics = shouldIncludeBindAndCheckDiagnostics(sourceFile, options);
let bindDiagnostics: readonly Diagnostic[] = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken, nodesToCheck) : emptyArray;
if (isPlainJs) {
bindDiagnostics = filter(bindDiagnostics, d => plainJSErrors.has(d.code));
checkDiagnostics = filter(checkDiagnostics, d => plainJSErrors.has(d.code));
}
// skip ts-expect-error errors in plain JS files, and skip JSDoc errors except in checked JS
return getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics && !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : undefined);
return getMergedBindAndCheckDiagnostics(
sourceFile,
includeBindAndCheckDiagnostics && !isPlainJs,
!!nodesToCheck,
bindDiagnostics,
checkDiagnostics,
isCheckJs ? sourceFile.jsDocDiagnostics : undefined,
);
});
}

function getMergedBindAndCheckDiagnostics(sourceFile: SourceFile, includeBindAndCheckDiagnostics: boolean, ...allDiagnostics: (readonly Diagnostic[] | undefined)[]) {
function getMergedBindAndCheckDiagnostics(sourceFile: SourceFile, includeBindAndCheckDiagnostics: boolean, partialCheck: boolean, ...allDiagnostics: (readonly Diagnostic[] | undefined)[]) {
const flatDiagnostics = flatten(allDiagnostics);
if (!includeBindAndCheckDiagnostics || !sourceFile.commentDirectives?.length) {
return flatDiagnostics;
}

const { diagnostics, directives } = getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, flatDiagnostics);

// When doing a partial check, we can't be sure a directive is unused.
if (partialCheck) {
return diagnostics;
}

for (const errorExpectation of directives.getUnusedExpectations()) {
diagnostics.push(createDiagnosticForRange(sourceFile, errorExpectation.range, Diagnostics.Unused_ts_expect_error_directive));
}
Expand Down
11 changes: 10 additions & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4714,6 +4714,9 @@ export interface Program extends ScriptReferenceHost {
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
/** The first time this is called, it will return global diagnostics (no location). */
getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
/** @internal */
getSemanticDiagnostics(sourceFile: SourceFile | undefined, cancellationToken: CancellationToken | undefined, nodesToCheck: Node[]): readonly Diagnostic[];

getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
getConfigFileParsingDiagnostics(): readonly Diagnostic[];
/** @internal */ getSuggestionDiagnostics(sourceFile: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
Expand Down Expand Up @@ -5262,7 +5265,7 @@ export interface TypeChecker {
/** @internal */ getSymbolWalker(accept?: (symbol: Symbol) => boolean): SymbolWalker;

// Should not be called directly. Should only be accessed through the Program instance.
/** @internal */ getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
/** @internal */ getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken, nodesToCheck?: Node[]): Diagnostic[];
/** @internal */ getGlobalDiagnostics(): Diagnostic[];
/** @internal */ getEmitResolver(sourceFile?: SourceFile, cancellationToken?: CancellationToken, forceDts?: boolean): EmitResolver;

Expand Down Expand Up @@ -6096,6 +6099,7 @@ export const enum NodeCheckFlags {
ContainsClassWithPrivateIdentifiers = 1 << 20, // Marked on all block-scoped containers containing a class with private identifiers.
ContainsSuperPropertyInStaticInitializer = 1 << 21, // Marked on all block-scoped containers containing a static initializer with 'super.x' or 'super[x]'.
InCheckIdentifier = 1 << 22,
PartiallyTypeChecked = 1 << 23, // Node has been partially type checked
}

/** @internal */
Expand Down Expand Up @@ -6139,6 +6143,11 @@ export interface NodeLinks {
parameterInitializerContainsUndefined?: boolean; // True if this is a parameter declaration whose type annotation contains "undefined".
fakeScopeForSignatureDeclaration?: "params" | "typeParams"; // If present, this is a fake scope injected into an enclosing declaration chain.
assertionExpressionType?: Type; // Cached type of the expression of a type assertion
potentialThisCollisions?: Node[];
potentialNewTargetCollisions?: Node[];
potentialWeakMapSetCollisions?: Node[];
potentialReflectCollisions?: Node[];
potentialUnusedRenamedBindingElementsInTypes?: BindingElement[];
}

/** @internal */
Expand Down
Loading