Created
October 14, 2020 13:48
-
-
Save ljmotta/034ad3d914d238e8c673c3f7e4d2cd60 to your computer and use it in GitHub Desktop.
TodoListEnvelopeApiImpl Methods
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
import { Association, TodoListInitArgs } from "../api"; | |
export class TodoListEnvelopeApiImpl implements TodoListEnvelopeApi { | |
// ... | |
public async todoList__init(association: Association, initArgs: TodoListInitArgs) { | |
this.args.envelopeBusController.associate(association.origin, association.envelopeServerId); | |
this.args.view().setUser(initArgs.user); | |
} | |
public async todoList__addItem(item: string) { | |
return this.args.view().addItem(item); | |
} | |
public async todoList__getItems() { | |
return this.args.view().getItems(); | |
} | |
public todoList__markAllAsCompleted() { | |
this.args.view().markAllAsCompleted(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment