Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gruntjs Typescript编译错误缺少行号信息_Gruntjs_Typescript - Fatal编程技术网

Gruntjs Typescript编译错误缺少行号信息

Gruntjs Typescript编译错误缺少行号信息,gruntjs,typescript,Gruntjs,Typescript,Typescript编译器并不总是显示行号或任何有关错误发生位置的上下文信息。尤其是在编译当前文件过程中编译的另一个文件中发生错误时 有办法解决这个问题吗 例如: // this is inside test.ts file import * as Info from './infomodule'; 如果编译test.ts并且infomodule.ts中存在错误,则通常tsc只给出错误,而不提供任何上下文信息。大概是这样的: Running "typescript:watch" (typesc

Typescript编译器并不总是显示行号或任何有关错误发生位置的上下文信息。尤其是在编译当前文件过程中编译的另一个文件中发生错误时

有办法解决这个问题吗

例如:

// this is inside test.ts file
import * as Info from './infomodule';
如果编译
test.ts
并且
infomodule.ts
中存在错误,则通常
tsc
只给出错误,而不提供任何上下文信息。大概是这样的:

Running "typescript:watch" (typescript) task

>>   Type '{}' is not assignable to type 'IDriverChartsDriverInfo'.
Warning: Task "typescript:watch" failed. Use --force to continue.
(我正在使用grunt任务编译typescript文件)

然后通常是tsc

这不是
tsc
这是
grunt-typescript
。在此处将此报告为错误: