Skip to content

Re-export KeyMap with a relative specifier so dist typings resolve - #42

Merged
holmesworcester merged 1 commit into
mainfrom
fix/keymap-dts-specifier
Sep 22, 2026
Merged

holmesworcester merged 1 commit into
mainfrom
fix/keymap-dts-specifier

Conversation

@holmesworcester

Copy link
Copy Markdown

Follow-up to #39 (merged as 62eca51).

team/selectors/keyMap.ts re-exported KeyMap via the tsconfig-baseUrl specifier 'lockbox/CheckedKeyStore.js'. tsc emits that specifier verbatim into dist/team/selectors/keyMap.d.ts, consumers cannot resolve it, and Team.allKeys(): select.KeyMap degrades to any/unknown downstream (Quiet's packages/backend got 9 tsc errors and ts-jest then refused every suite importing sigchain.service.ts).

Change (type-only, no runtime behaviour):

  • Re-export KeyMap with a relative specifier and annotate keyMap's return type so the emitted signature names the re-exported KeyMap instead of an inline import("lockbox/CheckedKeyStore.js").KeyMap.
  • Rewrite every other non-relative specifier that Reuse validated cryptographic facts during message and sigchain processing #39 introduced (13 files in auth and crdx) to relative paths. Pre-existing baseUrl specifiers elsewhere in the tree are untouched.

Verification:

  • Throwaway consumer (moduleResolution: NodeNext, skipLibCheck, no baseUrl) importing Team from the built package: against unfixed main const bad: number = team.allKeys() type-checks silently (the map was any); with this branch it fails with Type 'KeyMap' is not assignable to type 'number' and map['ROLE']['admin'][0].encryption.secretKey types as string.
  • pnpm build clean; pnpm test:run 816 passed / 87 skipped (unchanged from main).

🤖 Generated with Claude Code

#39 re-exported KeyMap from keyMap.ts via the tsconfig baseUrl specifier
'lockbox/CheckedKeyStore.js', which tsc emits verbatim into
dist/team/selectors/keyMap.d.ts. Consumers cannot resolve it, so
Team.allKeys() lost its type (any/unknown downstream). Use relative
specifiers for every import #39 added and annotate keyMap's return type
so the emitted signature names the re-exported KeyMap.

Type-only; no runtime change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@holmesworcester holmesworcester added the bug Something isn't working label Sep 22, 2026
@holmesworcester
holmesworcester merged commit 922f949 into main Sep 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant