paint-brush
TypeScript Interfaces and Types: A Comparisonby@smpnjn
2,239 reads
2,239 reads

TypeScript Interfaces and Types: A Comparison

by Johnny Simpson3mSeptember 19th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In TypeScript, you can declare custom types in two different ways. One is with the `interface` keyword, and the other with the type` keyword. Interfaces are extendable - types are not extendable after the fact. Classes can implement interfaces, but not types, so classes must conform to the interface. Almost all the features in TypeScript depend on the features you use in your TypeScript code - but as we know, a lot of TypeScript codes tend to be functional rather than functional.
featured image - TypeScript Interfaces and Types: A Comparison
Johnny Simpson HackerNoon profile picture
Johnny Simpson

Johnny Simpson

@smpnjn

Product, Engineering, Web

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Johnny Simpson HackerNoon profile picture
Johnny Simpson@smpnjn
Product, Engineering, Web

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here