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

Possible incorrect types #1494

Closed
benmccann opened this issue May 19, 2021 · 2 comments · Fixed by #1876
Closed

Possible incorrect types #1494

benmccann opened this issue May 19, 2021 · 2 comments · Fixed by #1876
Labels
bug Something isn't working types / typescript
Milestone

Comments

@benmccann
Copy link
Member

benmccann commented May 19, 2021

I believe Buffer was replaced with Uint8Array in #1382, so perhaps the type below is wrong

export type BaseBody = string | Buffer | ReadOnlyFormData;

Also, Incoming is unused in hooks:

export type Incoming = {

It's exported and used in index and internal, but I wonder if ServerRequest should be used instead

@benmccann benmccann added bug Something isn't working types / typescript labels May 19, 2021
@benmccann benmccann added this to the 1.0 milestone May 19, 2021
@benmccann benmccann changed the title Possible incorrect type Possible incorrect types May 19, 2021
@benmccann
Copy link
Member Author

@ignatiusmb @dummdidumm you guys might be interested in this one

@ignatiusmb
Copy link
Member

I think you're right on replacing Buffer with Uint8Array, I've checked for other references and there seems to be none that's related. Incoming on the other hand, looks very similar to ServerRequest, but it seems to be correct and only used as the first parameter of render in App. I'm guessing we could remove it from the public types as well, seems to only be used internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working types / typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants