mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: use readonly modifiers for generics
This commit is contained in:
@ -17,7 +17,7 @@ export const ZSimpleTriggerJobOptionsSchema = z.object({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Map the array to create a union of objects we may accept
|
// Map the array to create a union of objects we may accept
|
||||||
export type TriggerJobOptions<Definitions extends Array<JobDefinition> = []> = {
|
export type TriggerJobOptions<Definitions extends ReadonlyArray<JobDefinition> = []> = {
|
||||||
[K in keyof Definitions]: {
|
[K in keyof Definitions]: {
|
||||||
id?: string;
|
id?: string;
|
||||||
name: Definitions[K]['trigger']['name'];
|
name: Definitions[K]['trigger']['name'];
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import { InngestJobProvider } from './inngest';
|
|||||||
import { LocalJobProvider } from './local';
|
import { LocalJobProvider } from './local';
|
||||||
import { TriggerJobProvider } from './trigger';
|
import { TriggerJobProvider } from './trigger';
|
||||||
|
|
||||||
export class JobClient<T extends Array<JobDefinition> = []> {
|
export class JobClient<T extends ReadonlyArray<JobDefinition> = []> {
|
||||||
private static _instance: JobClient;
|
|
||||||
|
|
||||||
private _provider: JobClientProvider;
|
private _provider: JobClientProvider;
|
||||||
|
|
||||||
public constructor(definitions: T) {
|
public constructor(definitions: T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user