Message from JavaScript discussions

November 2020

— Is there a JQuery type of thing with TS


And it does this by forcing you to specify more clearly what you are doing, and will then tell you as you write the bugs

— Yes

— What's it called?

— If you like jquery you will hate ts

— types/jquery

— Provides TypeScript types for jquery

— So TS specifies types.

let a = "hi";

String a = "hi";

— let a: string = "hi";

— But TypeScript has inferrence

— So if you just do:
let a = "hi";
TypeScript will assume you mean "a is a string"

— let a = "hi";

a = "hello";

a = 4 // TypeScript error