UNPKG

babel-plugin-transform-reblend-function-to-class

Version:

13 lines (12 loc) 1.02 kB
import * as t from '@babel/types'; import type { PluginPass, NodePath } from '@babel/core'; export declare const REBLEND_IMPORT_NAME_ID = "id/REBLEND_IMPORT_NAME_ID"; export declare const TRANSFORMED_COMMENT = " @Reblend: Transformed from function to class "; export declare function hasReblendComment(commentSuffix: string, path: NodePath): boolean; export declare function getProps(node: t.Function): (t.Identifier | t.RestElement | t.Pattern)[] | (t.Identifier | t.RestElement | t.TSParameterProperty | t.Pattern)[]; export declare function findReblendImportName(path: NodePath<t.Function> | NodePath<t.Program>): t.Identifier | t.MemberExpression; export declare const isComponentName: (functionName: string) => boolean; export declare const isHookName: (functionName: string) => boolean | ""; export declare const get: (pass: PluginPass, name: string) => any; export declare const set: (pass: PluginPass, name: string, v: any) => void; export declare const isTypescriptNode: (node: t.Node) => node is t.TSType;