A type that can be loaded directly, Promise or a function that returns the value or a Promise.
The type of the value that can be loaded (T can't be a function).
v0.0.1
// example resolving a Loadable stringasync function demo(loadable: Loadable<string>) { const value1: string = await (typeof loadable === 'function' ? loadable() : loadable); const value2: string = await resolveLoadable(loadable);} Copy
// example resolving a Loadable stringasync function demo(loadable: Loadable<string>) { const value1: string = await (typeof loadable === 'function' ? loadable() : loadable); const value2: string = await resolveLoadable(loadable);}
A type that can be loaded directly, Promise or a function that returns the value or a Promise.