From eacb4d8af90dfc983992bd4824779ebd6d8eb5be Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 3 Jan 2024 00:37:51 +0800 Subject: [PATCH] refactor: rename `lazy.ts` to `lazyLoad.ts` --- src/contentScripts/index.ts | 2 +- src/utils/{lazy.ts => lazyLoad.ts} | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename src/utils/{lazy.ts => lazyLoad.ts} (97%) diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index 821c63f5..748e4830 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -7,7 +7,7 @@ import App from './views/App.vue' import { setupApp } from '~/logic/common-setup' import { SVG_ICONS } from '~/utils/svgIcons' import { delay, injectCSS } from '~/utils/main' -import { runWhenIdle } from '~/utils/lazy' +import { runWhenIdle } from '~/utils/lazyLoad' import { settings } from '~/logic' const currentUrl = document.URL diff --git a/src/utils/lazy.ts b/src/utils/lazyLoad.ts similarity index 97% rename from src/utils/lazy.ts rename to src/utils/lazyLoad.ts index ffdbe6c9..6180711a 100644 --- a/src/utils/lazy.ts +++ b/src/utils/lazyLoad.ts @@ -28,6 +28,7 @@ interface IDisposable { * [setTimeout]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout */ +// eslint-disable-next-line import/no-mutable-exports export let runWhenIdle: (callback: (idle: IdleDeadline) => void, timeout?: number) => IDisposable declare function requestIdleCallback(callback: (args: IdleDeadline) => void, options?: { timeout: number }): number