var out = document.getElementsByClassName('myclass')[0];
out.focus();
out.select();
out.selectionStart =1;
I've encountered an issue in my TypeScript file while attempting to execute the above code. Unfortunately, it's throwing errors at me:
ERROR in src/app/main/utilities/keyboard/keyboard.component.ts(29,9): error TS2339: Property 'focus' does not exist on type 'Element'. src/app/main/utilities/keyboard/keyboard.component.ts(30,9): error TS2339: Property 'select' does not exist on type 'Element'. src/app/main/utilities/keyboard/keyboard.component.ts(31,9): error TS2339: Property 'selectionStart' does not exist on type 'Element'.
The compiler is claiming that these properties do not exist even though they should. Despite this, when I execute the code, it functions as expected. However, I'm left with a large block of intimidating red text in my console which is quite bothersome.