Skip to content

Conversation

@PatrikKozak
Copy link
Contributor

What?

Adds the missing latest?: boolean property to the TypeWithVersion<T> type definition.

Why?

The latest property is set by database adapters when creating and updating versions (both collection and global versions), and is included in the version field schema when drafts are enabled. However, it was missing from the TypeScript type definition, causing type errors when consumers try to access this property on version documents.

How?

Added latest?: boolean as an optional property to the TypeWithVersion<T> type. The property is optional because it's only present when drafts are enabled in the version configuration.

Fixes #14624

@github-actions
Copy link
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@PatrikKozak PatrikKozak merged commit 9b6e1a3 into main Nov 19, 2025
98 checks passed
@PatrikKozak PatrikKozak deleted the fix/typeWithVersion-add-latest-property branch November 19, 2025 17:13
@github-actions
Copy link
Contributor

🚀 This is included in version v3.65.0

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.

TypeWithVersion missing .latest property

3 participants