Skip to content

bug: get in TrieMap should return V | undefined - #252

Merged
Yomguithereal merged 1 commit into
Yomguithereal:masterfrom
Kaosumaru:trie-map-typing
Nov 4, 2026
Merged

Yomguithereal merged 1 commit into
Yomguithereal:masterfrom
Kaosumaru:trie-map-typing

Conversation

@Kaosumaru

Copy link
Copy Markdown
Contributor

Hi! I noticed taht typing of get in TrieMap is not exactly correct.

As per documentation (and code):

#.get
Returns the value associated to the given prefix or undefined if the prefix does not exist in the trie.

This would be a somewhat minor breaking change for TS users, as compiler would warn about potential undefined.

@Yomguithereal

Copy link
Copy Markdown
Owner

Thanks @Kaosumaru, merging right now.

@Yomguithereal
Yomguithereal merged commit 406691d into Yomguithereal:master Nov 4, 2026
6 checks passed
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.

2 participants