Cannot find name 'Predicate'. Did you mean 'Predicates'?
faribauc opened this issue · comments
Angular: 17.0.4
NodeJSL: 18.13.0
vest: 5.1.5
Hi!
This package looks very promissing for my project and I'm eager to play with it! But...
I literally copy/pasted the example code from the code:
import { create, test, enforce } from 'vest';
const suite = create((data = {}) => {
test('username', 'Username is required', () => {
enforce(data.username).isNotBlank();
});
test('username', 'Username must be at least 3 characters long', () => {
enforce(data.username).longerThan(2);
});
});
into a component and I'm getting the following error:
node_modules/vest-utils/types/vest-utils.d.ts:175:15 - error TS2552: Cannot find name 'Predicate'. Did you mean 'Predicates'?
175 export type { Predicate, DropFirst, Stringable, CB, ValueOf, Nullish, Nullable, Maybe, OneOrMoreOf, DynamicValue, BlankValue };
~~~~~~~~~
node_modules/vest-utils/types/vest-utils.d.ts:169:19
169 declare namespace Predicates {
~~~~~~~~~~
'Predicates' is declared here.
I was expecting this to be easy to setup. Am I missing something?
Thanks!
I can confirm I am seeing this too. Let me check and get back to you shortly.
@ealush Awesome, thank you. Can't wait to give this lib a try! ::)
@faribauc Thank you!
I just released 5.2.0, can you confirm this now works for you?
So sorry that you're experiencing this!
@ealush Fix confirmed! Thanks a lot for the super fast response!
Great! Thank you for reporting this issue 🙏