UNPKG

363 BPlain TextView Raw
1import {WebpackStore} from './webpack-store';
2
3export function WebpackState(namespaceOrConfig?: string | any, config?: any): Function {
4 function decoratorFactory(target: Object, decoratedPropertyName?: string, descriptor?: any): void {
5 WebpackStore.select(target, () => this[decoratedPropertyName]);
6 return descriptor;
7 }
8
9 return decoratorFactory;
10}