KarlPurk/redux-decorators

View on GitHub
src/state.decorator.ts

Summary

Maintainability
A
0 mins
Test Coverage

export function State(): Function {
    return function(target: any, ...props: string[]): void {
        if (target.stateProperties === undefined) {
            target.stateProperties = [];
        }
        if (props.length) {
            target.stateProperties = target.stateProperties.concat(props);
        }
    }
}