Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort doesn't infer in simple case #338

Open
wclr opened this issue Nov 23, 2017 · 1 comment
Open

sort doesn't infer in simple case #338

wclr opened this issue Nov 23, 2017 · 1 comment

Comments

@wclr
Copy link
Contributor

wclr commented Nov 23, 2017

  1. I believe sort should always return type of passed array:
  2. Be able to check typings in inner comparator
    type A = { x: number }    
    const list: A[] = [{ x: 1 }, {x: 2}]
    const sorted = R.sort(R.ascend(R.prop('y')), list)

image

@ikatyang
Copy link
Member

Unfortunately this is a TS limitation, see microsoft/TypeScript#16914 for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants