DEV Community

Discussion on: Introduction to Object Types in TypeScript

Collapse
noahlaux profile image
Noah Laux • Edited

Thanks for a great article. I just wanted to point out in your very first example, it seems like you had a little copy/paste error, as the type and interface examples are both the type one.

Also a little later you have

// This will work:
const bookshelf: StringKey = {
  // Property is always a number.
  1: 'Hackers and Painters',
  2: 'Blitzscaling',
}
Enter fullscreen mode Exit fullscreen mode

which I suppose should use the NumberKey type

Collapse
alexdevero profile image
Alex Devero Author

Thanks a lot Noah. Its fixed now.