Function assertPascal

  • Converts to pascal case with type assertion.

    Convert every property names of nested objects to follow the pascal case convention. If the input value does not follow the type T, it throws TypeGuardError.

    Type Parameters

    • T

      Type of the input value

    Parameters

    Returns PascalCase<T>

    Pascal case object

    Jeongho Nam - https://github.com/samchon

  • Converts to pascal case with type assertion.

    Convert every property names of nested objects to follow the pascal case convention. If the input value does not follow the type T, it throws TypeGuardError.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      Target object

    • OptionalerrorFactory: ((props: TypeGuardError.IProps) => Error)

      Custom error factory. Default is TypeGuardError

    Returns PascalCase<T>

    Pascal case object

    Jeongho Nam - https://github.com/samchon