Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find name 'Predicate'. Did you mean 'Predicates'? #1107

Closed
faribauc opened this issue Nov 28, 2023 · 5 comments
Closed

Cannot find name 'Predicate'. Did you mean 'Predicates'? #1107

faribauc opened this issue Nov 28, 2023 · 5 comments

Comments

@faribauc
Copy link

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!

@ealush
Copy link
Owner

ealush commented Nov 28, 2023

I can confirm I am seeing this too. Let me check and get back to you shortly.

@faribauc
Copy link
Author

@ealush Awesome, thank you. Can't wait to give this lib a try! ::)

@ealush
Copy link
Owner

ealush commented Nov 28, 2023

@faribauc Thank you!
I just released 5.2.0, can you confirm this now works for you?

So sorry that you're experiencing this!

@faribauc
Copy link
Author

@ealush Fix confirmed! Thanks a lot for the super fast response!

@ealush
Copy link
Owner

ealush commented Nov 28, 2023

Great! Thank you for reporting this issue 🙏

@ealush ealush closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants