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 nameIn the Book
See also
- The grammar rules it governs:
type_decl,fn_decl,agent_decl,provider_decl. - Every code in its category, Resolution, on the diagnostic index.
bynk explain bynk.resolve.reserved_host_nameshows the same from the installed toolchain, without a network.