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

Parameter 'v' implicitly has an 'any' type. #52

Open
uhmseohun opened this issue Mar 15, 2020 · 0 comments
Open

Parameter 'v' implicitly has an 'any' type. #52

uhmseohun opened this issue Mar 15, 2020 · 0 comments

Comments

@uhmseohun
Copy link

uhmseohun commented Mar 15, 2020

findByApplier (applier: ObjectId) {
      return this.find({ applier });
}

That is my static method of CircleApplicationModel
And I call this static function at controller like

const applied = await CircleApplicationModel.findByApplier(user._id);
...
const final = applied.find((v) => v.status === 'final')

But I got

src/controllers/CircleApplication.ts(65,22): error TS7006: Parameter 'v' implicitly has an 'any' type.

How can I explicitly set return value type of static function?

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

1 participant