Ask HN: Does any one know why TypeScript has both Interfaces and Type aliases?

https://news.ycombinator.com/item?id=36967968
by KorematsuFredt • 3 years ago
2 1 3 years ago

Of course I have read the docs and I know the subtle differences. But I also do not see how the design proposal to have two language features so identical both could have possibly passed a review of peers.

I am not familiar with how Typescript develops. Is there some RFP one can refer to ?

I suspect the reasons for these two features is historical, backward compatibility as such but I could not find any meaningful discussion on the topic.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com