liam icon indicating copy to clipboard operation
liam copied to clipboard

Re-enable `exactOptionalPropertyTypes` TypeScript strict option in app

Open claude[bot] opened this issue 5 months ago • 4 comments

Background

In PR #2676, we updated frontend/apps/app/tsconfig.json to use a shared base configuration. To avoid extensive codebase changes during the migration, we temporarily disabled the exactOptionalPropertyTypes TypeScript compiler option.

What is exactOptionalPropertyTypes?

This TypeScript compiler option makes optional properties more strict by distinguishing between properties that are explicitly set to undefined and properties that are missing entirely.

With this option enabled:

  • { property?: string } means the property can be missing or a string, but NOT explicitly undefined
  • To allow explicit undefined, you'd need { property?: string | undefined }

This helps catch bugs where you might accidentally pass undefined values where they shouldn't be allowed.

Task

Re-enable the exactOptionalPropertyTypes option in frontend/apps/app/tsconfig.json by:

  1. Audit the codebase - Find all locations where optional properties are set to undefined explicitly
  2. Fix violations - Either:
    • Update type definitions to include | undefined where appropriate
    • Change code to not pass undefined explicitly
    • Use proper optional property patterns
  3. Remove the override - Remove "exactOptionalPropertyTypes": false from the tsconfig.json compiler options
  4. Verify - Ensure all TypeScript compilation passes with the option enabled

References

claude[bot] avatar Jul 24 '25 07:07 claude[bot]

Assign to me please @claude

Varnika060306 avatar Jul 26 '25 18:07 Varnika060306

@Varnika060306 Didn't notice, sorry for the delay! I'd really appreciate it! 🚀🚀

MH4GF avatar Jul 31 '25 09:07 MH4GF

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 29 '25 13:09 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 29 '25 13:11 github-actions[bot]