Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cannot extend from type which constructs intersection of type parameter with a default #16211

Copy link
Copy link
@DanielRosenwasser

Description

@DanielRosenwasser
Issue body actions
interface VueCtor {
    new <D = object>(d: D): Vue & D;
}

interface Vue {
}

declare var Vue: VueCtor;


class A extends Vue {
    //          ~~~
    // Error: Base constructor return type 'Vue & D' is not a class or interface type.
}

I thought this might have to do with the constraint, but adding an explicit D extends object = object doesn't work either.

Is it possible that D isn't correctly getting instantiated with its default type argument when extending from Vue?

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScript

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.