Skip to content

CreateTypeGuardSchemaParams<T>

Parameters for createTypeGuardSchema: the guard, what it expects, and optionally the schema’s vendor.

Import:

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

Signature:

export interface CreateTypeGuardSchemaParams<T> extends ExpectedTypeGuard<T>

Extends: ExpectedTypeGuard<T>

Properties

PropertyTypeDescription
expectedstringWhat the value should have been, phrased to follow "Expected", e.g. 'a string'.
(Inherited from ExpectedTypeGuard)
typeGuard(value: unknown) => value is TDecides whether the value is acceptable.
(Inherited from ExpectedTypeGuard)
vendor?stringThe Standard Schema vendor the schema reports. Defaults to this library's name.

Links to this page: