aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/RecipePreview.ts
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-17 05:07:38 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-17 05:07:38 +0530
commit0fbee32c27a6efdfe88534303922d189ddbba817 (patch)
tree2b9dddba64ff1519e293c64b3b42b4d9172ec4d3 /src/models/RecipePreview.ts
parentRevert "chore: update outdated node_modules (#1807)" (diff)
downloadferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.tar.gz
ferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.tar.zst
ferdium-app-0fbee32c27a6efdfe88534303922d189ddbba817.zip
Typescript conversion (#1805)
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}