Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript should allow you to extend any #22443

Closed
sandersn opened this issue Mar 9, 2018 · 2 comments
Closed

Javascript should allow you to extend any #22443

sandersn opened this issue Mar 9, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@sandersn
Copy link
Member

sandersn commented Mar 9, 2018

// @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.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Salsa labels Mar 9, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Mar 9, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Mar 9, 2018

Related to #17032

@sandersn
Copy link
Member Author

sandersn commented Apr 4, 2018

Affects webpack in @mohsen1's addition of ts-check.

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 4, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants