How can we improve Breeze.js?

TypeScript breeze.d.ts: ValidatorFunction should return boolean

The current breeze.d.ts file says:

interface ValidatorFunction {
(value: any, context: ValidatorFunctionContext): void;
}

Since a value can be either valid or invalid (true or false) in my opinion this should be a function returning a boolean. Also, the context parameter in the Validator constructor can be empty so it would be better if "context" is an optional parameter.
And: the "message" part of the ValidatorFunctionContext is declared as "string" but can be a function also and "any" would be correct.

1 vote
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Heiko shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base