2012-10-02 8 views
5

क्या टाइपस्क्रिप्ट के अंदर एक्सएमएल दस्तावेज़ीकरण के लिए पहले से ही समर्थन है? ऐसा लगता है कि ऐसा नहीं है, लेकिन शायद मैं कुछ दिख रहा हूं।क्या टाइपस्क्रिप्ट के अंदर एक्सएमएल दस्तावेज़ीकरण के लिए पहले से ही समर्थन है?

मैं कुछ इस तरह करना चाहते हैं:

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

यहां मैंने टिप्पणी पोस्ट की: typecript.codeplex.com/discussions/397660 एंडर्स हेजल्सबर्ग ने लिखा है कि वे एक्सएमएल दस्तावेज़ीकरण के बजाय जेएसडीओसी का लक्ष्य रख रहे थे। –

0

इसके लायक होने के लिए, माइक्रोसॉफ्ट के नमूने में टिप्पणी की इस शैली में शामिल हैं। लंबन नमूना से:

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

मैंने कोडप्लेक्स पर एक टिप्पणी जोड़ा और एंडर्स हेजल्सबर्ग का जवाब यह था कि वे जेएसडोक की ओर झुका रहे थे। http://typescript.codeplex.com/discussions/397660 –

-1

जाहिर JSDoc अब, समर्थित कम से कम दृश्य स्टूडियो संहिता में है, के रूप में मैं वर्तमान में यह वहाँ का उपयोग कर रहा है और यह IntelliSense पॉपअप में पता चलता है।

संबंधित मुद्दे