Skip to content

TypeScript 2.3.1 fails to compile this JS and throws TypeError #15525

Closed
@zenorbi

Description

@zenorbi

TypeScript Version: 2.3.1 and 2.3.2

Code

tsconfig.json:

{
	"compilerOptions": {
		"target": "es5",
		"allowJs": true,
		"outDir": "out",
		"rootDir": "src"
	}
}

src/test.js:

someFunction(function(BaseClass) {
	class Hello extends BaseClass {
		constructor() {
			this.foo = "bar";
		}
	}
});

Expected behavior:
To compile without errors

Actual behavior:
throws TypeError: Cannot read property 'kind' of undefined

TypeScript 2.3.0 does not have this problem but 2.3.1 and 2.3.2 does.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions