@types/filter, @types/where, @types/chain having different definitions for callbacks than in the documentation #69609
Unanswered
szilike10
asked this question in
Issues with a @types package
Replies: 1 comment
-
Hi, we could not find a reference to the types you are talking about in this discussion. E.g.
By doing this, I can ping the folks who maintain the types you are referring to. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed when trying to execute any kind of filtering, the methods in the API have wring type definitions:
() => DataFrame | Record<string, any>
instead of{Function | Object}
like in the JavaScript documentation. This makes impossible the filtering because the passed function defined in the documentation doesn't match the required definition.Example usage in the documentation:
df.filter(row => row.get('column1') >= 3)
The errors I get:
Parameter 'row' implicitly has an 'any' type.
Type 'boolean' is not assignable to type 'DataFrame | Record<string, any>'.
As well as for the other example:
df.filter({'column2': 5, 'column1': 3}))
The error is:
Object literal may only specify known properties, and ''column2'' does not exist in type '() => DataFrame | Record<string, any>'.
Please inform me whether I am doing something wrong or the declarations in the @types are wrong.
Beta Was this translation helpful? Give feedback.
All reactions