Skip to content

Conversation

@slavanossar
Copy link
Contributor

What?

In field hooks, previousSiblingDoc is typed as TData.

Why?

This value should actually be typed as TSiblingData, I've confirmed the sibling data is actually what is returned when a field hook runs.

How?

Updated FieldHook typing, as well as RichText field hook typings

Fixes #9735

Copy link
Member

@AlessioGr AlessioGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@AlessioGr AlessioGr enabled auto-merge (squash) November 6, 2025 20:53
@AlessioGr AlessioGr merged commit 339a0c3 into payloadcms:main Nov 6, 2025
183 of 185 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

🚀 This is included in version v3.63.0

zubricks pushed a commit that referenced this pull request Nov 10, 2025
### What?
In field hooks, `previousSiblingDoc` is typed as `TData`.

### Why?
This value should actually be typed as `TSiblingData`, I've confirmed
the sibling data is actually what is returned when a field hook runs.

### How?
Updated `FieldHook` typing, as well as `RichText` field hook typings

Fixes #9735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type Definition: previousSiblingDoc in FieldHookArgs should use TSiblingData generic and be renamed to previousSiblingData

2 participants