MCPcopy Create free account
hub / github.com/byte-fe/react-model / timeout

Function timeout

src/helper.ts:79–85  ·  view source on GitHub ↗
(ms: number, data: T)

Source from the content-addressed store, hash-verified

77 p.reduce((xs: any, key) => (xs && xs[key] ? xs[key] : null), o)
78
79const timeout = <T>(ms: number, data: T): Promise<T> =>
80 new Promise((resolve) =>
81 setTimeout(() => {
82 console.log(ms)
83 resolve(data)
84 }, ms)
85 )
86
87const getInitialState = async <T extends { modelName: string | string[] }>(
88 context?: T,

Callers 6

getNewStateWithCacheFunction · 0.90
connect.spec.tsxFile · 0.90
index.tsFile · 0.90
delayMiddlewareFunction · 0.90
class.spec.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…