Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 14, 2020 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmotta/034ad3d914d238e8c673c3f7e4d2cd60 to your computer and use it in GitHub Desktop.
Save ljmotta/034ad3d914d238e8c673c3f7e4d2cd60 to your computer and use it in GitHub Desktop.
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