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

Specify more types in the method signatures #188

Closed
MOZGIII opened this issue Nov 26, 2021 · 4 comments
Closed

Specify more types in the method signatures #188

MOZGIII opened this issue Nov 26, 2021 · 4 comments

Comments

@MOZGIII
Copy link

MOZGIII commented Nov 26, 2021

TypeScript has hard time guessing the types, it would be nice if you could add types explicitly, such that ctx is typed accordingly:

image

@MOZGIII
Copy link
Author

MOZGIII commented Nov 26, 2021

The desired effect would be reached of you simply move @types/koa-bodyparser, @types/koa-router and @types/koa to the dependencies.

@MOZGIII
Copy link
Author

MOZGIII commented Nov 26, 2021

Also, the code apparently needs tslib which doesn't exist in the dependencies - but that's a build-time issue, I'll create another issue for this.

@DanielHreben
Copy link
Owner

I released a new version, please check if those issues are resolved now

@MOZGIII
Copy link
Author

MOZGIII commented Jul 27, 2022

Hey, I don't think I'll get to that as I've lost track of where I used it. Pretty sure that if you have a proper type in a similar situation as on the screenshot - the fix is good.

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