2016-04-19 27 views
2

以下のスクリーンショットにエラーが表示されるのはなぜですか?atom-typescript - これらのTypescript設定オプションが認識されないのはなぜですか?

Atomは、私のtsconfig.jsonに、「プロジェクトファイルにallowJs、buildOnSave、compileOnSaveの無効なオプションが含まれています。

しかし、これらの設定を許可する必要があります。これらのオプションはAtomの活字体に追加されていないようhttps://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md

enter image description here

答えて

2

compileOnSavebuildOnSaveCompilerOptionsの下に行っていません。これと同じように:

{ 
    "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のブランチがあり、すでに追加していることを示しています。まだマージしていません。

+0

allowJsはメインのTypescriptコンパイラでサポートされているので、tsconfig.jsonファイルに残しておいても問題ありません。 Atomでエラーが表示されるだけですが、コンパイル時にはうまく動作します。 – Richard

+0

私はちょうど編集を行いました。 allowJsがすぐに追加されるようです。 – rgvassar

1

が見えます。彼らのインターフェイスを見て、それはあなたが問題を抱えているプロパティが欠けています。

https://github.com/TypeStrong/atom-typescript/blob/e2fa67c4715189b71430f766ed9a92d9fb3255f9/lib/main/tsconfig/tsconfig.ts#L8-L35

interface CompilerOptions { 
    allowNonTsExtensions?: boolean; 
    charset?: string; 
    codepage?: number; 
    declaration?: boolean; 
    diagnostics?: boolean; 
    emitBOM?: boolean; 
    help?: boolean; 
    locale?: string; 
    mapRoot?: string;         // Optionally Specifies the location where debugger should locate map files after deployment 
    module?: string;         //'amd'|'commonjs' (default) 
    noEmitOnError?: boolean; 
    noErrorTruncation?: boolean; 
    noImplicitAny?: boolean;       // Error on inferred `any` type 
    noLib?: boolean; 
    noLibCheck?: boolean; 
    noResolve?: boolean; 
    out?: string; 
    outDir?: string;         // Redirect output structure to this directory 
    preserveConstEnums?: boolean; 
    removeComments?: boolean;       // Do not emit comments in output 
    sourceMap?: boolean;        // Generates SourceMaps (.map files) 
    sourceRoot?: string;        // Optionally specifies the location where debugger should locate TypeScript source files after deployment 
    suppressImplicitAnyIndexErrors?: boolean; 
    target?: string;         // 'es3'|'es5' (default)|'es6' 
    version?: boolean; 
    watch?: boolean; 
} 
関連する問題