Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class DiceAnimation {
- private _playing: boolean
- set playing(val: boolean) {
- this._playing = val
- }
- // Here I want to export information to be used in other system. Is that even possible ?
- @animProp
- get playing(): boolean {
- return this._playing
- }
- }
- export class Reducer {
- // Variant 1.
- // Here I want to import information from DiceAnimation instance. Is that even possible?
- @getAnimProp("DiceAnimation", "playing")
- dicePlaying: boolean
- // Variant 2.
- // Here I want to import information from DiceAnimation instance. Is that even possible?
- reduce(@getAnimProp("DiceAnimation", "playing") dicePlaying: boolean,): any {
- // logic
- }
- }
- // Decorator functions.
- export function animProp() {
- }
- export function getAnimProp() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement