Support custom "getter" value guards
Closed this issue · 1 comments
deadalusai commented
isNotNull
is currently special-cased to only run on get. Can we support marking custom value guard functions to run on get?
An attribute would be petty cool, e.g.
import { Guard } from '@trademe/ensure';
@Guard({ onGet: true })
function myGuard () {
...
}
phenomnomnominal commented
TIL you can’t do a @decorator on a function...