MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / createTimeout

Function createTimeout

src/platform/common/utils/async.unit.test.ts:64–69  ·  view source on GitHub ↗
(timeout: number, value: unknown)

Source from the content-addressed store, hash-verified

62 timeoutsToClear = [];
63 });
64 function createTimeout(timeout: number, value: unknown) {
65 return new Promise((resolve) => {
66 const timeoutId = setTimeout(() => resolve(value), timeout);
67 timeoutsToClear.push(timeoutId);
68 });
69 }
70 test('timeout', async () => {
71 const result = raceTimeout(10, createTimeout(200, 'Hello World'));
72

Callers 1

async.unit.test.tsFile · 0.85

Calls 2

pushMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected