Optional
errorFactory: ((props: TypeGuardError.IProps) => Error)Custom error factory. Default is TypeGuardError
Nothing until you configure the generic argument T
Jeongho Nam - https://github.com/samchon
Creates a reusable assertGuardEquals function.
Note that, you've to declare the variable type of the factory function caller like below. If you don't declare the variable type, compilation error be thrown. This is the special rule of the TypeScript compiler.
// MUST DECLARE THE VARIABLE TYPE
const func: typia.AssertionGuard<number> = typia.createAssertGuardEquals<number>();
// IF NOT, COMPILATION ERROR BE OCCURED
const func = typia.createAssertGuardEquals<number>();
Assertions require every name in the call target to be declared with an explicit type annotation.
Optional
errorFactory: ((props: TypeGuardError.IProps) => Error)Custom error factory. Default is TypeGuardError
Nothing until you configure the generic argument T
Jeongho Nam - https://github.com/samchon
Creates a reusable assertGuardEquals function.
Note that, you've to declare the variable type of the factory function caller like below. If you don't declare the variable type, compilation error be thrown. This is the special rule of the TypeScript compiler.