[babel-types] Add extra property to BaseNode type (#12136)

This commit is contained in:
Ryan Rhee
2020-10-09 10:29:04 -04:00
committed by GitHub
parent f6bd7493a8
commit ebec7c8baf
2 changed files with 2 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ declare class ${NODE_PREFIX} {
start: ?number; start: ?number;
end: ?number; end: ?number;
loc: ?${NODE_PREFIX}SourceLocation; loc: ?${NODE_PREFIX}SourceLocation;
extra?: { [string]: mixed };
}\n\n`; }\n\n`;
// //

View File

@@ -45,6 +45,7 @@ interface BaseNode {
end: number | null; end: number | null;
loc: SourceLocation | null; loc: SourceLocation | null;
type: Node["type"]; type: Node["type"];
extra?: Record<string, unknown>;
} }
export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; export type Node = ${t.TYPES.sort().join(" | ")};\n\n`;