-
-
Save 0x1000000/2feacaa9c92ab666072acf823809cd12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@StateTracking({includeAllPredefinedFields:true}) | |
export class GreetingService implements IGreetingServiceForm { | |
userName: string | null = null; | |
immediateUserName: string | null = null; | |
greeting: string = null; | |
isThinking: boolean = false; | |
countdown: number = 0; | |
@With("userName") | |
static onNameChanged(state: State): NewState{ | |
... | |
} | |
@With("userName").Debounce(3000/*ms*/) | |
static greet(state: State): NewState | |
{ | |
... | |
} | |
@With("immediateUserName") | |
static onImmediateUserName(state: State): NewState{ | |
... | |
} | |
@With("countdown").Debounce(1000/*ms*/) | |
static countdownTick(state: State): NewState{ | |
... | |
} | |
@With("isThinking") | |
static reset(state: State): NewState{ | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment