Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Create Map comparison utilities and convert Hooks to Typescript - #5086

Merged
t3chguy merged 5 commits into
developfrom
t3chguy/notifications12
Aug 5, 2020
Merged

Create Map comparison utilities and convert Hooks to Typescript#5086
t3chguy merged 5 commits into
developfrom
t3chguy/notifications12

Conversation

@t3chguy

@t3chguy t3chguy commented Aug 4, 2020

Copy link
Copy Markdown
Member

Subset of #4745

@t3chguy
t3chguy requested a review from a team August 4, 2020 21:01

@JorikSchellekens JorikSchellekens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a question about the unused functions here

if (doUpdate) {
// We have to break our reference to the room list store if we want to be able to
// diff the object for changes, so do that.
// @ts-ignore - ITagMap is ts-ignored so this will have to be too

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not looking to change it but :'(

Comment thread src/utils/maps.ts
* @param b The second Map. Must be defined.
* @returns The difference between the keys of each Map.
*/
export function mapDiff<K, V>(a: Map<K, V>, b: Map<K, V>): { changed: K[], added: K[], removed: K[] } {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It doesn't look like anything is using these?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct you are, #4745 does and just plucked out the reusable stuff to shrink the diff of that mammoth

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Damn, that is hefty

@JorikSchellekens JorikSchellekens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LG

@t3chguy
t3chguy merged commit 0da31de into develop Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants