Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import type { ConstantUse, ConstantUsesInput } from "./ConstantUses.worker";
import {
createWorkerClient,
WorkerRequestOptions,
} from "renderer/lib/workers/createWorkerClient";
let client:
| ReturnType<typeof createWorkerClient<ConstantUsesInput, ConstantUse[]>>
| undefined;
const getClient = () => {
if (!client) {
client = createWorkerClient<ConstantUsesInput, ConstantUse[]>(
new Worker(new URL("./ConstantUses.worker.ts", import.meta.url)),
);
}
return client;
};
export const findConstantUses = (
input: ConstantUsesInput,
options?: WorkerRequestOptions,
) => getClient().request(input, options);
|