-
Notifications
You must be signed in to change notification settings - Fork 529
add Props generic to ExportedHandler for ExecutionContext #5989
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
base: main
Are you sure you want to change the base?
add Props generic to ExportedHandler for ExecutionContext #5989
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Merging this PR will degrade performance by 12.32%
Performance Changes
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? |
Adds a
Propstype parameter to the ExportedHandler types for ExecutionContext.More context cloudflare/agents#501