Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Use with Deno #199

Closed
tv42 opened this issue Feb 24, 2022 · 4 comments
Closed

Use with Deno #199

tv42 opened this issue Feb 24, 2022 · 4 comments
Labels
v4 For the next major version

Comments

@tv42
Copy link

tv42 commented Feb 24, 2022

deno bundle is a great future-forward way of bundling Typescript into an ESM, and compared to webpack et al, is a great developer experience for writing Cloudflare Workers.

However, so far I've always resorted to creating my own types for the Cloudflare-specific APIs.
It would be great to reuse the work here with Deno, but that hits a few barriers:

It would be great to have a tested & upstreamed way of importing these types into a Deno program.

@tv42
Copy link
Author

tv42 commented Feb 24, 2022

Community efforts:

@samuelcolvin
Copy link

There's also my library samuelcolvin/edge-mock which tries to provide implementations of the types defined in workers-types for use in testing. It's targeted at node, but much of it could probably be used on deno.

@mrbbot
Copy link
Contributor

mrbbot commented Oct 21, 2022

Hey! 👋 Thanks for reporting this, we're actively thinking about ways of fixing this in the next major version of workers-types using the new type generation system. 👍

@mrbbot mrbbot added the v4 For the next major version label Oct 21, 2022
@mrbbot
Copy link
Contributor

mrbbot commented Jan 19, 2023

Hey! 👋 As of @cloudflare/workers-types@4, you can selectively import type { ... } from "@cloudflare/workers-types". Hopefully this is sufficient for your use case. There are no plans at the moment for officially supported Deno integration.

@mrbbot mrbbot closed this as completed Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
v4 For the next major version
Projects
None yet
Development

No branches or pull requests

3 participants