(loader: () => Promise<{ default: T }>, meta: LazyMeta = {})
| 21 | * @warning The `prefix` in `meta` only holds metadata and does not apply the prefix to the lazy router, use `os.prefix(...).lazy(...)` instead. |
| 22 | */ |
| 23 | export function lazy<T>(loader: () => Promise<{ default: T }>, meta: LazyMeta = {}): Lazy<T> { |
| 24 | return { |
| 25 | [LAZY_SYMBOL]: { |
| 26 | loader, |
| 27 | meta, |
| 28 | }, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | export function isLazy(item: unknown): item is Lazy<any> { |
| 33 | return ( |
no outgoing calls