Skip to content
Playground(another site)

bynk.resolve.reserved_host_name

Error A declaration is named globalThis, which the generated TypeScript uses to reach host globals.

The generated TypeScript reaches the host's built-in objects as globalThis.<name>, so a top-level declaration called globalThis (a type, function, agent, provider and so on) would hide all of them in its module. Rename the declaration. Parameters and local bindings may use the name: the compiler renames those itself.

Example

type globalThis = { n: Int } // ✗ the name is reserved
type Counter = { n: Int } // ✓ any other name

In the Book

See also