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

'Placeholder' is not assignable to parameter of type 'string | ((match: string, ...args: readonly any[]) => string)' in replace #109

Closed
shamshiyevulugbek opened this issue Mar 9, 2024 · 3 comments · Fixed by #110

Comments

@shamshiyevulugbek
Copy link

const greet = R.replace('{name}', R.__, 'Hello, {name}!');
greet('Alice'); //=> 'Hello, Alice!'

This is example in docs

@jlissner
Copy link

I think this is a typescript issue

@kedashoe kedashoe transferred this issue from ramda/ramda Mar 12, 2024
@Harris-Miller
Copy link
Collaborator

Harris-Miller commented Mar 12, 2024

It's a typescript issue. Not all functions are correctly typed to support currying and placeholders. It's been like that since we migrated the community-defined and supported types from @types/ramda over to here

R.replace is one example where it's typed for general currying, but not for use with the placeholder, and that needs to get fixed

@shamshiyevulugbek I'll try and get this looked at later this week

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 a pull request may close this issue.

4 participants