You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
TypeScript supports callable objects with multiple signatures. We could support this with the new @:selfCall metadata. So, we define a new method by some convention (how do we avoid potential name clashes?) adding all signatures as @:overload and append @:selfCall to it.
The authors of node's assert module went the extra mile for throws to be usable as a first class value. Meaning that you can get require('assert').throws and pass that around. They did by hand what $bind does for us automagically for methods and the .d.ts reflects that. I would just honor it.
kLabz
pushed a commit
to kLabz/ts2hx
that referenced
this issue
May 25, 2018
TypeScript supports callable objects with multiple signatures. We could support this with the new
@:selfCall
metadata. So, we define a new method by some convention (how do we avoid potential name clashes?) adding all signatures as@:overload
and append@:selfCall
to it.Also there are cases like this one: https://github.com/borisyankov/DefinitelyTyped/blob/1d08e36fe3ce81715cb956223f7e5a0a9882cd63/node/node.d.ts#L1341, maybe we should translate that var into an overloaded function.
The text was updated successfully, but these errors were encountered: