core icon indicating copy to clipboard operation
core copied to clipboard

Only output TypeScript type parameter constraint in parameter declaration

Open Tarmil opened this issue 8 years ago • 0 comments

For example, in WebSharper.Control, we are currently outputting the following:

export function New<T0 extends Function>(Handlers:(T0)[]):DelegateEvent<T0 extends Function> {
  // ...
}

The extends Function constraint should only be present in the parameter declaration New<T0 ...> and not in the return type DelegateEvent<T0 ...>.

Tarmil avatar Oct 19 '17 09:10 Tarmil