TypeScript/tests/baselines/reference/importedModuleAddToGlobal.errors.txt
chenjigeng d60747f043
Feat/quick fix for types (#42126)
* feat: add quick fix for types

* feat: add test case for quick fix of types

* feat: add did-you-mean error when Cannot_find_name_0 and Cannot_find_namespace_0

* feat: add Cannot_find_namespace_0_Did_you_mean_1 error and only suggest when resolve type

* feat: update baselines

* feat: update baselines

* feat: update baselines

* chore: fix style problem

* Always suggest spelling corrections

* suggest primitives instead of their wrappers

* Add primitives to suggestions

Instead of altering wrappers to look like primitives.

* add semicolons

* revert unneeded change

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-10-05 08:14:16 -07:00

23 lines
778 B
Plaintext

tests/cases/compiler/importedModuleAddToGlobal.ts(15,23): error TS2833: Cannot find namespace 'b'. Did you mean 'B'?
==== tests/cases/compiler/importedModuleAddToGlobal.ts (1 errors) ====
// Binding for an import statement in a typeref position is being added to the global scope
// Shouldn't compile b.B is not defined in C
module A {
import b = B;
import c = C;
}
module B {
import a = A;
export class B { }
}
module C {
import a = A;
function hello(): b.B { return null; }
~
!!! error TS2833: Cannot find namespace 'b'. Did you mean 'B'?
!!! related TS2728 tests/cases/compiler/importedModuleAddToGlobal.ts:8:8: 'B' is declared here.
}