MCPcopy Create free account
hub / github.com/TanStack/db / isPromiseLike

Function isPromiseLike

packages/offline-transactions/src/api/OfflineAction.ts:10–16  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

8} from '../types'
9
10function isPromiseLike(value: unknown): value is PromiseLike<unknown> {
11 return (
12 !!value &&
13 (typeof value === `object` || typeof value === `function`) &&
14 typeof (value as { then?: unknown }).then === `function`
15 )
16}
17
18export function createOfflineAction<T>(
19 options: CreateOfflineActionOptions<T>,

Callers 1

createOfflineActionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected