HarmoWatch/redux-decorators

View on GitHub
src/state/decorator/redux-state-decorator.ts

Summary

Maintainability
A
1 hr
Test Coverage
import { GenericDecorator } from '../../generic/decorator/generic-decorator';

export interface ReduxStateDecoratorConfig {
    name: string;
}

export function ReduxStateDecoratorForClass(config?: ReduxStateDecoratorConfig) {
    return ReduxStateDecorator.instance.forClass(config);
}

export class ReduxStateDecorator extends GenericDecorator<ReduxStateDecoratorConfig> {

    public static readonly instance = new ReduxStateDecorator();
    public static readonly get = ReduxStateDecorator.instance.get.bind(ReduxStateDecorator.instance);

    public static forClass = ReduxStateDecoratorForClass;

    constructor() {
        super('ReduxState');
    }

}