False positive in 07-arrays problem
talves opened this issue · 2 comments
talves commented
This could be construed as a tuple of type Post
, but of course it's an array.
beginners-typescript-tutorial/src/07-arrays.problem.ts
Lines 19 to 24 in 266c2f6
It might be better to create an array example so it fails if a student set the user interface to [Post]
which passes the type checks.
posts: [
{
id: 1,
title: "How I eat so much cheese",
},
{
id: 2,
title: "Why I don't eat vegetables",
},
],
hidaviddong commented
mattpocock commented
Makes sense - go for it!