-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
build: add type definitions #26
base: master
Are you sure you want to change the base?
Conversation
types/index.d.ts
Outdated
* | ||
* The `types` array can contain full MIME types or file extensions. Any value that is not a full MIME types is passed to `require('mime-types').lookup`. | ||
*/ | ||
type(types: string[]): string[] | string | string[] | false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does having string[]
listed twice do something special or just a typo (sorry, only passiingly-familiar with type script)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry my fault. realized that the types in @types/accepts doesnt match what the library returns. so i was curious if these types could be just shipped by the library itself.
Isn't that already covered by |
I agree with @pke, seems like https://www.npmjs.com/package/@types/accepts is covering this gap. |
Based on expressjs/discussions#192 seems like the current approach is to let types outside of the repositories. |
@UlisesGascon should we close this PR then? |
Apologies I closed the PR by mistake when trying to comment 🤦🏻♂️ |
No description provided.