2013-12-17 6 views
5

타이프 라이터 인텔리이를 위해 잘 작동 지방 화살표 기능이 작동하지 않습니다 : 비주얼 스튜디오 인텔리이

class SampleClass { 
    /** 
    * Does stuff 
    * 
    * @param blah stuff needing done 
    */ 
    public doStuff(blah: string) { 
    } 
} 

var sample = new SampleClass(); 
// intellisense works correctly and shows parameter description: 
sample.doStuff("hello"); 

그러나 지방 화살표를 사용하도록 전환하는 것은 jsdoc 인텔리을 깰 것으로 보인다 (메소드 서명은 여전히 ​​나타납니다 하지만 jsdoc 설명은 없습니다) :

class SampleClass2 { 
    /** 
    * Does stuff 
    * 
    * @param blah stuff needing done 
    */ 
    public doStuff = (blah: string) => { 
    } 
} 

var sample2 = new SampleClass2(); 
// intellisense gives the method signature still but no longer picks up any of the jsdoc descriptions: 
sample2.doStuff("hello"); 

Visual Studio 2012 업데이트 4를 사용하고 있습니다. TypeScript 0.9.5.

이 버그입니까, 아니면 jsdoc 주석에 다른 구문을 사용해야합니까?

답변

4

는 솔직히 매우 혼란 스러워요.

그는 자동 완성에 대해 알고
class SampleClass2 { 
    public doStuff = 
     /** 
     * Does stuff 
     * 
     * @param blah stuff needing done 
     */ 
    (blah: string) => { 
    } 
} 

var sample2 = new SampleClass2(); 
sample2.doStuff("hello"); 
0

Visual Studio 2013을 사용하고 있으므로 정확한 설정을 테스트 할 수는 없지만 두 가지 예제 모두에 대해 유형 힌팅 및 자동 완성을 받아야합니다. 이것은 타이프 놀이터에서 작동하는 이유 JSDoc와 타이프 라이터 놀이터에서

스크린 샷 ...

enter image description here

+0

, 그 의견에 대해서 이야기하고 예는 보이지 않는다하여 작업 :

Visual Studio에서이 작업을하려면, 함수 문서는 함수 표현식 자체에 있어야합니다 놀이터에서 시험해 보았습니다. –

+0

나를 위해 작동합니다. 스크린 샷이 추가되었습니다. – Fenton

+1

입력 할 때 작동하지 않습니다. after sample2 –