Spec-Zone.ru › Valibot

never

Creates a never schema.

const Schema = v.never<TMessage>(message);

Generics

  • TMessage extends ErrorMessage<NeverIssue> | undefined

Parameters

  • message TMessage

Explanation

When validated, never always returns an issue. You can use message to customize the error message.

Returns

  • Schema NeverSchema<TMessage>

Related

The following APIs can be combined with never.

Schemas

array, exactOptional, intersect, lazy, looseObject, looseTuple, map, nonNullable, nonNullish, nonOptional, nullable, nullish, object, objectWithRest, optional, record, set, strictObject, strictTuple, tuple, tupleWithRest, undefinedable, union

Methods

assert, config, fallback, getDefault, getDefaults, getFallback, getFallbacks, is, message, parse, parser, pipe, safeParse, safeParser

Utils

entriesFromList, isOfKind, isOfType

© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/never/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API