Skip to content

Glossary: Angular Beyond the Basics

as (type assertion)

Also written: as HTMLInputElement

TypeScript syntax that tells the compiler to treat a value as a given type, such as `event.target as HTMLInputElement`.

Where the book teaches it