Skip to content

Commit

Permalink
Re-export pool related types in order to make them accessible for use…
Browse files Browse the repository at this point in the history
…rs (#373)

* Re-export pool related types in order to make them accesible

* Add new-line at the end of index.js file

Co-authored-by: Sebastian Trebunak <[email protected]>
  • Loading branch information
sebqq and Sebastian Trebunak authored Feb 16, 2022
1 parent fead15a commit 7ef6eed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export * from "./master/index"
export { expose } from "./worker/index"
export { DefaultSerializer, JsonSerializable, Serializer, SerializerImplementation } from "./serializers"
export { Transfer, TransferDescriptor } from "./transferable"
export { ExposedToThreadType as ExposedAs } from "./master/spawn";
export { QueuedTask } from "./master/pool";
2 changes: 1 addition & 1 deletion src/master/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createProxyFunction, createProxyModule } from "./invocation-proxy"
type ArbitraryWorkerInterface = WorkerFunction & WorkerModule<string> & { somekeythatisneverusedinproductioncode123: "magicmarker123" }
type ArbitraryThreadType = FunctionThread<any, any> & ModuleThread<any>

type ExposedToThreadType<Exposed extends WorkerFunction | WorkerModule<any>> =
export type ExposedToThreadType<Exposed extends WorkerFunction | WorkerModule<any>> =
Exposed extends ArbitraryWorkerInterface
? ArbitraryThreadType
: Exposed extends WorkerFunction
Expand Down

0 comments on commit 7ef6eed

Please sign in to comment.