File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,18 @@ export type Order = {
33 items : ( OrderItem | UnknownText ) [ ] ;
44} ;
55
6- export type OrderItem = Pizza | Beer | Salad | NamedPizza ;
6+ export type OrderItem = Pizza | Beer | Salad ;
77
88// Use this type for order items that match nothing else
99export interface UnknownText {
10- itemType : ' unknown' ,
10+ itemType : " unknown" ,
1111 text : string ; // The text that wasn't understood
1212}
1313
14-
1514export type Pizza = {
16- itemType : ' pizza' ;
15+ itemType : " pizza" ;
1716 // default: large
18- size ?: ' small' | ' medium' | ' large' | ' extra large' ;
17+ size ?: " small" | " medium" | " large" | " extra large" ;
1918 // toppings requested (examples: pepperoni, arugula)
2019 addedToppings ?: string [ ] ;
2120 // toppings requested to be removed (examples: fresh garlic, anchovies)
@@ -26,23 +25,20 @@ export type Pizza = {
2625 name ?: "Hawaiian" | "Yeti" | "Pig In a Forest" | "Cherry Bomb" ;
2726} ;
2827
29- export interface NamedPizza extends Pizza {
30- }
31-
3228export type Beer = {
33- itemType : ' beer' ;
29+ itemType : " beer" ;
3430 // examples: Mack and Jacks, Sierra Nevada Pale Ale, Miller Lite
3531 kind : string ;
3632 // default: 1
3733 quantity ?: number ;
3834} ;
3935
40- export const saladSize = [ ' half' , ' whole' ] ;
36+ export const saladSize = [ " half" , " whole" ] ;
4137
42- export const saladStyle = [ ' Garden' , ' Greek' ] ;
38+ export const saladStyle = [ " Garden" , " Greek" ] ;
4339
4440export type Salad = {
45- itemType : ' salad' ;
41+ itemType : " salad" ;
4642 // default: half
4743 portion ?: string ;
4844 // default: Garden
You can’t perform that action at this time.
0 commit comments