News for hackers. Stuff that matters.
Re:Love for TypeScript by continuational on Saturday July 30, 2016 @05:08AM (#12192248)
I don't know about TS, but in the main competitor, Flowtype, you can give uhoh this type:

    uhoh : ((x : string) => number) & ((x : number) => string)
And get what you expect:

    const a = uhoh('foo') // : number
    const b = uhoh(3)     // : string

There are no comments on this comment yet.