Skip to content

ExpectedTypeGuard<T>

One value a schema accepts, described by a type guard and by what it expects, for the issue message.

Import:

import type { ExpectedTypeGuard } from '@mnaoumov/typescript-lib/api-contract';

Signature:

export interface ExpectedTypeGuard<T>

Properties

PropertyTypeDescription
expectedstringWhat the value should have been, phrased to follow "Expected", e.g. 'a string'.
typeGuard(value: unknown) => value is TDecides whether the value is acceptable.

Links to this page: