Overview
tsconfig.json enables strict: true but not noUncheckedIndexedAccess or exactOptionalPropertyTypes. The codebase has patterns that both would catch: RATE_LIMIT_DELAYS[delayIndex] || RATE_LIMIT_DELAYS[RATE_LIMIT_DELAYS.length - 1] in axios.config.ts guards an index access with ||, which noUncheckedIndexedAccess would surface properly; and there are 25 TS18046 (is of type unknown) plus 55 as any casts in src/ indicating the current strictness is already being worked around. This should follow the 520-error cleanup rather than precede it.
Specifications
Features:
noUncheckedIndexedAccess enabled after the existing error backlog is cleared
exactOptionalPropertyTypes evaluated and enabled if the churn is acceptable
- The 55
as any casts reduced
Tasks:
- Complete the existing type-error cleanup first
- Enable each flag in isolation and measure the new error count
- Fix or explicitly suppress the resulting errors
- Track
as any usage with a lint rule and a decreasing budget
Impacted Files:
Acceptance Criteria
- Both flags are enabled with a clean type check
as any usage is measured and decreasing
- Index accesses are narrowed rather than guarded with
||
Overview
tsconfig.jsonenablesstrict: truebut notnoUncheckedIndexedAccessorexactOptionalPropertyTypes. The codebase has patterns that both would catch:RATE_LIMIT_DELAYS[delayIndex] || RATE_LIMIT_DELAYS[RATE_LIMIT_DELAYS.length - 1]inaxios.config.tsguards an index access with||, whichnoUncheckedIndexedAccesswould surface properly; and there are 25TS18046(is of type unknown) plus 55as anycasts insrc/indicating the current strictness is already being worked around. This should follow the 520-error cleanup rather than precede it.Specifications
Features:
noUncheckedIndexedAccessenabled after the existing error backlog is clearedexactOptionalPropertyTypesevaluated and enabled if the churn is acceptableas anycasts reducedTasks:
as anyusage with a lint rule and a decreasing budgetImpacted Files:
tsconfig.jsonsrc/Acceptance Criteria
as anyusage is measured and decreasing||