polymer-decorators icon indicating copy to clipboard operation
polymer-decorators copied to clipboard

Can not use Property Decorator in mixin (Decorators are not valid here)

Open jogibear9988 opened this issue 5 years ago • 1 comments

I've a mixin like this

type Constructor<T> = { new (...args: any[]): T };

function VisuElement<B extends Constructor<any>>(base: B) {
    return class extends base {
     constructor(...args: any[]) {
         super();
         this._ve = true;
         this._veBindings = [];
     }

    static get properties() {
        return {
            unbindOnUnload: Boolean //Needed when a Element is created via a Dom repeat
        }

here it is not possible to replace static get properties() with decorator. => "Decorators are not valid here"

jogibear9988 avatar Mar 27 '19 10:03 jogibear9988