Skip to content

Javascript should allow you to extend any #22443

@sandersn

Description

@sandersn
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: defaults.js
/** @type {any} */
var X
class Y extends X {
    constructor() {
        super()
    }
}

Expected behavior:
No error, or at least an error on X "Can't extend value of type any".

Actual behavior:
Error on super(), "Call target does not contain any signatures."

There are lots of anys floating around Javascript, so this should be allowed, even if it's not trivial. Maybe it should be allowed in Typescript too.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions