I created a simple Typescript project. I added this in ChildClass.ts file
if (Number.isNaN(6)) {
console.log("it is NaN");
return;
} else {
console.log("everything looks fine");
}
I tested it on simulator and on browser. Everything is fine. Then I got iOS build. Then compiled. Everything went well. I opened Xcode and run. And I got the error saying TypeError undefined is not a function at Number.isNaN(6)
I tested same code in different machine there was no error. What the heck am I doing wrong?
Creator 1.7.0 (no custom build templates)
Xcode 9.1 (9B55)
jsconfig.json -> target: “es6”
tsconfig.json -> in compilerOptions -> lib: [“dom”, “es5”, “es2015.promise”, “es6”]