Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Generic support #6

Closed
mokone91 opened this issue Jul 25, 2022 · 3 comments
Closed

Generic support #6

mokone91 opened this issue Jul 25, 2022 · 3 comments
Assignees

Comments

@mokone91
Copy link

Hi!
i have a code like:
packages/base/index.ts

export interface List<T> {
  total: number;
  items: T[];
}

packages/other/index.ts

async listEntity(): Promise<List<Entity>>

But in docs i getting:

listEntity(): Promise<List>

Thanks! this plug-in is awesome!

@nlepage nlepage self-assigned this Jul 27, 2022
@nlepage
Copy link
Owner

nlepage commented Jul 27, 2022

Hi @mokone91

Is Entity a type parameter?

Maybe declared in a class like this:

class Repository<Entity> {
  async listEntity(): Promise<List<Entity>>
}

@nlepage
Copy link
Owner

nlepage commented Jul 27, 2022

@mokone91 I just published release 0.2.2 to fix this, let me know if it is OK for you.

@nlepage nlepage closed this as completed Jul 27, 2022
@mokone91
Copy link
Author

It works now, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants