Re-enable `exactOptionalPropertyTypes` TypeScript strict option in app
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 explicitlyundefined - 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:
-
Audit the codebase - Find all locations where optional properties are set to
undefinedexplicitly -
Fix violations - Either:
- Update type definitions to include
| undefinedwhere appropriate - Change code to not pass
undefinedexplicitly - Use proper optional property patterns
- Update type definitions to include
-
Remove the override - Remove
"exactOptionalPropertyTypes": falsefrom the tsconfig.json compiler options - Verify - Ensure all TypeScript compilation passes with the option enabled
References
- Related PR: #2676
- TypeScript Release Notes: exactOptionalPropertyTypes
Assign to me please @claude
@Varnika060306 Didn't notice, sorry for the delay! I'd really appreciate it! 🚀🚀
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.
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.