-
Notifications
You must be signed in to change notification settings - Fork 1
Parameter list pollution #2
Copy link
Copy link
Open
Description
A cancellation token design where the cancel token is explicitly passed into the async operation via a parameter can lead to parameter list pollution. For C#, this is perhaps mitigated somewhat by the ability to overload function signatures based on static type information. In JS, we can't do the same kind of overloading.
It appears that an async function would need to "plan ahead" to support cancel tokens by reserving a parameter position for it (unless the cancel token is passed in an options bag). This seems unfortunate and goes against the "progressive enhancement" quality of cancel tokens in general.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels