UNPKG

@flex-development/tutils

Version:
21 lines (20 loc) 817 B
/** * @file Type Definitions - DocumentPartial * @module tutils/types/DocumentPartial */ import type DUID from './duid.mjs'; import type ObjectPlain from './object-plain.mjs'; import type ObjectUnknown from './object-unknown.mjs'; import type OrDeepPartial from './or-deep-partial.mjs'; import type UID from './uid.mjs'; /** * Object that includes all object properties or a subset. * * Even when a subset of properties are requested, a partial `Document` response * will always include the `id` field, or the selected uid field. * * @template D - Document (collection object) * @template U - Name of document uid field */ declare type DocumentPartial<D extends ObjectPlain = ObjectUnknown, U extends string = DUID> = Omit<OrDeepPartial<D>, U> & Record<U, UID>; export { type DocumentPartial as default };