Sunday, April 22, 2018

What are TypeScript Typings?

This was per this a tool to install typings which made jQuery or moment.js play nicely with TypeScript. Basically, the challenge was that while JavaScript is "untyped" there are types in TypeScript and if you want to use jQuery or moment.js or some other untyped JavaScript library amongst the types it can cause chaos. There are type declaration files with .d.ts extensions that give types to the untyped faking it like it fits, get it? This came up on page 23 of "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis which gives the reader an enormous guilt trip for maybe being eventually mad at the fact that the code at the Packt site will eventually be out of date as things change over time and the book ages five or ten years. I digress. The Stack Overflow article I reference here also suggests that npm now takes care of this problem and not the thing in the first link I provide, not any longer anyways.

No comments:

Post a Comment