mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add a lightweight walk to bind object type literals in JSDoc.
This commit is contained in:
+12
-2
@@ -2456,13 +2456,23 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
for (const j of node.jsDoc!) {
|
||||
setParent(j, node);
|
||||
setParentRecursive(j, /*incremental*/ false);
|
||||
setParentsAndBindAnonymousJSDocTypes(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setParentsAndBindAnonymousJSDocTypes(node: Node) {
|
||||
setParent(node, parent);
|
||||
const saveParent = parent;
|
||||
parent = node;
|
||||
if (node.kind === SyntaxKind.TypeLiteral) {
|
||||
bindWorker(node);
|
||||
}
|
||||
forEachChild(node, setParentsAndBindAnonymousJSDocTypes);
|
||||
parent = saveParent;
|
||||
}
|
||||
|
||||
function updateStrictModeStatementList(statements: NodeArray<Statement>) {
|
||||
if (!inStrictMode) {
|
||||
for (const statement of statements) {
|
||||
|
||||
Reference in New Issue
Block a user