edge-runtime
edge-runtime copied to clipboard
@edge-runtime/types Missing addEventListener
With the following TSConfig, a lot of things are missing in the types
{
"compilerOptions": {
"moduleResolution": "NodeNext",
"module": "NodeNext",
"strict": true,
"useUnknownInCatchVariables": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
// Explicitly empty lib (no DOM, etc)
"lib": [],
// Only specify types for edge-runtime
"types": ["@edge-runtime/types"]
}
}
Here's a couple things that don't exist. Perhaps I need to include some other types to "lib" but for example addEventListener exists in DOM but a lot of things that exist in DOM do not exist in the edge-runtime