Skip to content

Glossary: TypeScript Basics

querySelector

Also written: document.querySelector

A browser function that returns the first page element matching a CSS selector, or `null` if there is none. TypeScript includes `null` in its return type.

Where the book teaches it

Related terms

HTMLInputElementnarrowing