detect-browser
detect-browser copied to clipboard
Typing leakage on global environment variable.
Hi.
I have just installed the version 5.3.0 of the library, and as soon as I do an import of it the typing of any variable in process.env (ex : process.env.MYVAR) goes from any to string | undefined.
Is it intentional ? I think that a library shouldn't have that kind of side effect.
Thanks in advance for your answer
@CyrilQuandalle agreed - if that is the case, that is very much unwanted. Will have a look at the typings and see if I can get to the bottom of things.
Same issue due to /// <reference types="node" /> in the package d.ts. I think removing node from types in your tsconfig should fix it https://github.com/DamonOehlman/detect-browser/blob/546e6f1348375d8a486f21da07b20717267f6c49/tsconfig.json#L10