Reputation: 2214
in the v3 the handlers was registered with app.setHandler
app.setHandler({
LAUNCH() {
return this.toIntent('HelloWorldIntent');
},
HelloWorldIntent() {
this.ask('Hello World! What\'s your name?', 'Please tell me your name.');
},
MyNameIsIntent() {
this.tell('Hey ' + this.$inputs.name.value + ', nice to meet you!');
},
in v4 (if i haven't understood well) are automatically registered with decorators? but how this meccanism works under the hood? does someone can explain me tecnically?
Upvotes: 0
Views: 34
Reputation: 327
Generally speaking, decorators are functions that take as arguments both the object they are decorating (for example, the component) and sometimes a set of options. The function can then modify the object using the options. This is a feature of TypeScript and not Jovo itself. You can read more about it here.
Upvotes: 0