-
|
I want to export an interface that inherits from the export namespace Site {
declare class Post {
id: number;
}
class Posts extends Array<Post> {
// details about the query used to fetch this array of posts
searchQuery: string;
offset: number;
totalAmount: number;
constructor (posts: Post[]) {
super(...posts);
// other properties...
}
}
export type { Posts };
}The documentation does document The issue is that the documentation includes all methods and properties of export interface Posts extends Array<Post> {
length: number;
map<U>(callbackfn: (value: Post, index: number, array: Post[]) => U, thisArg?: any): U[];
offset: number;
pop(): Post | undefined;
push(...items: Post[]): number;
searchQuery: string;
shift(): Post | undefined;
slice(start?: number, end?: number): Post[];
totalAmount: number;
unshift(...items: Post[]): number;
}(Only a truncated example--the actual docs would be much longer and messier) What I really want is this: export interface Posts extends Array<Post> {
offset: number;
searchQuery: string;
totalAmount: number;
}Is it possible to work around this, by any chance? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
There's a plugin which adds a tag for exactly this use case! https://www.npmjs.com/package/typedoc-plugin-no-inherit |
Beta Was this translation helpful? Give feedback.
There's a plugin which adds a tag for exactly this use case! https://www.npmjs.com/package/typedoc-plugin-no-inherit