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

TypeScript support for Utility Types #97

Open
alexraginskiy opened this issue Aug 2, 2019 · 3 comments
Open

TypeScript support for Utility Types #97

alexraginskiy opened this issue Aug 2, 2019 · 3 comments

Comments

@alexraginskiy
Copy link

alexraginskiy commented Aug 2, 2019

Hey all,

Any plans on supporting Utility Types such as Partial<Foo> or Omit<Foo, 'bar'>? Is there a trick I'm missing? Thanks!

@giladgray
Copy link
Contributor

try configuring your Documentalist to include tslib's definition files.

@adidahiya
Copy link
Contributor

@giladgray I don't think that's relevant, tslib defines runtime helpers: https://unpkg.com/tslib@1.10.0/tslib.d.ts

@alexraginskiy can you elaborate exactly what kind of support you're looking for? what is the current vs. expected behavior?

@emarkovic
Copy link

I am also running into this issue and wondering if there is just some configuration I am missing. Take the following:

export interface ContactCardActionProps extends Omit<ButtonProps, "appearance"> {
    children: React.ReactNode;
}

ButtonProps is an interface with ~20 properties, one of which is appearance. I want ContactCardActionProps to stay coupled with ButtonProps but this is the output that Documentalist produces for ContactCardActionProps:

Screen Shot 2021-11-16 at 4 35 36 PM

Notice "any" in the "extends" property. Is there a way around this?

Thanks!

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

No branches or pull requests

4 participants