为什么我会收到下面屏幕截图中显示的错误?
Atom说我的tsconfig.json'项目文件包含无效的选项' for allowJs,buildOnSave和compileOnSave。
但应允许这些设置:https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md
答案 0 :(得分:2)
compileOnSave
和buildOnSave
不在CompilerOptions
之下。像这样:
{
"compileOnSave": true,
"buildOnSave": false,
"compilerOptions": {
"module": "system",
"noImplicitAny": true,
"preserveConstEnums": true,
"removeComments": true,
"sourceMap": true,
"target": "es5"
},
"exclude": [
"node_modules",
"wwwroot/lib",
"typings/main",
"typings/main.d.ts"
]
}
似乎不支持allowJs
,但很快就会支持。这是GitHub上的一个分支,表明他们已经添加了它,但它们还没有合并。
答案 1 :(得分:1)
看起来这些选项尚未添加到Atom TypeScript中。看一下他们的界面,它缺少你遇到麻烦的属性。
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
ifstream class_details("classlist.txt");
if (!class_details.is_open())
{
cout<< "error"<<'\n';
return;
}
string data;
% From here I am thinking on how to get the data after first whitespace
% in each line
class_details.close();
return 0;
}