TypeScript supports rest and spread properties for objects, which are slated for standardization in ECMAScript 2018. It automatically infers rest and spread types so that you can use object spread and rest elements in a statically typed manner without having to manually add type annotations.
At 6:25, you execute a TypeScript file directly in Node. Have you aliased ts-node
to node
, or is there another handy tip which I don't know about?
@Jodi: While the file has a .ts
extension, it is still just a plain JavaScript file with no TypeScript syntax at all. Therefore, Node can run it without any problems (and doesn’t care about the file extension).
Of course it is! Thanks Marius, that makes perfect sense.