[babel-types] Add extra property to BaseNode type (#12136)
This commit is contained in:
@@ -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`;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -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`;
|
||||||
|
|||||||
Reference in New Issue
Block a user