Skip to content

Missing type parameter for PhantomData #49

@shniubobo

Description

@shniubobo

If a struct's type parameter is only used in a PhantomData field, it is missing from the generated .d.ts.

To reproduce

Clone this repo and follow the steps in README.md, which generates:

/* tslint:disable */
/* eslint-disable */
export interface Foo {}

... from:

pub struct Foo<T> {
    bar: PhantomData<T>,
}

Expected behaviour

Either of the following should be generated:

  • /* tslint:disable */
    /* eslint-disable */
    export interface Foo<T> {}
  • /* tslint:disable */
    /* eslint-disable */
    export interface Foo<_> {}

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