utils.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. import { AttributeNode, ComponentNode, DirectiveNode, ElementNode, RootNode, ExpressionNode, TemplateChildNode, TransformContext } from '@vue/compiler-core';
  2. export declare const VUE_REF = "r";
  3. export declare const VUE_REF_IN_FOR = "r-i-f";
  4. export declare function isVueSfcFile(id: string): boolean;
  5. export declare function isUserComponent(node: RootNode | TemplateChildNode, context: {
  6. isBuiltInComponent: TransformContext['isBuiltInComponent'];
  7. }): node is ComponentNode;
  8. export declare function createAttributeNode(name: string, content: string): AttributeNode;
  9. export declare function addStaticClass(node: ElementNode, clazz: string): string | number | undefined;
  10. export declare function createDirectiveNode(name: string, arg: string, exp?: string | ExpressionNode): DirectiveNode;
  11. export declare function createOnDirectiveNode(name: string, value: string): DirectiveNode;
  12. export declare function createBindDirectiveNode(name: string, value: string | ExpressionNode): DirectiveNode;
  13. export declare function createUniVueTransformAssetUrls(base: string): {
  14. base: string;
  15. includeAbsolute: boolean;
  16. tags: {
  17. audio: string[];
  18. video: string[];
  19. img: string[];
  20. image: string[];
  21. 'cover-image': string[];
  22. 'v-uni-audio': string[];
  23. 'v-uni-video': string[];
  24. 'v-uni-image': string[];
  25. 'v-uni-cover-image': string[];
  26. 'u-image': string[];
  27. 'u-video': string[];
  28. };
  29. };
  30. export declare function getBaseNodeTransforms(base: string): import("@vue/compiler-core").NodeTransform[];
  31. export declare function renameProp(name: string, prop?: DirectiveNode | AttributeNode): void;