parseDirectives.d.ts 611 B

12345678910111213141516171819
  1. import * as t from '@babel/types';
  2. import { NodePath } from '@babel/traverse';
  3. import type { State } from './interface';
  4. export declare type Tag = t.Identifier | t.MemberExpression | t.StringLiteral | t.CallExpression;
  5. declare const parseDirectives: (params: {
  6. name: string;
  7. path: NodePath<t.JSXAttribute>;
  8. value: t.Expression | null;
  9. state: State;
  10. tag: Tag;
  11. isComponent: boolean;
  12. }) => {
  13. directiveName: string;
  14. modifiers: Set<string>[];
  15. values: (t.Expression | null)[];
  16. args: t.Expression[];
  17. directive: t.Expression[] | undefined;
  18. };
  19. export default parseDirectives;