-
-
Notifications
You must be signed in to change notification settings - Fork 737
Typedoc does not include props from an interface when Omit is used #1094
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
Comments
@aciccarello what are your thoughts on this bug? |
This is a weird bug... There appears to be a couple issues:
|
vkefallinos/typedoc@ef812b1 |
I figured I'd chime in with my experience with this issue. I have a series of interfaces that export interface PublicKeyCredentialUserEntityJSON extends Omit <
PublicKeyCredentialUserEntity, 'id'
> {
id: Base64URLString;
} Here's interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
displayName: string;
id: BufferSource;
} The resulting documentation for this interface fails to list any information about Environment
|
I get the exact same output as @MasterKale but using Pick, also on 0.17.0-3. While I know next to nothing about the internal code of typedoc, I have noticed (I believe is in the theme stage) that if you extend an interface which is not exported, the theme has nothing to link inherited members from and instead list them inherited from itself. For instance: interface Foo {
one: number;
two: number;
}
export interface Bar extends Foo {
three: string;
} Typedoc creates a bar.html page for the Bar interface, but not for Foo which isn't exported. The HTML displays the inherited property Regarding the However, it gets more interesting when you get the same result if inheriting from an exported interface Foo {
one: number;
two: number;
}
export type FooPicked = Pick<Foo, 'one'>;
export interface Bar extends FooPicked {
three: string;
} |
The library mode support for inheritance is being tracked in #1386, I'll be looking at that next week, and hopefully end up with something that produces reasonable results. I'm pretty sure TypeDoc's inheritance support was written before you could inherit from types, so it was never considered. |
In the
extendedTypes
ofProps2
I get something similar to the below, but there is noid: 88
in the generated JSON.Expected Behavior
I get only
c:number
as props inProps2
.Actual Behavior
Props2
to havea: string
,b: string
andc: number
as its interface.Steps to reproduce the bug
Environment
The text was updated successfully, but these errors were encountered: