add Props generic to ExportedHandler for ExecutionContext#5989
add Props generic to ExportedHandler for ExecutionContext#5989deathbyknowledge wants to merge 2 commits intocloudflare:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Merging this PR will not alter performance
Comparing Footnotes
|
|
FWIW, while this change is fine, the last time someone proposed it, we figured out that they were using props in a way that wasn't intended.
workers-auth-provider cheats a bit, but only because semantically I was trying to emulate what would happen if we had OAuth more built into the platform. It breaks the letter but keeps the spirit of the rule. People should not, however, be using |
|
I'm not arguing for it one way or the other ... just asking ... should we consider making |
|
@jasnell nah. Most JS APIs allow you to assign random properties on them even though it's probably not a great idea. No real reason to block it here, but also no reason to go out of our way to support it better. |
Ack. We're currently using Are we OK merging the changes here then? |
CI looks pretty red. We'd need to fix that. EDIT: Some failures looked spurious so I clicked to re-run. |
|
Ah sorry I thought the snapshots were generated on CI. Fixed. |
|
Done. Though it seems it failed with the same error. You do seem to be a member of the Cloudflare org though. @ketanhwr any ideas what might be going wrong here? |
|
Hey @dom96, I was a "private" member of the org, I've updated it to public, maybe that does it. Do you mind kicking off another run? |
|
Could someone lend a hand on what's wrong with the errors in CI? I'm not sure how my changes are breaking those |
|
They look like flakes to me, I re-ran them, let's see if that helps |
Adds a
Propstype parameter to the ExportedHandler types for ExecutionContext.More context cloudflare/agents#501