Comments (3)
These global types are provided by TypeScript (from lib.dom.d.ts)
maybe something is wrong in your TS configuration?
from edge-runtime.
@Kikobeats I understand that's a workaround, but it's not a proper solution... Vercel Edge Runtime will never be a DOM environment. It doesn't have window
, it doesn't have document
, its fetch
accepts nonstandard options, etc.
So lib.dom.d.ts
would provide incorrect types for the Vercel Edge Runtime environment.
This is why @cloudflare/workers-types
doesn't rely on lib.dom.d.ts
; they declare global fetch
, File
, etc types on their own. @edge-runtime/types
will need to do this sooner or later to provide the best developer experience.
This is probably also why the docs page for @edge-runtime/types
doesn't say anything about using lib.dom.d.ts
.
Can we reopen?
from edge-runtime.
It's still unclear to me; This project, even not specifying lib.dom.d.ts
as a type, fetch
types are being resolved correctly:
The file is
from edge-runtime.
Related Issues (20)
- `import.meta.url` is `undefined` HOT 1
- Allow customisation of `ResponseCookie` encoding HOT 2
- Expose cookie serialization functions. HOT 1
- Include a key in process.versions for detecting edge runtime HOT 2
- Support `has` in ResponseCookies
- Set-Cookie headers are merged when using `fetch` HOT 6
- Primitives: event-target-shim causes issues w/ edge-runtime running on top of node HOT 3
- drop node16 support
- Proxying primitive instances return anonymous `toString()` return functions
- Why cannot my `fetch` API work in edge function? HOT 4
- 🙏`fetch` api doesn't work in edge function HOT 4
- Which functions and APIs advance the value returned by `Date.now`? HOT 3
- Polyfill for btoa inconsistent with WebApi / Node HOT 5
- drop node18 support
- Response.redirect() fails to parse some URLs in production which parse successfully in local runtime HOT 2
- `@edge-runtime/node-utils` can't start example server from docs using `primitives` (node v18.18.2) Headers2 is not a constructor HOT 1
- Secure Cookies can't be deleted from Responses
- CompressionStream / DecompressionStream support?
- failing on buffer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edge-runtime.