Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Abstract methods with overloads get duplicated #470

Closed
tbosch opened this issue Apr 17, 2017 · 1 comment
Closed

Abstract methods with overloads get duplicated #470

tbosch opened this issue Apr 17, 2017 · 1 comment

Comments

@tbosch
Copy link
Contributor

tbosch commented Apr 17, 2017

Given this:

abstract class Base {
  public abstract publicAbstract(): void;
  public abstract publicAbstract(arg: number): void;

Tsickle produces this:

abstract class Base {
/**
 * @abstract
 * @return {void}
 */
publicAbstract() {}
/**
  * @abstract
  * @param {number} arg
  * @return {void}
  */
publicAbstract(arg: number) {}
}

Related to #180

@tbosch
Copy link
Contributor Author

tbosch commented Aug 3, 2017

No more a problem as tscikle now produces this JavaScript, which is correct:

/**
 * @abstract
 */
class Base {
}
function Base_tsickle_Closure_declarations() {
    /**
     * @abstract
     * @return {void}
     */
    Base.prototype.publicAbstract = function () { };
    /**
     * @abstract
     * @param {number} arg
     * @return {void}
     */
    Base.prototype.publicAbstract = function (arg) { };
}

@tbosch tbosch closed this as completed Aug 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant