Skip to content

Generic class expressions in JS should issue an error #31683

@weswigham

Description

@weswigham

TypeScript Version: 3.4.0-dev.201xxxxx

Search Terms:

Code

// @ts-check
class Foo {
	static Bar = class<T> {
		/** @type {number} */
		x;
	};
}

Expected behavior:
Error on <T>

Actual behavior:
No error.

getJSSyntacticDiagnosticsForFile in program.ts seems to be missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptGood First IssueWell scoped, documented and has the green light

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions