Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Renderer = class {
- async render(data) {
- if (!(data instanceof Data)) throw 'invalid data type';
- const [title, header, items] = await data.getData();
- this._title = title;
- this._header = header;
- this._items = items;
- this._render();
- }
- _render() {
- throw '_render must override';
- }
- };
Add Comment
Please, Sign In to add comment