Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  1. declare function fastq<C, T = any, R = any>(context: C, worker: fastq.worker<C, T, R>, concurrency: number): fastq.queue<T, R>
  2. declare function fastq<C, T = any, R = any>(worker: fastq.worker<C, T, R>, concurrency: number): fastq.queue<T, R>
  3. declare namespace fastq {
  4. type worker<C, T = any, R = any> = (this: C, task: T, cb: fastq.done<R>) => void
  5. type asyncWorker<C, T = any, R = any> = (this: C, task: T) => Promise<R>
  6. type done<R = any> = (err: Error | null, result?: R) => void
  7. type errorHandler<T = any> = (err: Error, task: T) => void
  8. interface queue<T = any, R = any> {
  9. push(task: T, done?: done<R>): void
  10. unshift(task: T, done?: done<R>): void
  11. pause(): any
  12. resume(): any
  13. idle(): boolean
  14. length(): number
  15. getQueue(): T[]
  16. kill(): any
  17. killAndDrain(): any
  18. error(handler: errorHandler): void
  19. concurrency: number
  20. drain(): any
  21. empty: () => void
  22. saturated: () => void
  23. }
  24. interface queueAsPromised<T = any, R = any> extends queue<T, R> {
  25. push(task: T): Promise<R>
  26. unshift(task: T): Promise<R>
  27. }
  28. function promise<C, T = any, R = any>(context: C, worker: fastq.asyncWorker<C, T, R>, concurrency: number): fastq.queueAsPromised<T, R>
  29. function promise<C, T = any, R = any>(worker: fastq.asyncWorker<C, T, R>, concurrency: number): fastq.queueAsPromised<T, R>
  30. }
  31. export = fastq