feat: add strict mode

This commit is contained in:
YunYouJun
2022-04-14 23:32:24 +08:00
parent fd92681b8c
commit 56ad10ef07
6 changed files with 455 additions and 20 deletions

View File

@@ -1,3 +1,5 @@
export type Difficulty = '简单' | '普通' | '困难'
export interface RecipeItem {
/**
* 菜名
@@ -11,18 +13,22 @@ export interface RecipeItem {
* 材料
*/
stuff: string[]
/**
* 难度
*/
difficulty?: Difficulty | ''
/**
* 标签
*/
tags: string[]
tags?: string[]
/**
* 方式
*/
methods: string[]
methods?: ('炒' | '煎' | '烘' | '炸')[]
/**
* 工具
*/
tools: string[]
tools?: string[]
}
export type Recipe = RecipeItem[]