Skip to content

Commit

Permalink
fix: allow Content Relationship field's data property overrides whe…
Browse files Browse the repository at this point in the history
…n using `isFilled` helpers (#62)
  • Loading branch information
angeloashmore authored Nov 16, 2022
1 parent 471d2f5 commit cc75ce5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/isFilled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ export const image = imageThumbnail as <
export const link = <
TypeEnum = string,
LangEnum = string,
DataInterface extends Record<
string,
AnyRegularField | GroupField | SliceZone
> = never,
DataInterface extends
| Record<string, AnyRegularField | GroupField | SliceZone>
| unknown = unknown,
>(
field: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,
): field is LinkField<TypeEnum, LangEnum, DataInterface, "filled"> => {
Expand Down Expand Up @@ -144,10 +143,9 @@ export const linkToMedia = link as (
export const contentRelationship = link as <
TypeEnum = string,
LangEnum = string,
DataInterface extends Record<
string,
AnyRegularField | GroupField | SliceZone
> = never,
DataInterface extends
| Record<string, AnyRegularField | GroupField | SliceZone>
| unknown = unknown,
>(
field: RelationField<TypeEnum, LangEnum, DataInterface> | null | undefined,
) => field is RelationField<TypeEnum, LangEnum, DataInterface, "filled">;
Expand Down

0 comments on commit cc75ce5

Please sign in to comment.