Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 14, 2020 13:24
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/26c422cfb4e5f2098d98470801b91df9 to your computer and use it in GitHub Desktop.
Save ljmotta/26c422cfb4e5f2098d98470801b91df9 to your computer and use it in GitHub Desktop.
TodoList Envelope Api
export interface TodoListEnvelopeApi {
todoList__init(association: Association, initArgs: TodoListInitArgs): Promise<void>;
todoList__addItem(item: string): Promise<void>;
todoList__getItems(): Promise<Item[]>;
todoList__markAllAsCompleted(): void;
}
export interface Association {
origin: string;
envelopeServerId: string;
}
export interface TodoListInitArgs {
user: string;
}
export interface Item {
label: string;
completed: boolean;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment