Skip to content

Commit 11e42ba

Browse files
committed
chore: enhance typings
1 parent 85bb38c commit 11e42ba

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/types.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ declare global {
55
interface ASTNode extends estree.BaseNode {
66
[_: string]: any; // TODO: fixme
77
}
8-
type Scope = eslint.Scope.Scope;
8+
interface Reference extends eslint.Scope.Reference {
9+
identifier: eslint.Scope.Reference['identifier'] & { parent?: ASTNode };
10+
}
11+
interface Variable extends eslint.Scope.Variable {
12+
references: Reference[]
13+
}
14+
interface Scope extends eslint.Scope.Scope {
15+
block: estree.Node & ASTNode;
16+
variableScope: Scope
17+
childScopes: Scope[]
18+
variables: Variable[]
19+
}
920
type Token = eslint.AST.Token;
1021
type Fixer = eslint.Rule.RuleFixer;
1122
type JSXAttribute = ASTNode;

0 commit comments

Comments
 (0)