TypeScript/tests/baselines/reference/undeclaredModuleError.errors.txt
Anders Hejlsberg a4f9bf0fce
Create type aliases for unresolved type symbols (#45976)
* Create type aliases for unresolved type symbols

* Accept new baselines

* Update fourslash tests

* Unresolved import aliases create tagged unresolved symbols

* Add comments

* Accept new baselines

* Add fourslash tests
2021-09-23 13:21:27 -07:00

29 lines
1.8 KiB
Plaintext

tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2792: Cannot find module 'fs'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: fs.Stats, name: string) => boolean'.
Type 'void' is not assignable to type 'boolean'.
tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'.
==== tests/cases/compiler/undeclaredModuleError.ts (3 errors) ====
import fs = require('fs');
~~~~
!!! error TS2792: Cannot find module 'fs'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {}
function join(...paths: string[]) {}
function instrumentFile(covFileDir: string, covFileName: string, originalFilePath: string) {
fs.readFile(originalFilePath, () => {
readdir(covFileDir, () => {
~~~~~~~
!!! error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: fs.Stats, name: string) => boolean'.
!!! error TS2345: Type 'void' is not assignable to type 'boolean'.
} , (error: Error, files: {}[]) => {
files.forEach((file) => {
var fullPath = join(IDoNotExist);
~~~~~~~~~~~
!!! error TS2304: Cannot find name 'IDoNotExist'.
} );
} );
} );
}