forked from bangle-io/bangle-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
missing-types.d.ts
49 lines (41 loc) · 1.13 KB
/
missing-types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
interface Lock {
readonly mode: 'exclusive' | 'shared';
readonly name: string;
}
interface LockInfo {
clientId?: string;
mode?: 'exclusive' | 'shared';
name?: string;
}
interface LockManagerSnapshot {
held?: LockInfo[] | undefined;
pending?: LockInfo[] | undefined;
}
interface LockManagerRequestOptions {
mode?: 'exclusive' | 'shared' | undefined;
ifAvailable?: boolean | undefined;
steal?: boolean | undefined;
signal?: AbortSignal | undefined;
}
interface LockManager {
request: ((
name: string,
callback: (lock: Lock) => Promise<any>,
) => Promise<undefined>) &
(<T extends LockManagerRequestOptions>(
name: string,
options: T,
callback: (
lock: T['ifAvailable'] extends true ? Lock | null : Lock,
) => Promise<any>,
) => Promise<undefined>);
query: () => Promise<LockManagerSnapshot>;
}
interface Navigator {
locks: LockManager;
}
declare var _e2eNaukarHelpers:
| undefined
| import('@bangle.io/e2e-types').E2ENaukarTypes;
declare var _nsmE2e: undefined | import('@bangle.io/e2e-types').NSME2eTypes;
declare var __BANGLE_INJECTED_CONFIG__: string | undefined;