RicoSuter / SigSpec

Specification and code generator for SignalR Core.
MIT License
159 stars 37 forks source link

Ignore CancellationToken type when generating parameters #40

Closed jbriggs22 closed 3 years ago

jbriggs22 commented 3 years ago

When using a ChannelReader<> method on Hub with a cancellation token, the generated TypeScript contains definitions for CancellationToken/WaitHandle/etc, these aren't needed since you can just call .dispose() to cancel an ISubscription. The CancellationToken parameter makes the TyeScript for streaming unusable.

This is the smallest change to workaround this, I'm open to pitching in something more thought out. I understand this may not work outside of the TypeScript generation (for something like C# generation it would need these parameters).