Created
June 11, 2024 11:07
-
-
Save Caballerog/75c4573013f3981b9761f043f259c5f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RecipeComponent } from "./recipe-component"; | |
export class Ingredient implements RecipeComponent { | |
name: string; | |
amount: string; | |
constructor(name: string, amount: string) { | |
this.name = name; | |
this.amount = amount; | |
} | |
showDetails(): string { | |
return `Ingredient: ${this.name}, Amount: ${this.amount}`; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment