Interfaces vs Types in TypeScript
@lebyy▲ 0 net votes
Problem: What is the difference between these statements ( interface vs type ) in TypeScript? interface X { a: number b: string } type X = { a: number b: string }; Fix (from the top answer): 2019 Update The current answers and the official documentation are outdated. And for those new to TypeScript, the terminology used isn't clear without examples. Below is a list of up-to-date differences. 1. Objects / Functions Both can be used to describe the shape of an object or a function signature. But the syntax…