chore: skip type check for low quality codes

This commit is contained in:
DarkSky
2022-12-23 12:58:51 +08:00
parent 5b1a43f16b
commit 5952e9a2bb
2 changed files with 3 additions and 0 deletions
@@ -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: {},
});
+2
View File
@@ -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);
};
}