Strict overview

Added in v1.4.0


Table of contents


Combinators

Strict

Same as Struct combinator, but disallows additional properties.

Signature

export declare const Strict: <T extends Record<string, Schema<any, any>>>(
  props: T
) => Schema<
  {
    [KeyType in keyof (RequiredInputProps<T> & OptionalInputProps<T>)]: (RequiredInputProps<T> &
      OptionalInputProps<T>)[KeyType]
  },
  { [KeyType in keyof OutputProps<T>]: OutputProps<T>[KeyType] }
>

Added in v2.0.0