AnyDataFunction
A structural function constraint for type inference.
Compatibility
ReactAvailable in this renderer's browser integration.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactAvailable in this renderer's browser integration.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
Import from @kasperrt/smolter/react @kasperrt/smolter/preact
Signature
type AnyDataFunction = (...args: never[]) => unknown;Usage
A structural function constraint for type inference. It lets DataOf extract the return type from handlers with more specific arguments. It is a type utility, not an executable handler.
type Data = DataOf<typeof loader>;