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