-
Notifications
You must be signed in to change notification settings - Fork 37
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
Type Question: Response.json get type error: is not assignable to type 'undefined'.ts(2345) #15
Labels
bug
Something isn't working
Comments
Thx feedback, I will check it later:) // for now, use `as` for workaround
return Response.json({
code: 0,
data: details,
} as JsonType) |
export type NPM = {
name: string
"dist-tag": {
[tag: string]: string
}
maintainers: {
name: string
email: string
avatar: string
}[]
time: {
[version: string]: string
}
author: {
name: string
email: string
}
license: string
} use type instead of interface |
Yeah, that's ok, Thank you! is interesting why |
I think it is a bug in typescript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got a type error, however, I don't have any idea about is.
Can you help me?
There are
npm
type:And will got
The text was updated successfully, but these errors were encountered: