sugoidogo c42fae1780
/ publish (push) Failing after 20s
backport missing globals fix
2026-04-04 15:07:42 -07:00
2026-02-08 00:47:54 -08:00
2026-02-09 16:29:45 -08:00
2026-02-09 16:29:45 -08:00
2026-04-04 15:07:42 -07:00
2026-04-04 15:07:42 -07:00
2026-02-09 16:29:45 -08:00

Node Web Globals

These types are the global declarations copied (literally) from @types/web which have matching symbol names to those in @types/node/web-globals, to provide global types that are compatible with both web and node for developing libraries that are compatible with both web and node. Type definitions are provided by @sugoidogo/importable-web-types.

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":{
        "lib":["ESNext"],
        "types":["@sugoidogo/node-web-globals"]
    }
}
// main.ts
console.log("Hello World!") // compiles
proces.exit(0) // throws
S
Description
No description provided
Readme 45 KiB
Languages
JavaScript 100%