Browse Source

refactor: 改名

es6
iapyang 3 years ago
parent
commit
fd280e15eb
  1. 26
      typescript/core/worker/worker.core.ts

26
typescript/core/worker/worker.utils.ts → typescript/core/worker/worker.core.ts

@ -1,16 +1,16 @@
/**
*
*/
export const enum WorkerMessageType {
REQUEST = 'REQUEST',
REPLY = 'REPLY',
}
export const WorkerMessageType = {
REQUEST: 'REQUEST',
REPLY: 'REPLY',
};
/**
*
*/
export interface IWorkerMessage {
messageType: WorkerMessageType;
messageType: string;
actionType: string;
sessionId: string;
@ -30,3 +30,19 @@ export interface IWorkerController {
*/
actionHandler: (message: IWorkerMessage) => Promise<any>;
}
/**
* Worker创建配置
*/
export interface IWorkerOptions {
/**
* worker url
*/
workerUrl: string;
/**
* worker
*/
workerName: string;
}
Loading…
Cancel
Save