Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 14, 2020 13:48
Embed
What would you like to do?
TodoListEnvelopeApiImpl Methods
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