Skip to content

Commit 27de051

Browse files
committed
add explanatory comment to estree.d.ts
1 parent 1ffacf7 commit 27de051

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

types/estree.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { Program as EstreeProgram } from 'estree';
22

3+
/**
4+
* This file augments the `estree` types to include a couple of types that are not built-in to `estree` that we're using.
5+
* This is necessary because the `estree` types are used by ESLint, and ESLint does not natively support
6+
* TypeScript types. Since we're only using a couple of them, we can just add them here, rather than
7+
* installing typescript estree types.
8+
*
9+
* This also adds support for the AST mutation that the ESLint does to add parent nodes.
10+
*/
311
declare module 'estree' {
412
interface BaseNode {
513
parent: Node;

0 commit comments

Comments
 (0)