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

dropWhile function skips the error when the functor is a string #88

Open
singla-shivam opened this issue Jul 13, 2022 · 0 comments
Open
Labels
types Refine/fix types

Comments

@singla-shivam
Copy link
Member

Which function does need to have its types refine/fix?

dropWhile

What is the problem you faced with current types?

When the functor is a string (not an array of strings), the predicate is not forced to take the string as the parameter.

import * as Fae from "[email protected]"

function f(a: number) {
    return a > 10
}

Fae.dropWhile(f, 'df')
Fae.dropLastWhile(f, 'df')

Playground

Expected behavior

It should have result in an error.

Additional context

The same problem was for dropLastWhile but it has been fixed #84. Change

Versions (please complete the following information):

  • Fae: v1.1.1
@singla-shivam singla-shivam added the types Refine/fix types label Jul 13, 2022
@singla-shivam singla-shivam changed the title dropWhile functions dropWhile function skips the error when the functor is a string Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Refine/fix types
Projects
None yet
Development

No branches or pull requests

1 participant