difficulty | training | chapter | tags |
---|---|---|---|
1 |
true |
Chapter 6: TypeScript |
vue |
In this challenge, we're loading blog posts from an API endpoint. Because the reactive posts
array does NOT have any initial hardcoded data it cannot be implicitly typed. Therefore, you'll need to explicitly type it as an array of posts that have the same properties from the API endpoint (see /public/api.json
).
- Type the
posts
ref as an array ofPost
objects. - Try explicitly typing the computed prop for practice (even though it can be easily implicitly typed)