Problem
tsconfig.json does not set strict: true (nor any of its constituent flags). Effects:
- 90 explicit
any usages across 8 files.
- No null-safety guarantees.
noImplicitAny, strictNullChecks, noUncheckedIndexedAccess all off.
Why it matters
A type-system-heavy library that doesn't use its type system is shipping weaker guarantees than its users assume from the .d.ts files. Every any is a type-safety hole, and the biggest offenders (wsdl/index.ts: 23, wsdl/elements.ts: 21, client.ts: 17) are exactly the modules handling untrusted input.
Proposed approach
Enable flags incrementally, one PR each, to keep reviews manageable:
noImplicitAny — forces every any to be explicit.
strictNullChecks — likely the biggest PR; exposes all the missing | null and | undefined.
strictFunctionTypes + alwaysStrict — usually small.
noUncheckedIndexedAccess — may require careful review of array indexing.
- Flip to
strict: true and delete the individual flags.
Between each step, run npm run build && npm test. Don't add @ts-expect-error or // @ts-ignore — prefer real type fixes.
Acceptance criteria
tsconfig.json has strict: true (or equivalent set of flags).
any count visibly reduced (target: <30).
- No new
@ts-ignore / @ts-expect-error suppressions added.
- Build and tests pass.
Problem
tsconfig.jsondoes not setstrict: true(nor any of its constituent flags). Effects:anyusages across 8 files.noImplicitAny,strictNullChecks,noUncheckedIndexedAccessall off.Why it matters
A type-system-heavy library that doesn't use its type system is shipping weaker guarantees than its users assume from the
.d.tsfiles. Everyanyis a type-safety hole, and the biggest offenders (wsdl/index.ts: 23,wsdl/elements.ts: 21,client.ts: 17) are exactly the modules handling untrusted input.Proposed approach
Enable flags incrementally, one PR each, to keep reviews manageable:
noImplicitAny— forces everyanyto be explicit.strictNullChecks— likely the biggest PR; exposes all the missing| nulland| undefined.strictFunctionTypes+alwaysStrict— usually small.noUncheckedIndexedAccess— may require careful review of array indexing.strict: trueand delete the individual flags.Between each step, run
npm run build && npm test. Don't add@ts-expect-erroror// @ts-ignore— prefer real type fixes.Acceptance criteria
tsconfig.jsonhasstrict: true(or equivalent set of flags).anycount visibly reduced (target: <30).@ts-ignore/@ts-expect-errorsuppressions added.