mtt-4242
mtt-4242
Explore posts from servers
SSolidJS
Created by mtt-4242 on 10/6/2024 in #support
get return cache type
does a generic type for return cache fonction exist ? did i miss it ? right now, i do it on my own but i feel this should be import from solid
type CachedFunctionResolved<T extends (...args: any[]) => Promise<unknown>> = Accessor<Awaited<ReturnType<T>>>;

const C = (props:{ data: CachedFunctionResolved<typeof getData> }) => ...
type CachedFunctionResolved<T extends (...args: any[]) => Promise<unknown>> = Accessor<Awaited<ReturnType<T>>>;

const C = (props:{ data: CachedFunctionResolved<typeof getData> }) => ...
1 replies