News for hackers. Stuff that matters.
Re:Yarn's Future – v2 and beyond by danielnixon on Thursday January 24, 2019 @06:46PM (#18994206)
This[1] typechecks in Flow but not in TypeScript:

    /* @flow */

    interface HasIdentityFunction {
      id<A>(a: A): A
    }

    class Example implements HasIdentityFunction {
     id<A>(a: A): number {
       return 42;
     }
    }

    var x: string = (new Example(): HasIdentityFunction).id("hello")
[1] https://twitter.com/puffnfresh/status/1077072700609159168

There are no comments on this comment yet.