Because the dom library is included in the root tsconfig.json, there are typings in server-side only node which should not exist. This can make it hard to debug issues where the browser typings are masking that an object is possibly undefined.
Recommendation
Split the root tsconfig.json into a server and browser version and propagate the change downstream to the project, or otherwise confine node typings to server-only library code, and dom typings to browser-only library code.
Context
See for some context: https://github.com/inversify/InversifyJS/pull/1374
Because the
dom
library is included in the roottsconfig.json
, there are typings in server-side only node which should not exist. This can make it hard to debug issues where the browser typings are masking that an object is possibly undefined.Recommendation
Split the root
tsconfig.json
into a server and browser version and propagate the change downstream to the project, or otherwise confinenode
typings to server-only library code, anddom
typings to browser-only library code.