apollographql / apollographql/federation
chore: Enable `useUnknownInCatchVariables`
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
TS 4.4 introduced a new default - https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables
To leave this on means we would need to explicitly add `any` to all of our error variables in our `catch` clauses since it makes them `unknown`. We should move to this default eventually, but for now I'm disabling the option in the tsconfig to maintain things as-is until we choose to explicitly address this (and not block dependency updates in the meantime).
Contributor guide
Research direction
Start with the repository's tsconfig and the TypeScript 4.4 documentation for useUnknownInCatchVariables. Locate catch clauses that depend on implicit error types and determine the required updates. Done means the option can be enabled without breaking the TypeScript checks while preserving intended error handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100