Libraries v5.0.0
    Preparing search index...

    Interface JobDefinition<I, P, O>

    Versioned contract shared by producers and workers.

    interface JobDefinition<
        I extends JobSchema,
        P extends JobSchema,
        O extends JobSchema,
    > {
        input: I;
        name: string;
        output: O;
        policy: Readonly<RunPolicy>;
        progress: P;
        version: number;
        handle(handler: JobHandler<JobDefinition<I, P, O>>): JobBinding;
        thread(moduleUrl: URL): JobBinding;
    }

    Type Parameters

    Index
    input: I
    name: string
    output: O
    policy: Readonly<RunPolicy>
    progress: P
    version: number