Block a user
@sugoidogo/importable-types-web (1.0.0)
Installation
@sugoidogo:registry=https://gitea.sugoidogo.com/api/packages/sugoidogo/npm/npm install @sugoidogo/importable-types-web@1.0.0"@sugoidogo/importable-types-web": "1.0.0"About this package
Importable Types Web
This is a slimmed down and repackaged version of @types/web, allowing you to selectively import web types for type checking, for example when building a cross-runtime library, implementing web APIs in node, etc.
This serves as a replacement for @types/web for any typescript code that needs to run in a non-web environment using web types, you should not use @types/web and this package together.
Usage
Configure your typescript compiler like so:
// tsconfig.json
{
"compilerOptions":{
"lib":["ESNext"], // exclude default web types
"types":[] // exclude @types/web
}
}
Then import the types and define the globals you will be using:
// main.ts
import type { Console } from "@sugoidogo/importable-types-web"
declare var console:Console
console.log("Hello World!")
Dependencies
Dependencies
| ID | Version |
|---|---|
| undici-types | ^7.16.0 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^25.2.2 |
| @types/web | ^0.0.329 |
Details
2026-02-09 14:56:07 +00:00
Assets (1)
Versions (1)
View all
npm
61
SugoiDogo
Apache-2.0
latest
316 KiB
importable-types-web-1.0.0.tgz
316 KiB
1.0.0
2026-02-09