makeValidatable
Call Signature
Section titled “Call Signature”makeValidatable<
T,Expr>(target,expr,handler,opt?): () =>void
Defined in: validator.ts:39
Make a target object validatable
It's just a shorthand of:
Validator.get(target).addAsyncHandler(expr, handler, opt)Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”target
Section titled “target”T
The target object
() => Expr
The expression to observe
handler
Section titled “handler”Validator.AsyncHandler<T, NoInfer<Expr>>
The async handler to call when the expression changes
Validator.HandlerOptions<NoInfer<Expr>>
The handler options
Returns
Section titled “Returns”A function to remove the handler
() => void
Remarks
Section titled “Remarks”If you're using make(Auto)Observable, make sure to call makeValidatable
after make(Auto)Observable.
Call Signature
Section titled “Call Signature”makeValidatable<
T>(target,handler,opt?): () =>void
Defined in: validator.ts:63
Make a target object validatable
It's just a shorthand of:
Validator.get(target).addSyncHandler(handler, opt)Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”target
Section titled “target”T
The target object
handler
Section titled “handler”The sync handler containing observable expressions
Validator.HandlerOptions<unknown>
The handler options
Returns
Section titled “Returns”A function to remove the handler
() => void
Remarks
Section titled “Remarks”If you're using make(Auto)Observable, make sure to call makeValidatable
after make(Auto)Observable.