Skip to main content

ValdiationApplyRecord

Callable

  • ValdiationApplyRecord<T>(arg: unknown, C: Character, validators: T, allowExtraKeys?: boolean): { [ k in string | number | symbol ]: ReturnType<T[k]> }


  • Type parameters

    • T: {}

    Parameters

    • arg: unknown

      The to-be validated record

    • C: Character

      The character in question

    • validators: T

      A record of validation functions; one for each property in arg

    • allowExtraKeys: boolean = false

      whether to allow extra key/value pairs in arg (absent from the validators record) to-be returned

    Returns { [ k in string | number | symbol ]: ReturnType<T[k]> }

    The validated arg