2016-09-30 6 views
5

나는 Angular2-Typescript 응용 프로그램을 작성 중입니다.VSCODE 경고 실험 장식품

ng new myApp 

를하지만 새 구성 요소를 만들 때 경고가 @Component 태그에 나타납니다 다음과 같이 나는 각-CLI로 프로젝트를 생성했습니다.

Experimental decorators warning in Visual Studio Code

을하지만 나를 위해 작동하지 않습니다

이 게시물 다음 해결하기 위해 시도했습니다.

{ 
"compilerOptions": { 
"declaration": false, 
"emitDecoratorMetadata": true, 
"experimentalDecorators": true, 
"lib": ["es6", "dom"], 
"mapRoot": "./", 
"module": "es6", 
"moduleResolution": "node", 
"outDir": "../dist/out-tsc", 
"sourceMap": true, 
"target": "es6", 
"typeRoots": [ 
    "../node_modules/@types" 
    ] 
} 
} 

타이프 라이터 버전은 다음과 같습니다 : "타이프"

나는 나의 tsconfig.json을 첨부 다음과 같이 "2.0.2"는

+0

의 사용 가능한 복제 [VSCode : 그것은 가능하면 실험 장식 경고를이 표시되지 않도록 (http://stackoverflow.com/questions/31737677/vscode-is-it - 불가능 - 실험 - 장식 - 경고) – Wosi

+0

@Wosi 나를 위해 작동하지 않습니다 : ( –

+0

이러한 답변 중 하나가? 처음 세 가지 답변에 기회를 주었습니까? – Wosi

답변

1

마지막으로, 나는 내 문제를 해결 : 먼저

, 글자 형식 업데이트 :

$ npm install [email protected] 

그리고 나서 vscode에서 사용자 기본 설정을 편집하고 followin g :

{ 
    "typescript.tsdk": "node_modules/typescript/lib" 
} 

감사 peeskillet에 :)

+1

설명 : * VSCode *에 * 노드 * 종속성의 TypeScript lib를 사용하도록 지시해야합니다 (기본 제공이 아닌). – Yuri