difficulty | training | chapter | tags |
---|---|---|---|
1 |
true |
Chapter 6: TypeScript |
vue |
In this challenge, let's update the vTabs
component created earlier on in the training to be type safe.
Use TypeScript to type the data injected via vTabs
for use within vTabPanel
.
- On line 26 of
vTabs.vue
properly type the injectionKey as anInjectionKey
that provides an object with the following properties:registerTab
- a function that takes a title argument that's a string and returns voidactiveTab
- a readonly reactive ref that is a a string or undefinedactivateTab
- a function that takes a title argument that's a string and returns void
- Once the types are in place, all TS errors in
vTabPanel.vue
should disappear