Right now I'm doing this. I want to get rid of jQuery.
var brt = $('#id').val();
I want to move to TypeScript. How can I achieve this?
Right now I'm doing this. I want to get rid of jQuery.
var brt = $('#id').val();
I want to move to TypeScript. How can I achieve this?
TypeScript isn't a replacement for jQuery, it's a superset of JavaScript.
If you want a cross-browser library that allows you to implement actions against the DOM with a single syntax, jQuery (among other frameworks) is still a great tool for that job. TypeScript can utilize jQuery, but it's not a replacement for it.
Note that Typescript is a superset of both Javascript (ES5), which is supported by most of the browsers, and new Javascript (ES6 / EcmaScript2015)
Usually Typescript is transpiled down to Javascript ES5 in order to be supported by all of the major browsers.
Thanks to that, you can get rid of jQuery library and select the DOM node by using Javascript.
let brt = document.getElementById("id").value