index.d.mts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import * as BabelCore from '@babel/core';
  2. import { Options } from '@vue/babel-plugin-resolve-type';
  3. type State = {
  4. get: (name: string) => any;
  5. set: (name: string, value: any) => any;
  6. opts: VueJSXPluginOptions;
  7. file: BabelCore.BabelFile;
  8. };
  9. interface VueJSXPluginOptions {
  10. /** transform `on: { click: xx }` to `onClick: xxx` */
  11. transformOn?: boolean;
  12. /** enable optimization or not. */
  13. optimize?: boolean;
  14. /** merge static and dynamic class / style attributes / onXXX handlers */
  15. mergeProps?: boolean;
  16. /** configuring custom elements */
  17. isCustomElement?: (tag: string) => boolean;
  18. /** enable object slots syntax */
  19. enableObjectSlots?: boolean;
  20. /** Replace the function used when compiling JSX expressions */
  21. pragma?: string;
  22. /**
  23. * (**Experimental**) Infer component metadata from types (e.g. `props`, `emits`, `name`)
  24. * @default false
  25. */
  26. resolveType?: Options | boolean;
  27. }
  28. declare const _default: (api: object, options: VueJSXPluginOptions | null | undefined, dirname: string) => BabelCore.PluginObj<State>;
  29. export { type VueJSXPluginOptions, _default as default };