re: Migrating to TypeScript VIEW POST

FULL DISCUSSION
 
const textBox = <HTMLInputElement>document.getElementById('txtTestName');

You should probably use as instead:

const textBox = document.getElementById('txtTestName') as HTMLInputElement;

It plays better with *.tsx files. And doesn't look like a generic type argument. Seen people mix those two up.

code of conduct - report abuse