mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Perf: preload/hoist more promises, make ts happy
This commit is contained in:
@@ -3,7 +3,7 @@ import { traceAsync } from './trace-runner';
|
||||
import { createMemoizedPromise } from './memo-promise';
|
||||
import { getPublicSuffixListTextPromise } from '../download-publicsuffixlist';
|
||||
|
||||
const customFetch = (url: string | URL) => Promise.resolve(Bun.file(url));
|
||||
const customFetch = (url: string | URL): Promise<Blob> => Promise.resolve(Bun.file(url));
|
||||
|
||||
export const getGorhillPublicSuffixPromise = createMemoizedPromise(() => traceAsync('create gorhill public suffix instance', async () => {
|
||||
const [publicSuffixListDat, { default: gorhill }] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user