Skip to content

[Transforms] Missing comment in decorated class decoration #10731

Closed

Description

@yuit
declare function decorator(x: string): any;

/**
 * Save this comment
 */
@decorator("hello")
class Remote {

}

emitted as

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Remote = (function () {  // NOTE: no comment here
    function Remote() {
    }
    return Remote;
}());
Remote = __decorate([
    decorator("hello")
], Remote);

Activity

  1. added
    Domain: API: Transforms
    on Sep 6, 2016
  2. self-assigned this
    on Sep 6, 2016
  3. changed the title [-]Missing comment in decorated class decoration[/-] [+][Transforms] Missing comment in decorated class decoration[/+] on Sep 6, 2016
  4. added
    Fixed
    on Sep 16, 2016
  5. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugDomain: API: TransformsFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions