Types#7
Merged
Merged
Conversation
ivan-tymoshenko
approved these changes
May 28, 2026
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.
Adds TypeScript type declarations to
@platformatic/leader. The package is JS-only, and consumers on TypeScript 6 hitTS7016: Could not find a declaration file for module '@platformatic/leader'(TS 6 tightened the implicit-anyfallback that TS 5 used to allow). This was surfaced by the typescript-v6 bump in platformatic/platformatic-world#41; shipping types here unblocks it.Changes:
index.d.ts—export = createLeaderElector+declare namespacewithPool,Logger,NotificationChannel,LeaderElectorOptions,LeaderElector.Poolis a minimal structural type so the package's.d.tsdoesn't pull in@types/pgorpinoas peer-type requirements.package.json—"types": "index.d.ts", newtest:typesscript (tsc -p tsconfig.json),typescriptdevDep.tsconfig.json— strict,noEmit, nodenext, scoped toindex.d.ts+ the smoke.test/types.test-d.ts— usage smoke (default-import, minimal + full options, returned methods)..test-d.tssuffix keeps it out ofnode --test test/*.test.js..github/workflows/ci.yml— explicitType checkstep in thelintjob (npm run test:types); added Node 26 to the test matrix.Verified locally:
npm run test:typespasses under both TypeScript 5.9 and 6.0;npm teston Node 22/24/26; running the workflow build inplatformatic-worldagainst TS 6 with the new types no longer errors.