]> git.codecow.com Git - libnemo.git/commitdiff
Add worker-related types to definition file.
authorChris Duncan <chris@zoso.dev>
Thu, 17 Jul 2025 19:32:51 +0000 (12:32 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 17 Jul 2025 19:32:51 +0000 (12:32 -0700)
src/types.d.ts

index 81fe2f0b858a03b629542d96be1a8fa40ebff110..dfb5e6a52ca6e36e82bc0aec0d187524f2575100 100644 (file)
@@ -305,6 +305,27 @@ export type KeyPair = {
        index?: number
 }
 
+/**
+* Processes a queue of tasks using Web Workers.
+*/
+export declare class Queue {
+       static get instances (): Queue[]
+       /**
+       *       Creates a Web Worker from a stringified script.
+       *
+       * @param {string} worker - Stringified worker class body
+       * @param {number} [count=1] - Integer between 1 and CPU thread count shared among all Pools
+       */
+       constructor (worker: string)
+       assign (headers: Headers | null, data?: Data): Promise<any>
+       prioritize (headers: Headers | null, data?: Data): Promise<any>
+       terminate (): void
+}
+export declare const Bip44CkdWorker: Queue
+export declare const NanoNaClWorker: Queue
+export declare const SafeWorker: Queue
+
+
 export type RolodexEntry = {
        name: string
        account: Account