ow
ow copied to clipboard
Alias `.of` for `.ofType`
ow.array.of(ow.string)
clearly better than
ow.array.ofType(ow.string)
I'm not interested in adding aliases. That just leads to inconsistent code.
I don't remember exactly why we went with .ofType
. It might have been because ofType
accepts any predicate, so ow.array.ofType(() => …)
is clearer than ow.array.of(() => …)
.
I'll leave this open for other people to comment their opinion.