@types/node pollution
See original GitHub issuePrerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn’t contain the answer to my issue
Environment check
- I’m using the latest
msw
version - I’m using Node.js version 14 or higher
Browsers
Chromium (Chrome, Brave, etc.)
Reproduction repository
Unnecessary
Reproduction steps
Just import msw in a typescript project
Current behavior
Import msw
will also import @types/node
which pollutes types.
For example, after import msw
, type of setTimeout
is no longer correct:
This issue results from type declaration of strict-event-emitter
:
Removing the first line can fix the bug.
Expected behavior
Not import types of node when using the library in a browser
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Pollution | Definition, History, Types, & Facts
The major kinds of pollution, usually classified by environment, are air pollution, water pollution, and land pollution.
Read more >Pollution Facts & Types of Pollution
Another common type of air pollution is dangerous gases, such as sulfur dioxide, carbon monoxide, nitrogen oxides and chemical vapors. These can ...
Read more >Pollution - Wikipedia
Major forms of pollution include air pollution, light pollution, litter, noise pollution, plastic pollution, soil contamination, radioactive contamination, ...
Read more >Effects of Various Types of Pollution
Air Pollution; Water Pollution; Soil Pollution; Noise Pollution. Besides these 4 types of pollution, other types exist such as light pollution, thermal ...
Read more >What Are the 7 Different Types of Pollution?
The 7 Different Types of Pollution · Air Pollution · Water Pollution · Land Pollution · Radioactive Pollution · Noise Pollution · Light...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, not sure what I did when I tested it locally, it’s indeed still there also for me. We also need to set
types: []
in thetsconfig
. I’ll prepare another PR.@jkieboom It does not appear to be fixed.
/// <reference types="node" />
is still therehttps://www.unpkg.com/browse/strict-event-emitter@0.2.7/lib/StrictEventEmitter.d.ts