/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { JsonValue } from '@angular-devkit/core'; import { Observable } from 'rxjs'; import { JobDescription, JobHandler, JobName, Registry } from './api'; /** * SimpleJobRegistry job registration options. */ export interface RegisterJobOptions extends Partial { } /** * A simple job registry that keep a map of JobName => JobHandler internally. */ export declare class SimpleJobRegistry implements Registry { private _jobNames; get(name: JobName): Observable | null>; /** * Register a job handler. The name must be unique. * * @param name The name of the job. * @param handler The function that will be called for the job. * @param options An optional list of options to override the handler. {@see RegisterJobOptions} */ register(name: JobName, handler: JobHandler, options?: RegisterJobOptions): void; /** * Register a job handler. The name must be unique. * * @param handler The function that will be called for the job. * @param options An optional list of options to override the handler. {@see RegisterJobOptions} */ register(handler: JobHandler, options?: RegisterJobOptions & { name: string; }): void; protected _register(name: JobName, handler: JobHandler, options: RegisterJobOptions): void; /** * Returns the job names of all jobs. */ getJobNames(): JobName[]; }