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

Typescript issue: Selection helpers have incorrect return type #203

Closed
David-Factor opened this issue Jun 5, 2021 · 1 comment · Fixed by #206
Closed

Typescript issue: Selection helpers have incorrect return type #203

David-Factor opened this issue Jun 5, 2021 · 1 comment · Fixed by #206
Labels
bug Something isn't working

Comments

@David-Factor
Copy link

David-Factor commented Jun 5, 2021

The selection helper functions not, range, all etc don't seem to typecheck when placed inside a select verb. Here is the compile error I'm getting:

TS2345: Argument of type 'Function' is not assignable to parameter of type 'Select'.
  Type 'Function' is not assignable to type 'RenameMap'.
    Index signature is missing in type 'Function'.

76   .select(aq.not("A", "B"));
             ~~~~~~~~~~~~~~~

Perhaps the return type of the selction helpers should be SelectHelper rather than Function?

export function not(...selection: any[]): SelectHelper;

Thanks for the amazing library by the way!!

@jheer jheer added the bug Something isn't working label Jun 7, 2021
@jheer jheer closed this as completed in #206 Jun 7, 2021
@jheer jheer mentioned this issue Jun 7, 2021
@jheer
Copy link
Member

jheer commented Jun 7, 2021

Thanks for catching the error! v4.8.1 includes updated return types for the selection helpers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants