Skip to content

Property 'isNaN' does not exist on type 'NumberConstructor'. #15149

@monolithed

Description

@monolithed
{
	"scripts": {
		"test": "tsc",
	},

	"devDependencies": {
		"typescript": "^2.2.2"
	}
}
{
	"compilerOptions": {
		"typeRoots": [
			"./node_modules/@types",
			"./index.d.ts"
		],

		"lib": [
			"es2017",
			"dom"
		],

		"target": "es2017",
		"module": "commonjs",
		"moduleResolution": "node",
		"noImplicitAny": false,

		"declaration": false,

		"allowSyntheticDefaultImports": false,
		"strictNullChecks": true,

		"emitDecoratorMetadata": true,
		"experimentalDecorators": true,
		"sourceMap": false
	},

	"exclude": [
		"./node_modules",
		"./cache"
	]
}
if (!Number.isNaN(value)) {
	return Number.parseInt(value);
}
error TS2339: Property 'isNaN' does not exist on type 'NumberConstructor'.
error TS2339: Property 'parseInt' does not exist on type 'NumberConstructor'.

What's wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions