I wonder if it is possible to define a class that implements
Not
If not, is it possible to create only an object of this type?
Yes. There will be some use of a type statement (or any ):
interface Counter { (start: number): string; interval: number; reset(): void; } function getCounter():Counter{ var counter = <Counter>function(start:number){}; counter.interval = 123; counter.reset = function(){}; return counter; }
source share