What
Enable strictNullChecks, noImplicitAny, strictBindCallApply, forceConsistentCasingInFileNames, and noFallthroughCasesInSwitch in backend/tsconfig.json. Fix all resulting type errors across the backend codebase.
Why
The backend currently runs with nearly all strict TypeScript checks disabled (strictNullChecks: false, noImplicitAny: false). For a platform handling encrypted health credentials and vaccination records, implicit any types and unchecked nulls are a liability — they hide bugs that could lead to data corruption, unauthorized access, or silent failures in credential verification flows.
The frontend already has "strict": true. The backend should match.
Scope
In scope:
- Set all strict-family flags to
true in backend/tsconfig.json
- Fix every resulting compilation error (expect ~50-150 fixes across 19 modules)
- Replace
@ts-ignore in app.module.ts:62 with proper typing for the Redis cache store
- Ensure
npm run build passes with zero errors after changes
Out of scope:
- Refactoring module architecture
- Adding new features
- Changing runtime behavior
Acceptance Criteria
Technical Context
- Config file:
backend/tsconfig.json
- The
@ts-ignore at backend/src/app.module.ts:62 is for a Redis cache store type — use @nestjs/cache-manager types or a proper type assertion
- NestJS 10 supports strict mode well; most fixes will be null checks and explicit type annotations
- Run
npx tsc --noEmit to see all errors before fixing
What
Enable
strictNullChecks,noImplicitAny,strictBindCallApply,forceConsistentCasingInFileNames, andnoFallthroughCasesInSwitchinbackend/tsconfig.json. Fix all resulting type errors across the backend codebase.Why
The backend currently runs with nearly all strict TypeScript checks disabled (
strictNullChecks: false,noImplicitAny: false). For a platform handling encrypted health credentials and vaccination records, implicitanytypes and unchecked nulls are a liability — they hide bugs that could lead to data corruption, unauthorized access, or silent failures in credential verification flows.The frontend already has
"strict": true. The backend should match.Scope
In scope:
trueinbackend/tsconfig.json@ts-ignoreinapp.module.ts:62with proper typing for the Redis cache storenpm run buildpasses with zero errors after changesOut of scope:
Acceptance Criteria
backend/tsconfig.jsonhas"strict": true(or all individual strict flags enabled)npm run buildinbackend/completes with zero TypeScript errorsnpm run testinbackend/passes all existing tests@ts-ignoreor@ts-nocheckcomments remainTechnical Context
backend/tsconfig.json@ts-ignoreatbackend/src/app.module.ts:62is for a Redis cache store type — use@nestjs/cache-managertypes or a proper type assertionnpx tsc --noEmitto see all errors before fixing