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

Synchronising with the official typings #19

Open
SerCeMan opened this issue Mar 3, 2020 · 3 comments
Open

Synchronising with the official typings #19

SerCeMan opened this issue Mar 3, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@SerCeMan
Copy link
Contributor

SerCeMan commented Mar 3, 2020

Hey, folks!

Given that Cloudflare seems to actively support typings for workers now: https://github.com/cloudflare/workers-types, do you have any plans on syncing/migrating to the "official" typings?

Thanks for amazing work here btw :)

@13rac1
Copy link
Contributor

13rac1 commented Mar 3, 2020

Thanks!

I made this repository public after Udacity's and Cloudflare's Legal team approvals, then the Cloudflare version was open sourced the following month. I emailed the maintainer and offered to transfer this project to Cloudflare's Github org to replace their version, since it would be far easier to maintain with inside knowledge. We started a discussion, but both of got distracted. @jrf0110 We should follow up! Can/should we defragment?

Do you have any plans on syncing/migrating to the "official" typings?

I'm probably missing new features again. Looks like https://developers.cloudflare.com/workers/reference/apis/html-rewriter/ is the primary. Please PR or I'll handle it at some point.

Both projects are missing parts of the entire spec. I wish Cloudflare would publish an official Worker spec as a strict TypeScript repo, so I wouldn't have to maintain this project at all. 😆
The Cloudflare version is missing important features, mostly in testing support, used by my internal users/projects. I'll migrate and sunset this when the change is an upgrade.

@vlovich
Copy link

vlovich commented Dec 11, 2021

Came across this repo while searching around for something else. Since this is still open, I figured it might be worth updating the state of things that have changed since the last discussion. The official workers-types repo now generates the bindings directly from the internal codebase. Usually where they don't match the intended spec is because we don't yet have that part of the spec implemented: https://blog.cloudflare.com/automatically-generated-types/

miniflare is the official testing strategy and supports all the asks I think (KV, DO, etc). The way I like to think about it is that the test code runs under the Node environment and interacts with your code under test via Miniflare which runs it in the Cloudflare environment.

@13rac1
Copy link
Contributor

13rac1 commented Dec 17, 2021

Perfect! Generated types is what I wished for in the first place 😀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants