palantir / documentalist

:memo: A sort-of-static site generator optimized for living documentation of software projects
http://palantir.github.io/documentalist
Apache License 2.0
153 stars 27 forks source link

TypeScript support for Utility Types #97

Open alexraginskiy opened 5 years ago

alexraginskiy commented 5 years ago

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 commented 5 years ago

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

adidahiya commented 5 years ago

@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 commented 2 years ago

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!