Skip to main content

ValidationApplyRecord

Callable

  • ValidationApplyRecord<T>(arg, C, validators, allowExtraKeys): { [ k in string | number | symbol ]: ReturnType<T[k]> }


  • 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