mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
chore: skip type check for low quality codes
This commit is contained in:
@@ -58,6 +58,7 @@ export const AppState = createContext<AppStateContext>({
|
||||
loadPage: () => Promise.resolve(null),
|
||||
createPage: () => Promise.resolve(null),
|
||||
synced: false,
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
refreshWorkspacesMeta: () => {},
|
||||
workspaces: {},
|
||||
});
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function debounce(fn: Function, timeout: number) {
|
||||
let timeoutId: any;
|
||||
|
||||
return function (this: any) {
|
||||
clearTimeout(timeoutId);
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
timeoutId = setTimeout(() => fn.apply(this, arguments), timeout);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user