UNPKG

@preact-signals/safe-react

Version:
25 lines 921 B
import { types as BabelTypes, template as BabelTemplate, PluginObj } from "@babel/core"; interface PluginArgs { types: typeof BabelTypes; template: typeof BabelTemplate; } export interface PluginOptions { /** * Specify the mode to use: * - `auto`: Automatically wrap all components that use signals. * - `manual`: Only wrap components that are annotated with `@useSignals` in a JSX comment. * - `all`: Makes all components reactive to signals. * @default "all" */ mode?: "auto" | "manual" | "all"; /** Specify a custom package to import the `useSignals` hook from. * @default "@preact-signals/safe-react/tracking" */ importSource?: string; experimental?: { addHookUsageFlag?: boolean; }; } export default function signalsTransform({ types: t }: PluginArgs, options: PluginOptions): PluginObj; export {}; //# sourceMappingURL=babel.d.ts.map