fix(identity-service): resolve @ts-ignore suppressions at Credo-ts framework boundary - #150
Conversation
816cf66 to
d541b57
Compare
Signed-off-by: cynox-66 <devj2311@gmail.com>
ef5a47d to
ac09dc3
Compare
ac09dc3 to
8c5f7d1
Compare
|
Tracked down the CI failure , the ambient declaration file was included in tsconfig.src.json but not in tsconfig.test.json, so the test typecheck couldn't resolve the module declaration during transitive imports. Added the .d.ts include to the test config and re-ran the full typecheck/lint flow locally ... |
…type-suppressions Signed-off-by: cynox-66 <devj2311@gmail.com> # Conflicts: # heka-identity-service/src/common/did-registrar/did-registrar.service.ts # heka-identity-service/src/revocation/status-list/status-list.service.ts
8c5f7d1 to
46e4978
Compare
|
Pushed a follow-up fix for the failing typecheck related to the local @digitalcredentials/bitstring declarations. The issue ended up being that the new .d.ts file wasn’t included in the test typecheck config, even though the source typecheck passed locally. I updated the tsconfig include patterns and re-ran the validation flow locally (check-types, lint, build, and unit tests). Also cleaned up the ESLint issues in the declaration file while rechecking the CI flow. Still learning some of the repo/CI edge cases here, so thanks for the patience while I worked through it carefully. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis PR improves TypeScript type safety by introducing type declarations for the ChangesTypeScript Type Definitions and Service Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Resolves the remaining
@ts-ignoresuppressions in coreheka-identity-servicefiles by replacing them with typed assertions, runtime validation, and proper ambient type declarations.This continues the type-safety cleanup started in #127 and focuses on the remaining framework/library boundary cases that required deeper fixes rather than direct
@ts-expect-errorreplacements.Changes
1. AnonCreds registry runtime validation
@ts-ignorewith a narrowed tuple assertion:as [AnonCredsRegistry, ...AnonCredsRegistry[]]2. Typed AnonCreds proof access
@ts-ignoreinproof.service.tsAnonCredsProofnarrowing forrequested_proof.revealed_attrsaccess3. Dead field cleanup
tenantIdfield and corresponding suppression indid-registrar.service.tsinitTenant()execution intact4. Ambient declarations for
@digitalcredentials/bitstring.d.tsdeclarations for the untyped dependency@ts-ignoreand ESLint suppression boilerplateNotes
The AnonCreds registry validation now fails fast when no AnonCreds-capable DID method is configured (for example
DID_METHODS=key).Previously this configuration would silently create a broken agent and fail later during credential operations. The new behavior surfaces the configuration issue immediately at startup with a clear error message.
Result
@ts-ignoresuppressions inheka-identity-serviceSummary by CodeRabbit