Does anyone know how to cast in TypeScript?
I\'m trying to do this:
var script:HTMLScriptElement = document.getElementsByName(\"script\")[0]; alert(s
Could be solved in the declaration file (lib.d.ts) if TypeScript would define HTMLCollection instead of NodeList as a return type.
DOM4 also specifies this as the correct return type, but older DOM specifications are less clear.
See also http://typescript.codeplex.com/workitem/252