-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Convert adapter-cloudflare back to JS #4474
Conversation
|
There was a problem hiding this 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 }>} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional, free to disregard
/** @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>} */ |
* 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>
i think this gives us the same level of type safety