2017-05-30 6 views
0

は私のpackage.jsonである:ここではなぜ私は.jsファイルにインテリセンスを持っていますが、.tsファイルにインテリセンスはありませんか?ここ

{ 
    "name": "edge-node-api", 
    "version": "1.0.0", 
    "description": "Edge Electrons customers web API", 
    "main": "api.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
}, 
"repository": { 
    "type": "git", 
    "url": "http://192.168.0.50:3000/lem/edge-node-api.git" 
}, 
"author": "lem", 
"license": "ISC", 
"dependencies": { 
    "body-parser": "^1.17.2", 
    "bull": "^3.0.0-alpha.4", 
    "del": "^2.2.2", 
    "express": "^4.15.3", 
    "fm-log": "^4.4.3", 
    "lodash": "^4.17.4", 
    "memcached": "^2.2.2", 
    "moment": "^2.18.1", 
    "morgan": "^1.8.2", 
    "njwt": "^0.4.0", 
    "pg": "^6.2.2", 
    "redis": "^2.7.1", 
    "vali-date": "^1.0.0" 
}, 
"devDependencies": { 
    "@types/bull": "^2.1.0", 
    "@types/node": "^7.0.22", 
    "api-doc": "^4.0.0", 
    "gulp": "^3.9.1", 
    "gulp-develop-server": "^0.5.2", 
    "gulp-sequence": "^0.4.6", 
    "gulp-typescript": "^3.1.7", 
    "typescript": "^2.3.3", 
    "typings": "^2.1.1" 
} 

}

は私tsconfig.jsonです:ここでは

{ 
    "compilerOptions": { 
     "module": "commonjs", 
     "target": "es2017", 
     "sourceMap": true, 
     "removeComments": true, 
     "outDir": "dist" 
    }, 
    "include": [ 
     "src/**/*.ts" 
    ], 
    "exclude": [ 
     "node_modules" 
    ] 
} 

は私typings.jsonです:

{ 
    "devDependencies": { 
     "body-parser": "registry:npm/body- 
      parser#1.15.2+20161116154925", 
     "debug": "registry:npm/debug#2.0.0+20170504163145", 
     "express": "registry:npm/express#4.14.0+20170217205433", 
     "gulp": "registry:npm/gulp#4.0.0-alpha.2+20160817105618", 
     "lodash": "registry:npm/lodash#4.0.0+20161015015725", 
     "memcached": "registry:dt/memcached#2.2.0+20170324151803", 
     "morgan": "registry:dt/morgan#1.7.0+20160726064905", 
     "pg": "registry:npm/pg#6.0.2+20170314174547", 
     "redis": "registry:npm/redis#2.6.0+20160901110043" 
    }, 
    "dependencies": {}, 
    "globalDevDependencies": { 
     "bull": "registry:dt/bull#2.1.2+20170221033156" 
    } 

}

何か不足していますか?

+0

サンプルコードなしでは分かりません。また、TypeScript 2.0以降を使用している場合は、入力から完全に離れることをお勧めします。 –

答えて

1

私はちょうど

を削除 "が含まれる":[ "SRC/**/* TS" ]、

tsconfig.jsonから、それが働きました。

関連する問題