Closed arv closed 5 years ago
For a mixin we generate an interface. We were not setting the parameters in the methods. Like this
class Mixin extends React.Component { /** @param {number} x */ method(x) {} } ReactSupport.declareMixin(Mixin);
generated:
/** @interface */ function MixinInterface() {} /** @param {number} x */ MixinInterface.prototype.method = function() {}
The last line above needs to be:
MixinInterface.prototype.method = function(x) {}
or x gets marked as optional which leads to issues when overriding.
x
For a mixin we generate an interface. We were not setting the parameters in the methods. Like this
generated:
The last line above needs to be:
or
x
gets marked as optional which leads to issues when overriding.