11import { CancellationSource } from "../cancellation/CancellationSource.js" ;
22import { CancelledMessage } from "../cancellation/CancelledMessage.js" ;
3- import type { AsyncMessage , DisconnectFn , IWorker , QueueingOptions , WorkItemData } from "../workers.js" ;
3+ import type { AsyncMessageUntyped , DisconnectFn , IWorker , QueueingOptions , WorkItemData } from "../workers.js" ;
44import { WorkItemStatus , type WorkItemStatusEnum } from "./AsyncWorker.js" ;
5- import { WorkerTerminatedMessage } from "./WorkerTerminatedMessage" ;
5+ import { WorkerTerminatedMessage } from "./WorkerTerminatedMessage.js " ;
66
77export class WorkItemInternal < TResult = any > {
88 worker ;
@@ -13,7 +13,7 @@ export class WorkItemInternal<TResult = any> {
1313 status : WorkItemStatusEnum ;
1414 disconnect : DisconnectFn | undefined ;
1515
16- constructor ( worker : IWorker , data : WorkItemData < TResult > , options : QueueingOptions | undefined ) {
16+ constructor ( worker : IWorker , data : WorkItemData < TResult > , options ? : QueueingOptions | undefined ) {
1717 this . status = WorkItemStatus . Enqueued ;
1818 this . cancelled = false ;
1919 this . worker = worker ;
@@ -57,7 +57,7 @@ export class WorkItemInternal<TResult = any> {
5757 return ;
5858 }
5959 this . status = WorkItemStatus . Started ;
60- const wiPayload : AsyncMessage = {
60+ const wiPayload : AsyncMessageUntyped = {
6161 workItemId : this . data . id ,
6262 task : this . data . task ,
6363 cancelToken : this . cancellationSource ?. token ,
0 commit comments