Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@types/node
as a dependency - this is required for the NodeJS namespace to work (by the way an alternative is to publish the.d.ts
file on https://github.com/DefinitelyTyped/DefinitelyTyped/ - this means TS users would have to import another package, but the upshot is that non-TS users won't have to transitively import the types)splitMime
is static - this is expected to be the case most of the time, so it seems useful to type it. It is a bit unwieldy, but the API is otherwise pretty simple and I think the improved return type is worth itesModuleInterop
is not true in tsconfig, so the original typings would work in that case, but if it is unspecified the typings would actually be incorrect because it forces the caller to incorrectly use a default import