Browse Source

refactor: 改名

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