Skip to content

Glossary: TypeScript Beyond the Basics

declare global

A declaration used inside a module to add names to the global scope, which is otherwise not possible from a module. For example, `declare global { var KC_VERSION: string }` makes `KC_VERSION` available in every file.

Where the book teaches it

Related terms

globalThisdeclareModule augmentation