In todo-it.ts, add the following line: const todoInput: HTMLInputElement = document.getElementById('todoInput') as HTMLInputElement;.
This allows us to retrieve the todoInput input object from the DOM. We'll use that to get the value of the input.
This allows us to mention a few more things about TypeScript.
TypeScript includes type definitions for some standard libraries, including the DOM API. As you saw before, we did not declare HTMLInputElement, but TypeScript already knows about it.
In the preceding code, did you notice the as keyword? Note that as is the cast operator; it simply lets you tell TypeScript to consider a type as if it was another one. In this example, we did it because document.getElementById(...) returns a generic HTMLElement element while we know for a fact that our element should be an HTMLElement one.