Block a user
@sugoidogo/node-web-globals (4.1.0)
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
Assets (1)
Versions (7)
View all
node-web-globals-4.1.0.tgz
16 KiB