Closed arv closed 5 years ago
When a mixin has an optional abstract method we need to tell the class about it.
class Mixin extends React.Component {} ReactSupport.declareMixin(Mixin); /** * @param {a} p * @return {b} */ Mixin.optionalAbstract; class Comp extends React.Component {} ReactSupport.mixin(Comp, Mixin);
we generate code that looks like:
/** @type {(function(a): b)|undefined} */ Comp.prototype.optionalAbstract;
Without this we end up getting a Unexpected errors: JSC_INTERFACE_METHOD_NOT_IMPLEMENTED. property optionalAbstract on interface MixinInterface is not implemented by type Comp
Unexpected errors: JSC_INTERFACE_METHOD_NOT_IMPLEMENTED. property optionalAbstract on interface MixinInterface is not implemented by type Comp
When a mixin has an optional abstract method we need to tell the class about it.
we generate code that looks like:
Without this we end up getting a
Unexpected errors: JSC_INTERFACE_METHOD_NOT_IMPLEMENTED. property optionalAbstract on interface MixinInterface is not implemented by type Comp