Skip to content

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/typescript-wg#1 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