Skip to content

Remove unused overloads of 'deduplicate' and 'deduplicateSorted'#26589

Merged
RyanCavanaugh merged 2 commits intomasterfrom
deduplicate_overloads
Sep 6, 2018
Merged

Remove unused overloads of 'deduplicate' and 'deduplicateSorted'#26589
RyanCavanaugh merged 2 commits intomasterfrom
deduplicate_overloads

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 21, 2018

We never pass undefined inputs into either of these functions.

@ghost ghost requested a review from rbuckton August 22, 2018 17:06
Comment thread src/compiler/core.ts Outdated
return array.length === 0 ? [] :
array.length === 1 ? array.slice() :
comparer ? deduplicateRelational(array, equalityComparer, comparer) :
comparer ? deduplicateRelational(array, equalityComparer!, comparer) :
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.

Do we pass undefined for equalityComparer to deduplicate anywhere? It seems like something we should verify since we're changing the signatures.

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 appears that deduplicateRelational will throw if equalityComparer is undefined: https://github.com/Microsoft/TypeScript/pull/26589/files#diff-66cec844e251a1918deb897eabca206bR767

@RyanCavanaugh RyanCavanaugh merged commit cfc6d35 into master Sep 6, 2018
@ghost ghost deleted the deduplicate_overloads branch September 6, 2018 00:46
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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