Skip to content

Convert internal functional-red-black-tree fork to TypeScript#23

Merged
mweidner037 merged 5 commits into
masterfrom
frbt-internal-types
Jun 21, 2026
Merged

Convert internal functional-red-black-tree fork to TypeScript#23
mweidner037 merged 5 commits into
masterfrom
frbt-internal-types

Conversation

@mweidner037

Copy link
Copy Markdown
Owner

Fixes #22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Converts the vendored functional-red-black-tree implementation from a JS + hand-written .d.ts pair into a single TypeScript source, and updates internal persistent-map utilities to consume the new named exports—resolving downstream TS import/type errors reported in Issue #22.

Changes:

  • Replace src/vendor/functional-red-black-tree.js + .d.ts with a TypeScript implementation exporting RedBlackTree (and related types).
  • Update SeqMap and LeafMap to use RedBlackTree.new(...) instead of a default-export factory + Tree type.
  • Add a dedicated vendored red-black-tree test suite to validate persistence and invariants.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/vendor/functional-red-black-tree.test.ts Adds invariant + behavioral tests for the vendored red-black-tree subset API.
src/vendor/functional-red-black-tree.ts New TypeScript implementation of the vendored functional red-black tree (named exports).
src/vendor/functional-red-black-tree.js Removes the prior JS implementation in favor of the TS version.
src/vendor/functional-red-black-tree.d.ts Removes the prior hand-maintained type declarations (now emitted from TS).
src/internal/seq_map.ts Switches from default import + Tree type to RedBlackTree named export.
src/internal/leaf_map.ts Switches from default import + Tree type to RedBlackTree named export.
src/id_list.ts Minor import reordering + adds @private doc annotations for internal/test-only exports.
.prettierrc Adds an explicit Prettier config file (empty config).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mweidner037 mweidner037 merged commit db1decd into master Jun 21, 2026
2 checks passed
@mweidner037 mweidner037 deleted the frbt-internal-types branch June 21, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update functional-red-black-tree import for consumers

2 participants