PropertyGuards<T>
One guard per property of an object type, as objectGuard takes them, typed as PropertyTypeGuards types the bare guards.
Import:
import type { PropertyGuards } from '@mnaoumov/typescript-lib/api-contract';Signature:
export type PropertyGuards<T extends object>Signature:
type PropertyGuards<T> = { readonly [TKey in keyof T]-?: ExpectedTypeGuard<Partial<Pick<T, TKey>> extends Pick<T, TKey> ? T[TKey] | undefined : T[TKey]>;}Type: { readonly [TKey in keyof T]-?: ExpectedTypeGuard<Partial<Pick<T, TKey>> extends Pick<T, TKey> ? T[TKey] | undefined : T[TKey]>; }
Links to this page: