Skip to content

chore: migrate to TypeScript strict in Payload package - #4/4 #12733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 9, 2025

Conversation

GermanJablo
Copy link
Contributor

Important: An intentional effort is being made during migration to not modify runtime behavior. This implies that there will be several assertions, non-null assertions, and @ts-expect-error. This philosophy applies only to migrating old code to TypeScript strict, not to writing new code. For a more detailed justification for this reasoning, see #11840 (comment).

In this PR, instead of following the approach of migrating a subset of files, I'm migrating all files by disabling specific rules. The first commits are named after the rule being disabled.

With this PR, the migration of the payload package is complete 🚀

AlessioGr
AlessioGr previously approved these changes Jun 9, 2025
Copy link
Member

@denolfe denolfe left a comment

Choose a reason for hiding this comment

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

Looking really good! Just one comment.

@GermanJablo GermanJablo enabled auto-merge (squash) June 9, 2025 20:46
@GermanJablo GermanJablo merged commit 53f8838 into main Jun 9, 2025
77 checks passed
@GermanJablo GermanJablo deleted the ts-strict-4 branch June 9, 2025 20:50
elliott-w pushed a commit to elliott-w/payload that referenced this pull request Jun 12, 2025
…4 (payloadcms#12733)

Important: An intentional effort is being made during migration to not
modify runtime behavior. This implies that there will be several
assertions, non-null assertions, and @ts-expect-error. This philosophy
applies only to migrating old code to TypeScript strict, not to writing
new code. For a more detailed justification for this reasoning, see
payloadcms#11840 (comment).

In this PR, instead of following the approach of migrating a subset of
files, I'm migrating all files by disabling specific rules. The first
commits are named after the rule being disabled.

With this PR, the migration of the payload package is complete 🚀
Copy link
Contributor

🚀 This is included in version v3.43.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.

3 participants