How to use the esp-js.EspDecoratorUtil.getOrCreateMetaData function in esp-js

To help you get started, we’ve selected a few esp-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esp / esp-js / packages / esp-js-polimer / src / eventTransformations.ts View on Github external
return function (target, name, descriptor) {
        Guard.stringIsNotEmpty(eventType, 'eventType passed to an eventTransformFor decorator must not be \'\'');
        let metadata: EspMetadata  = EspDecoratorUtil.getOrCreateMetaData(target.constructor);
        metadata.addEvent(
            name,
            eventType,
            DecoratorTypes.custom,
            observationStage,
            null
        );
        return descriptor;
    };
}
github esp / esp-js / packages / esp-js-polimer / src / decorators.ts View on Github external
return function (target, name, descriptor) {
        Guard.stringIsNotEmpty(eventType, 'eventType passed to an observeStoreEvent decorator must not be \'\'');
        let metadata: EspMetadata  = EspDecoratorUtil.getOrCreateMetaData(target.constructor);
        metadata.addEvent(
            name,
            eventType,
            DecoratorTypes.custom,
            observationStage,
            null
        );
        return descriptor;
    };
}