A `declare global` augmentation is a definition of its own (`<file>.global`) that every check in the codebase includes: code relying on it typechecks whether or not it imports the augmenting file, scratch files see it, and editing it checks the new version alone.
import a library that uses enums, namespaces, parameter properties, namespace imports, module state, ts directives, statements setting up constants and namespaces of types beside an interface
A module augmentation (`declare module "./schema" { namespace Annotations … }`) is a definition of its own (`<file>.augments`) that every check includes: code passing what it adds typechecks without importing it, its module is written to merge with the definition wherever that's rendered, and it's edited from a scratch file naming the definition's namespace (`declare module "#codebase/lib/schema"`).