-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
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 noPropertyAccessFromIndexSignature
TypeScript compiler option.
What is noPropertyAccessFromIndexSignature
?
This TypeScript compiler option requires you to use bracket notation (obj['property']
) instead of dot notation (obj.property
) when accessing properties that don't exist in the type definition but are allowed by an index signature.
When enabled, it prevents runtime errors by forcing explicit acknowledgment that you're accessing potentially undefined properties.
Task
Re-enable the noPropertyAccessFromIndexSignature
option in frontend/apps/app/tsconfig.json
by:
- Audit the codebase - Find all locations where dot notation is used to access index signature properties
- Fix violations - Update code to use bracket notation or improve type definitions where appropriate
- Remove the override - Remove
"noPropertyAccessFromIndexSignature": false
from the tsconfig.json compiler options - Verify - Ensure all TypeScript compilation passes with the option enabled
References
- Related PR: feat: use shared TypeScript base config for app tsconfig.json #2676
- TypeScript Handbook: Index Signatures