Skip to content
Merged
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions packages/types/src/ts-estree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,34 @@ declare module './generated/ast-spec' {
| TSESTree.ImportDeclaration;
}

interface ExportDefaultDeclaration {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TSESTree.BlockStatement

TIL this does parse correctly despite the compiler complaint. Nifty.

}

interface ExportNamedDeclarationWithoutSourceWithMultiple {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}

interface ExportNamedDeclarationWithoutSourceWithSingle {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}

interface ExportNamedDeclarationWithSource {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}

interface FunctionDeclarationWithName {
parent:
| TSESTree.BlockStatement
| TSESTree.ExportDefaultDeclaration
| TSESTree.ExportNamedDeclaration
| TSESTree.Program;
}

interface FunctionDeclarationWithOptionalName {
parent: TSESTree.ExportDefaultDeclaration;
}

interface JSXAttribute {
parent: TSESTree.JSXOpeningElement;
}
Expand Down
Loading