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

build: add type definitions #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

herrmannplatz
Copy link

No description provided.

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;
Copy link
Contributor

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)?

Copy link
Author

@herrmannplatz herrmannplatz Jan 20, 2023

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.

@pke
Copy link

pke commented Nov 16, 2023

Isn't that already covered by @types/accepts?

@UlisesGascon
Copy link
Member

I agree with @pke, seems like https://www.npmjs.com/package/@types/accepts is covering this gap.

@UlisesGascon
Copy link
Member

Based on expressjs/discussions#192 seems like the current approach is to let types outside of the repositories.

@carpasse
Copy link
Contributor

carpasse commented May 8, 2024

@UlisesGascon should we close this PR then?

@carpasse carpasse closed this May 8, 2024
@carpasse carpasse reopened this May 8, 2024
@carpasse
Copy link
Contributor

carpasse commented May 8, 2024

Apologies I closed the PR by mistake when trying to comment 🤦🏻‍♂️

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

Successfully merging this pull request may close these issues.

5 participants