@ng-web-apis/workers
Version:
A library for comfortable use of Web Workers API in Angular
16 lines (15 loc) • 635 B
TypeScript
import { type OnDestroy, type PipeTransform } from '@angular/core';
import { type Observable } from 'rxjs';
import { type WorkerFunction } from '../types/worker-function';
import * as i0 from "@angular/core";
export declare class WaWorkerPipe implements PipeTransform, OnDestroy {
private fn;
private worker;
private observer;
transform<T, R>(value: T, fn: WorkerFunction<T, R>): Observable<R>;
ngOnDestroy(): void;
private terminateWorker;
private initNewWorker;
static ɵfac: i0.ɵɵFactoryDeclaration<WaWorkerPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<WaWorkerPipe, "waWorker", true>;
}