Skip to content

[JS/TS] [<AttachMembers>] removes comments from functions #4132

@Freymaurer

Description

@Freymaurer

repl

Without [<AttachMembers>]:

/**
 * Hello!
 */
export function ArcTable__TellMeYourName(this$) {
    const arg = ArcTable__get_name(this$);
    toConsole(printf("Hello, i am %A!"))(arg);
}

With:

export class ArcTable {
    constructor(name) {
        this["name@"] = name;
    }
    get name() {
        const __ = this;
        return __["name@"];
    }
    set name(v) {
        const __ = this;
        __["name@"] = v;
    }
    TellMeYourName() {
        const this$ = this;
        const arg = this$.name;
        toConsole(printf("Hello, i am %A!"))(arg);
    }
}

Expected:

export class ArcTable2 {
    "name@": string;
    constructor(name: string) {
        this["name@"] = name;
    }
    get name(): string {
        const __: ArcTable = this;
        return __["name@"];
    }
    set name(v: string) {
        const __: ArcTable = this;
        __["name@"] = v;
    }
    /**
     * Hello!
     */
    TellMeYourName(): void {
        const this$: ArcTable = this;
        const arg: string = this$.name;
        toConsole(printf("Hello, i am %A!"))(arg);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions