Create exact version of database collections

This commit is contained in:
Iván Ovejero 2021-04-16 18:09:20 +02:00
parent 17d43ed337
commit c928423ea7

View file

@ -61,6 +61,12 @@ export interface IDatabaseCollections {
Tag: Repository<ITagDb> | null; Tag: Repository<ITagDb> | null;
} }
type NonNullable<T> = T extends null | undefined ? never : T;
export type ExactDatabaseCollections = {
[P in keyof IDatabaseCollections]: NonNullable<IDatabaseCollections[P]>
};
export interface IWebhookDb { export interface IWebhookDb {
workflowId: number | string; workflowId: number | string;
webhookPath: string; webhookPath: string;