Here is a bit of typescript:
let markdown = <HTMLTextAreaElement>document.getElementById(id);
let markdownoutput = <HTMLLabelElement>document.getElementById(output);
in above code, before select something using element by id, we are declaring the element type params.(<HTMLTextAreaElement>
) it works fine. but what is the benefit are we getting from?
any one help me how the way typescript takes this and helps us?
thanks in advance.