Skip to content

Lesson 16 is not working properly #2

@eran-nussbaum

Description

@eran-nussbaum

Hello,

In "16-in-operator-literal-type-guard" folder I run tsc and then node app/dist.js and the output is:

Song name: undefined
Playlist name: The Best Songs

However, if I switch the commenting out between lines 16 and 17 from:

  // if (isSong(item)) {
  if (item.kind === 'song') {

to

  if (isSong(item)) {
  // if (item.kind === 'song') {

then the output is properly:

Song name: Wonderful Wonderful
Playlist name: The Best Songs

It seems like something with the kind approach is not working properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions