UNPKG

@compas/store

Version:

Postgres & S3-compatible wrappers for common things

14 lines (13 loc) 609 B
/** * Wrap a queryPart & validator in something that can either be used directly, or can be chained. * * @template {Function} T * * @param {import("@compas/store").QueryPart<any>} queryPart * @param {T} validator * @param {{ hasCustomReturning: boolean }} options * @returns {import("@compas/store").WrappedQueryPart<NonNullable<ReturnType<T>["value"]>>} */ export function wrapQueryPart<T extends Function>(queryPart: import("@compas/store").QueryPart<any>, validator: T, options: { hasCustomReturning: boolean; }): import("@compas/store").WrappedQueryPart<NonNullable<ReturnType<T>["value"]>>;