Files
node-web-globals/README.md
T
sugoidogo 8d0c7c7a06
/ publish (push) Successful in 29s
initial release
2026-01-20 00:54:08 -08:00

598 B

Node Web Globals

These types are copied (literally) from the web-globals folder of @types/node to provide types that are compatible with both web and node for developing libraries that are compatible with both web and node.

Usage

To prevent tsc from importing the default Dom library, add the compilerOptions key lib with value ESNext (or whatever version you're targeting, such as ES2022).

tsconfig.json
{
    "compilerOptions":{
        "module":"esnext",
        "moduleResolution":"node",
        "lib":["ESNext"]
    }
}