添加设定界面 - #18 #21

Merged
lsr merged 24 commits from feat/settings into main 2023-06-10 15:23:21 +00:00
Showing only changes of commit 6cee2bbfd9 - Show all commits

View File

@ -1,10 +1,13 @@
type NextTickFn = (callback: () => void) => void; type NextTickFn = (callback: () => void) => void;
/* c8 ignore start */
const nextTickFn = const nextTickFn =
typeof setImmediate !== 'undefined' typeof setImmediate !== 'undefined'
? (setImmediate as NextTickFn) ? (setImmediate as NextTickFn)
: typeof requestAnimationFrame !== 'undefined' : typeof requestAnimationFrame !== 'undefined'
? (requestAnimationFrame as NextTickFn) ? (requestAnimationFrame as NextTickFn)
: (setTimeout as NextTickFn); : (setTimeout as NextTickFn);
/* c8 ignore stop */
export async function nextTickAsync() { export async function nextTickAsync() {
return new Promise<void>((resolve) => nextTickFn(resolve)); return new Promise<void>((resolve) => nextTickFn(resolve));