TypeScript/tests/baselines/reference/spellingSuggestionGlobal2.symbols
Matt Kantor 424b805d61
Fix "Cannot find name 'global'. Did you mean 'global'?" (#42262)
* Add tests for "Cannot find name 'global'. Did you mean 'global'?"

* Fix "Cannot find name 'global'. Did you mean 'global'?"

* Add an additional test case for spelling suggestions of "global".

* Name the boolean for suggestions being global scope augmentations.
2021-01-20 15:23:34 -08:00

13 lines
443 B
Plaintext

=== tests/cases/compiler/spellingSuggestionGlobal2.ts ===
export {}
declare global { const x: any }
>global : Symbol(global, Decl(spellingSuggestionGlobal2.ts, 0, 9))
>x : Symbol(x, Decl(spellingSuggestionGlobal2.ts, 1, 22))
const globals = { x: true }
>globals : Symbol(globals, Decl(spellingSuggestionGlobal2.ts, 2, 5))
>x : Symbol(x, Decl(spellingSuggestionGlobal2.ts, 2, 17))
global.x // should suggest `globals` (GH#42209)