Hacker News new | past | comments | ask | show | jobs | submit login

So I started exploring this again today, and it ends up that what you had works, but if I parens on the typeof check, it no longer works:

    if (typeof(x) === "string")
I opened an issue: https://github.com/Microsoft/TypeScript/issues/9391

Thanks for the help!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: