difficulty | training | chapter | tags |
---|---|---|---|
1 |
true |
Chapter 6: TypeScript |
vue |
In this challenge, we've created a simple AppAlert
component. It takes 2 props: type
and dismissable
. It also emits an event dismiss
.
Your task is to type these props and emits.
- The
type
prop should be one of the following strings: "success", "error", "warning", or "info" - The
type
prop should default to 'info' - The
dismissable
prop should be a boolean - The
dismissable
prop should default tofalse
- The
dismiss
event's payload should be the literal typetrue
- All TS errors within the
AppAlert
component should be resolved
💡 HINT: Play with the usage of the
AppAlert
component inApp.vue
to see how your IDE's autocomplete is more useful with the typed props and events.