Skip to content

Commit

Permalink
Extend types
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Jul 16, 2024
1 parent 9be97db commit 02a1916
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/components/StructuredText/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,27 @@ export function appendKeyToValidElement(
return element;
}

export type RenderInlineRecordContext = {
record: StructuredTextGraphQlResponseRecord;
export type RenderInlineRecordContext<
R extends
StructuredTextGraphQlResponseRecord = StructuredTextGraphQlResponseRecord,
> = {
record: R;
};

export type RenderRecordLinkContext = {
record: StructuredTextGraphQlResponseRecord;
export type RenderRecordLinkContext<
R extends
StructuredTextGraphQlResponseRecord = StructuredTextGraphQlResponseRecord,
> = {
record: R;
children: RenderResult<H, T, F>[];
transformedMeta: TransformedMeta;
};

export type RenderBlockContext = {
record: StructuredTextGraphQlResponseRecord;
export type RenderBlockContext<
R extends
StructuredTextGraphQlResponseRecord = StructuredTextGraphQlResponseRecord,
> = {
record: R;
};

export const StructuredText = defineComponent({
Expand Down

0 comments on commit 02a1916

Please sign in to comment.