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

Add a TypeScript definition for Enumerable.from method #83

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

noy-shimotsuki
Copy link
Contributor

If type is 'any', code completion does not work, and typo does not cause compilation error, so it is desirable to avoid the 'any' type as much as possible.

Add 'Enumerable.from(obj: { [key: string]: T }): IEnumerable<{ key: string; value: T }>' as definition, the method will return the good type even when the parameter is a hash-like object.

@mihaifm mihaifm merged commit 3216030 into mihaifm:master Mar 8, 2021
@mihaifm
Copy link
Owner

mihaifm commented Mar 8, 2021

Thanks for these changes and for the detailed explanations.

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