TypeScript/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt
mshivaku99 bffe3540fa
Issue35876: Give better error message when Classic Module Resolution with incorrect path (#38105)
* added Error 5084 to diagnosticMessages.json

* added test case errorForBareSpecifierWithImplicitModuleResolution1 to tests/cases/compiler

* modified checker.ts to report error 5084 when classic resolution and incorrect path are used

* added baseline changes

* passes all test cases including src/testRunner/unittests/ tests

* Update with feedback

* Make it check whether it is the right module resolution kind

* Use the right diagnostic message in tsserver tests

Co-authored-by: Meera Shivakumar <mshivaku@umich.edu>
Co-authored-by: Orta <git@orta.io>
2020-07-30 13:45:29 -04:00

19 lines
971 B
Plaintext

tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found.
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ====
class D { }
export = D;
declare module "ext" {
~~~~~
!!! error TS2664: Invalid module name in augmentation, module 'ext' cannot be found.
export class C { }
}
// Cannot resolve this ext module reference
import ext = require("ext");
~~~~~
!!! error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
var x = ext;