index.d.ts 336 B

12345678910111213141516
  1. import { NodePath, types } from '@babel/core';
  2. declare type tag = 'title' | 'desc';
  3. interface Options {
  4. tag: tag | null;
  5. }
  6. interface State {
  7. opts: Options;
  8. }
  9. declare const plugin: () => {
  10. visitor: {
  11. JSXElement(path: NodePath<types.JSXElement>, state: State): void;
  12. };
  13. };
  14. export { Options, plugin as default };