typescript-book icon indicating copy to clipboard operation
typescript-book copied to clipboard

Mention how to extend (most) any type

Open estaub opened this issue 8 years ago • 1 comments

I had an "aha moment" when I read https://github.com/Microsoft/TypeScript/issues/16985#issuecomment-318833845

I think it would be great to explain somewhere that if you want to extend a literal interface, just give it a name. I don't see a good place for this tip; otherwise, I'd draft a PR.

estaub avatar Jul 29 '17 16:07 estaub

Mention how to extend (most) any type

It would go in tips but I need to understand a practical need for it. Can I have an example :rose:

basarat avatar Jul 30 '17 03:07 basarat