2012-10-02 18 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のは、今、私は現在、そこにそれを使用していて、少なくともVisual Studioのコードでは、サポートされており、それがインテリセンスポップアップで表示されます。

関連する問題