UNPKG

@tanstack/devtools-utils

Version:

TanStack Devtools utilities for creating your own devtools.

34 lines (33 loc) • 1.51 kB
import { TanStackDevtoolsPluginProps } from '@tanstack/devtools'; import { JSX } from 'solid-js'; /** * Constructs the core class for the Devtools. * This utility is used to construct a lazy loaded Solid component for the Devtools. * It returns a tuple containing the main DevtoolsCore class and a NoOpDevtoolsCore class. * The NoOpDevtoolsCore class is a no-op implementation that can be used for production if you want to explicitly exclude * the Devtools from your application. * @param importFn A function that returns a dynamic import of the Solid component * @returns Tuple containing the DevtoolsCore class and a NoOpDevtoolsCore class */ export declare function constructCoreClass(importFn: () => Promise<{ default: (props: TanStackDevtoolsPluginProps) => JSX.Element; }>): readonly [{ new (): { "__#private@#isMounted": boolean; "__#private@#isMounting": boolean; "__#private@#abortMount": boolean; "__#private@#dispose"?: () => void; mount<T extends HTMLElement>(el: T, props: TanStackDevtoolsPluginProps): Promise<void>; unmount(): void; }; }, { new (): { mount<T extends HTMLElement>(_el: T, _props: TanStackDevtoolsPluginProps): Promise<void>; unmount(): void; "__#private@#isMounted": boolean; "__#private@#isMounting": boolean; "__#private@#abortMount": boolean; "__#private@#dispose"?: () => void; }; }]; export type ClassType = ReturnType<typeof constructCoreClass>[0];