UNPKG

@chubbyts/chubbyts-api

Version:

[![CI](https://github.com/chubbyts/chubbyts-api/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-api/actions?query=workflow%3ACI) [![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-api/badge.svg?branch=maste

11 lines (10 loc) 554 B
import type { List, Model } from './model.js'; export type ResolveModelList<C> = (list: List<C>) => Promise<List<C>>; export type FindModelById<C> = (id: string) => Promise<Model<C> | undefined>; export type PersistModel<C> = (model: Model<C>) => Promise<Model<C>>; export type RemoveModel<C> = (model: Model<C>) => Promise<void>; export type FindById<C> = FindModelById<C>; export type FindOneById<C> = FindModelById<C>; export type ResolveList<C> = ResolveModelList<C>; export type Persist<C> = PersistModel<C>; export type Remove<C> = RemoveModel<C>;