News for hackers. Stuff that matters.
Re:Show HN: Boilerplate for Node.js and TypeScript with Jest... by scoti on Monday January 23, 2017 @02:34AM (#13460526)
I had the same problem until a recent TS release introducing the keyof feature. You can create a TypeScript type that automatically convert a class definition to stubs.

  type StubInstance<T> = {
      [P in keyof T]: sinon.SinonStub;
  };

There are no comments on this comment yet.