Typescript JSDoc事件是全局的

时间:2013-12-10 00:29:44

标签: typescript jsdoc

我一直在尝试让JSDoc使用TypeScript,并且只要我使用正确的命名约定,大多数情况下都可以使用它。

主要感谢这篇文章:http://typescript.codeplex.com/workitem/504

我似乎无法弄清楚如何记录事件,以便将它们记录为类的一部分,因为它们被认为是全球性的。

这就是TypeScript的JS输出:

    var Cars;
    (function (Cars) {
        /**
        * Represents the main car class
        * @class Cars.Car
        */
        var Car = (function () {
            /**
            @event Cars.Car#started
            @summary The event is fired when the car starts
            */
            function Car() {
                this._func_started = null;
            }
            return Car;
        })();
        Cars.Car = Car;
    })(Cars || (Cars = {}));

我意识到类本身没有多大意义,但我想到的@event语法会记录Car类的事件。相反,它似乎是全球性的?

必须承认我对TypeScript和JSDoc并不开心:(

0 个答案:

没有答案