I have been trying to convert a JavaScript web form to Typescript, and have been unable to work out how to convert statements involving table rows, such as the following:
let body = document.getElementById("selectStackBody");
let rowCount = body.rows.length;
let row = body.insertRow(rowCount);
body.deleteRow(i);
I can see how to get the body by doing the following:
let body = <HTMLBodyElement>document.getElementById("selectStackBody");
but I can't see how to get the right syntax for the rows.
HTMLBodyElementinterface does not have arowsproperty. TheHTMLTableSectionElementinterface (which atbodyelement uses), however, does. If you show the HTML on which you are attempting to run this code, it would be easier to help you.