Skip to content

Generics not working for component definitions when upgrading to version 3+ #87

@LolliDepp

Description

@LolliDepp

If I upgrade to version 3.2.0 from 2.3.3, generics stop working in my components

import * as tsx from 'vue-tsx-support';
import { Prop, Component } from 'vue-property-decorator';

interface IMyProps<TType> {
  items: TType[];
}

@Component
export default class AList<TType> extends tsx.Component<IMyProps<TType>> {
  // ...
}

With 2.3.3 I can use AList in other .tsx files and provide any kind of array for items and it will works

With 3.2.0 all my other components using AList are giving me error because TType of AList is inferred to be of type unknown instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions