Skip to content

static methods ? #3

@p-wieser

Description

@p-wieser

Hi,
I am trying to define a static method inside of a mixin. But it happens that this static method is only available/callable from the mix'ed class :

export const myMixin = DeclareMixin(( superclass ) => class extends superclass {
    static Name( resource ){
        return resource === '.' ? '' : resource;
    }
   [...]
};
export class myClass extends mix( baseClass ).with( myMixin ){
   [...]
};

console.debug( typeof myMixin.Name ); // undefined
console.debug( typeof myClass.Name ); // function

I must admit that I am not sure of really understand the mixin code, but would it be possible to have this static method callable though myMixin.Name ?

And thank you very much for having took back the work of Justin.

Regards
Pierre

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions