H5-contact/node_modules/@dcloudio/uni-cli-shared/dist/workers.d.ts

17 lines
961 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { Plugin } from 'vite';
import type { UniXCompiler } from '@dcloudio/uni-uts-v1';
export declare function getWorkers(): Record<string, string>;
export declare function resolveWorkersRootDir(): string;
export declare function getWorkersRootDirs(): string[];
/**
* 遍历目录下的所有uts文件读取文件内容正则匹配出定义的worker返回文件名和类名的映射关系
* export class MyWorkerTask extends WorkerTaskImpl {}
* @param dir
*/
export declare function initWorkers(workersDirs: string[], rootDir: string): Record<string, string>;
export declare function uniWorkersPlugin(): Plugin;
export declare function resolveWorkersDir(inputDir: string): Array<string>;
export declare function normalizeJavaScriptWorkerSource(content: string): string;
export declare function uniJavaScriptWorkersPlugin(): Plugin;
export declare function initUniXCompilerRootWorkers(rootDir: string, compiler: UniXCompiler): Promise<void>;