Skip to content

Fix the TypeScript error in sortBy#3

Open
aaditmshah wants to merge 3 commits into
kevinbgreene:mainfrom
aaditmshah:fix/sort-by-typescript-error
Open

Fix the TypeScript error in sortBy#3
aaditmshah wants to merge 3 commits into
kevinbgreene:mainfrom
aaditmshah:fix/sort-by-typescript-error

Conversation

@aaditmshah

Copy link
Copy Markdown

Note: This PR should be merged after #2.

The Problem

TypeScript complains that "not all code paths return a value" in the promise executor function of the sortBy method.

Not all code paths return a value.

The Solution

The solution is to simply throw the error. If the promise executor functions throws an error then it rejects the promise.

Fixed the TypeScript error.

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.

1 participant