I am new to Type Script and i am Trying to convert a small piece of javascript code to typescript & getting an error: typeError list[i] is undefined. Here is my Actual js:
function handleDragStart(e) {
this.style.opacity = '0.4'; // this / e.target is the source node.
}
var cols = document.querySelectorAll('#columns .column');
[].forEach.call(cols, function(col) {
col.addEventListener('dragstart', handleDragStart, false);
});
Here My Tried fiddle https://jsfiddle.net/hahkarthick/8cwcb970/3/