2012-10-02 2 views
5

TypeScript 안에 XML 문서가 이미 지원됩니까? 거기에없는 것 같지만 어쩌면 나는 뭔가를 바라보고 있습니다. 언어 사양이에 대한 언급이 없기 때문에이 기능에 대한 지원은 현재 없다TypeScript 안에 XML 문서가 이미 지원됩니까?

export class Point { 
    /// <summary>This is a Point class.</summary> 

    constructor (public x: number, public y: number) { 
     /// <summary>Creates a new Point object</summary> 
     /// <param name="x"></param> 
     /// <param name="y"></param> 
    } 
} 

답변

5

:

나는 이런 식으로 뭔가를하고 싶습니다.

사용하는 유일한 주석 구문은 소스 파일에 대한 종속성을 만드는 것입니다 :

/// <reference path="..."/> 

당신이 할 수있는 suggest features such as this on the project page은 - 그래서는 미래의 경우 아이디어 이익 견인의 언어에 추가 할 수 있습니다.

+0

감사합니다. 기능 요청을 추가했습니다. –

+1

기능 요청에 대한 링크가 있습니까? 나는 그것을지지하고 싶다. – Amr

+0

여기에 의견을 게시했습니다 : typescript.codeplex.com/discussions/397660 Anders Hejlsberg는 XML 문서 대신 JSDoc을 목표로한다고 썼습니다. –

0

Microsoft의 샘플에는이 스타일의 주석이 포함되어 있습니다. 시차 샘플에서 : 나는 현재이 그것을 사용하고 같은

constructor(scrollableContent: HTMLElement, perspective: number) { 
     /// <param name="scrollableContent">The container that will be parallaxed.</param> 
     /// <param name="perspective">The ratio of how much back content should be 
     /// scrolled relative to forward content. For example, if this value is 
     /// 0.5, and there are 2 surfaces, the front-most surface would be scrolled 
     /// normally, and the surface behind it would be scrolled half as much.</param> 
     this.perspective = perspective; 
     this.surface = []; 
     this.content = scrollableContent; 

     $(scrollableContent).scroll((event: JQueryEventObject) => { 
      this.onContainerScroll(event); 
     }); 
    } 
+0

나는 codeplex에 덧글을 달았고 Anders Hejlsberg의 대답은 그들이 JsDoc쪽으로 기울고 있다는 것이 었습니다. http://typescript.codeplex.com/discussions/397660 –

-1

은 분명히 JSDoc 지금, 적어도 비주얼 스튜디오 코드에서 지원하고 IntelliSense를 팝업으로 보여줍니다.