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.
Hello,
In "16-in-operator-literal-type-guard" folder I run
tscand thennode app/dist.jsand the output is:However, if I switch the commenting out between lines 16 and 17 from:
to
then the output is properly:
It seems like something with the
kindapproach is not working properly.