aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/RecipePreview.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/RecipePreview.ts')
-rw-r--r--src/models/RecipePreview.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/models/RecipePreview.ts b/src/models/RecipePreview.ts
new file mode 100644
index 000000000..351ecf765
--- /dev/null
+++ b/src/models/RecipePreview.ts
@@ -0,0 +1,21 @@
1// @flow
2
3export default class RecipePreview {
4 id: string = '';
5
6 name: string = '';
7
8 icon: string = '';
9
10 featured: boolean = false;
11
12 aliases: string[] = [];
13
14 constructor(data: { id: any; }) {
15 if (!data.id) {
16 throw Error('RecipePreview requires Id');
17 }
18
19 Object.assign(this, data);
20 }
21}