Skip to content

Commit

Permalink
updated-RichTextElement-with-generic-type-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickm615 committed Mar 26, 2024
1 parent 1f7e4a4 commit 4903a7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/elements/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ export namespace Elements {
displayTimeZone: string | null;
};

export type RichTextElement = ElementModels.IElement<string> & {
export type RichTextElement<TContentItem extends IContentItem = IContentItem> = ElementModels.IElement<string> & {
/**
* Links
*/
links: ILink[];

/**
* Images included within rich text element
*/
images: IRichTextImage[];

/**
* Array of linked item codenames
*/
linkedItemCodenames: string[];

/**
* Array of linked items retrieved from `modular_content` part of the response. Not all items might be here
* as it depends on the `depth` parameter of query.
* The `linkedItemsReferenceHandler` configuration can be used to disable mapping of linked items
*/
linkedItems: IContentItem[];
linkedItems: TContentItem[];
};

export type NumberElement = ElementModels.IElement<number | null>;
Expand Down

0 comments on commit 4903a7f

Please sign in to comment.