Skip to content

Commit

Permalink
fix: correct types
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed Dec 17, 2024
1 parent 8217ae6 commit c73a552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/lib/isMigrationValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export const image = (value: UnknownValue): value is MigrationImage => {
/**
* Checks if a value is a migration link to media field.
*
* - @remarks `OptionalLinkProperties` is included because
* `MigrationContentRelationship` may be a link field, not strictly a content
* relationship field.
*
* @param value - Value to check.
*
* @returns `true` if `value` is a migration link to media field, `false`
Expand All @@ -95,7 +99,7 @@ export const image = (value: UnknownValue): value is MigrationImage => {
*/
export const linkToMedia = (
value: UnknownValue,
): value is MigrationLinkToMedia => {
): value is MigrationLinkToMedia & OptionalLinkProperties => {
return (
typeof value === "object" &&
value !== null &&
Expand Down
2 changes: 1 addition & 1 deletion src/types/migration/Asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export type MigrationImage =
*/
export type MigrationLinkToMedia = Pick<
LinkToMediaField<"filled">,
"link_type"
"link_type" | "text"
> & {
/**
* A reference to the migration asset used to resolve the link to media
Expand Down

0 comments on commit c73a552

Please sign in to comment.