30 lines
No EOL
1.6 KiB
Text
30 lines
No EOL
1.6 KiB
Text
tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find external module 'fs'.
|
|
tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, 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 TS2307: Cannot find external module 'fs'.
|
|
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: Error, files: {}[]) => {
|
|
~~~~~~~~~
|
|
!!! error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'.
|
|
!!! error TS2345: Type 'void' is not assignable to type 'boolean'.
|
|
files.forEach((file) => {
|
|
var fullPath = join(IDoNotExist);
|
|
~~~~~~~~~~~
|
|
!!! error TS2304: Cannot find name 'IDoNotExist'.
|
|
} );
|
|
} );
|
|
} );
|
|
} |