loading...

re: TypeScript: type vs interface VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Doesn't seem to help typescriptlang.org/play/#code/JYOw... 🤔 interface IClassyAnimal { new (name: string): this; } class Parrot implements IC...
 

Yes. I wasn't unable to check it, but I was sure I did something like that. But according to the docs

typescriptlang.org/docs/handbook/i...

Seems like you are right. Constructors interfaces declarations are mostly effective as function arguments.

I don't know all the answers, I simply experimented to write this post. It also can happen I miss a lot of things, or there are bugs in TS or some small details which I miss. All ideas are more than welcome. (TypeScript documentation seems to lag behind actual behavior sometimes)

code of conduct - report abuse