Czy ktoś wie, jak przesyłać w TypeScript?
Próbuję to zrobić:
var script:HTMLScriptElement = document.getElementsByName("script")[0];
alert(script.type);
ale daje mi błąd:
Cannot convert 'Node' to 'HTMLScriptElement': Type 'Node' is missing property 'defer' from type 'HTMLScriptElement'
(elementName: string) => NodeList
Nie mogę uzyskać dostępu do elementu „type” elementu skryptu, chyba że przerzucę go na poprawny typ, ale nie wiem, jak to zrobić. Przeszukałem dokumenty i próbki, ale nic nie znalazłem.