mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Refactor: use foxts more
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { task } from './trace';
|
||||
import { SHARED_DESCRIPTION } from './constants/description';
|
||||
import { createMemoizedPromise } from './lib/memo-promise';
|
||||
import { once } from 'foxts/once';
|
||||
import { RulesetOutput } from './lib/rules/ruleset';
|
||||
import Worktank from 'worktank';
|
||||
|
||||
@@ -44,7 +44,7 @@ const pool = new Worktank({
|
||||
}
|
||||
});
|
||||
|
||||
export const getMicrosoftCdnRulesetPromise = createMemoizedPromise<[domains: string[], domainSuffixes: string[]]>(async () => {
|
||||
export const getMicrosoftCdnRulesetPromise = once<Promise<[domains: string[], domainSuffixes: string[]]>>(async () => {
|
||||
const res = await pool.exec(
|
||||
'getMicrosoftCdnRuleset',
|
||||
[import.meta.url]
|
||||
|
||||
Reference in New Issue
Block a user