Target instance to assert and prune
Optional
errorFactory: ((props: TypeGuardError.IProps) => Error)Custom error factory. Default is TypeGuardError
Jeongho Nam - https://github.com/samchon
Prune, erase superfluous properties, with type assertion.
typia.misc.assertPrune()
is a combination function of assert and
prune. Therefore, it removes every superfluous properties from the input
object including nested objects, with type assertion.
In such reason, when input
value is not matched with the type T
, it throws an
TypeGuardError or custom error generated by errorFactory. Otherwise, there's
no problem on the input
value, its every superfluous properties would be removed,
including nested objects.
Target instance to assert and prune
Optional
errorFactory: ((props: TypeGuardError.IProps) => Error)Custom error factory. Default is TypeGuardError
Jeongho Nam - https://github.com/samchon
Prune, erase superfluous properties, with type assertion.
typia.misc.assertPrune()
is a combination function of assert and prune. Therefore, it removes every superfluous properties from theinput
object including nested objects, with type assertion.In such reason, when
input
value is not matched with the typeT
, it throws an TypeGuardError or custom error generated by errorFactory. Otherwise, there's no problem on theinput
value, its every superfluous properties would be removed, including nested objects.