sugoidogo
  • Joined on 2025-12-15

@sugoidogo/node-web-globals (4.1.0)

Published 2026-04-04 22:07:14 +00:00 by sugoidogo in sugoidogo/node-web-globals

Installation

@sugoidogo:registry=https://gitea.sugoidogo.com/api/packages/sugoidogo/npm/
npm install @sugoidogo/node-web-globals@4.1.0
"@sugoidogo/node-web-globals": "4.1.0"

About this package

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

Dependencies

Dependencies

ID Version
undici-types ^7.21.0

Development Dependencies

ID Version
@sugoidogo/importable-types-web ^1.0.0
@types/node ^22.19.17
@types/web ^0.0.329
Details
npm
2026-04-04 22:07:14 +00:00
24
SugoiDogo
Apache-2.0
latest
16 KiB
Assets (1)
Versions (7) View all
4.1.0 2026-04-04
4.0.0 2026-04-04
3.0.0 2026-04-04
2.0.0 2026-02-10
1.1.0 2026-02-08