News for hackers. Stuff that matters.
Re:TypeScript Is Surprisingly OK for Compilers by c-hendricks on Friday August 18, 2023 @12:22PM (#37177929)
Ah, that's not really that different than in TypeScript then. There you have to define a callable interface, and can add whatever properties you want

    interface SomethingCallableWithAnExtraProperty {
      // This means you can call it like a function.
      (args: Whatever): SomethingReturned

      // And since it's an interface, you can still do interface-y things
      anotherProperty: string
    }

There are no comments on this comment yet.