Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert adapter-cloudflare back to JS #4474

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

Rich-Harris
Copy link
Member

i think this gives us the same level of type safety

@changeset-bot
Copy link

changeset-bot bot commented Mar 31, 2022

⚠️ No Changeset found

Latest commit: c518eb4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@lukeed lukeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally would prefer a @typedef to break out some of the long-running type info, but as long as the type check is happy then I'm fine

const server = new Server(manifest);

const prefix = `/${manifest.appDir}/`;

const worker: Module.Worker<Environment> = {
/** @type {import('worktop/cfw').Module.Worker<{ ASSETS: import('worktop/cfw.durable').Durable.Object }>} */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional, free to disregard

Suggested change
/** @type {import('worktop/cfw').Module.Worker<{ ASSETS: import('worktop/cfw.durable').Durable.Object }>} */
/**
* @typedef Environment
* @property {import('worktop/cfw.durable').Durable.Object} ASSETS
*/
/** @type {import('worktop/cfw').Module.Worker<Environment>} */

@Rich-Harris Rich-Harris merged commit 0185508 into chore/cloudflare-worktop Mar 31, 2022
@Rich-Harris Rich-Harris deleted the chore/cloudflare-worktop-js branch March 31, 2022 18:21
Rich-Harris added a commit that referenced this pull request Mar 31, 2022
* chore(cloudflare): optimize Cache usage; strict TS source

* chore: add changeset

* skip lib check for conflicts

* bundle worktop (#4473)

* bundle worktop

* build on prepublishOnly

* Update packages/adapter-cloudflare/tsconfig.json

* update builder file paths

Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>

* convert to JS (#4474)

* Update .changeset/empty-falcons-run.md

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants