Repository navigation
Re-export KeyMap with a relative specifier so dist typings resolve - #42
Merged
Merged
Conversation
#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #39 (merged as 62eca51).
team/selectors/keyMap.tsre-exportedKeyMapvia the tsconfig-baseUrl specifier'lockbox/CheckedKeyStore.js'. tsc emits that specifier verbatim intodist/team/selectors/keyMap.d.ts, consumers cannot resolve it, andTeam.allKeys(): select.KeyMapdegrades toany/unknowndownstream (Quiet'spackages/backendgot 9 tsc errors and ts-jest then refused every suite importingsigchain.service.ts).Change (type-only, no runtime behaviour):
KeyMapwith a relative specifier and annotatekeyMap's return type so the emitted signature names the re-exportedKeyMapinstead of an inlineimport("lockbox/CheckedKeyStore.js").KeyMap.authandcrdx) to relative paths. Pre-existing baseUrl specifiers elsewhere in the tree are untouched.Verification:
moduleResolution: NodeNext,skipLibCheck, no baseUrl) importingTeamfrom the built package: against unfixed mainconst bad: number = team.allKeys()type-checks silently (the map wasany); with this branch it fails withType 'KeyMap' is not assignable to type 'number'andmap['ROLE']['admin'][0].encryption.secretKeytypes asstring.pnpm buildclean;pnpm test:run816 passed / 87 skipped (unchanged from main).🤖 Generated with Claude Code