1 | import { ConfigAPI, NodePath, types } from '@babel/core';
|
2 |
|
3 | interface Attribute {
|
4 | name: string;
|
5 | value?: boolean | number | string | null;
|
6 | spread?: boolean;
|
7 | literal?: boolean;
|
8 | position?: 'start' | 'end';
|
9 | }
|
10 | interface Options {
|
11 | elements: string[];
|
12 | attributes: Attribute[];
|
13 | }
|
14 | declare const addJSXAttribute: (_: ConfigAPI, opts: Options) => {
|
15 | visitor: {
|
16 | JSXOpeningElement(path: NodePath<types.JSXOpeningElement>): void;
|
17 | };
|
18 | };
|
19 |
|
20 | export { Attribute, Options, addJSXAttribute as default };
|