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

Fix TypeScript definitions for concat and merge method #85

Merged
merged 2 commits into from
Mar 8, 2021

Conversation

noy-shimotsuki
Copy link
Contributor

Variadic arguments are represented as an array of arguments, so if the argument types are arrays, they must be defined as an array of arrays.

This wrong definition allows to pass objects that are not arrays as arguments. It won't cause a run-time error, but the return value won't match the defined type.

In addition, if the definition is divided for each type, it is not possible to mix arrays and IEnumerable types as arguments.
Therefore, it should be defined as a union type.

@noy-shimotsuki noy-shimotsuki changed the title Fix concat typedef Fix TypeScript definitions for concat and merge method Mar 5, 2021
@mihaifm mihaifm merged commit 35976cd into mihaifm:master Mar 8, 2021
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.

2 participants