Buckets:
| export function initializationData<A>(state: (() => A | undefined) & { error: unknown }) { | |
| if (state.error !== undefined) throw markLocalServerStartup(state.error) | |
| return state() | |
| } | |
| function markLocalServerStartup(error: unknown) { | |
| const failure = error instanceof Error ? error : new Error(String(error)) | |
| const prefix = "Error invoking remote method 'await-initialization': Error: " | |
| if (failure.message.startsWith(prefix)) { | |
| const previous = failure.message | |
| failure.message = failure.message.slice(prefix.length) | |
| if (failure.stack) failure.stack = failure.stack.replace(`Error: ${previous}`, `Error: ${failure.message}`) | |
| } | |
| Object.defineProperty(failure, "localServerStartup", { value: true }) | |
| return failure | |
| } | |
| export function initializationReady<A>(state: (() => A | undefined) & { error: unknown; loading: boolean }) { | |
| if (state.loading) return false | |
| initializationData(state) | |
| return true | |
| } | |
Xet Storage Details
- Size:
- 928 Bytes
- Xet hash:
- 95c9fe31c2ddc630af0b0aeb65bcbdafb55b55eb94bbe65bca0eba68147e7278
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.