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

referencing methods dynamically results in Type 'Numeral' has no call signatures #794

Open
Mottoweb opened this issue Sep 4, 2024 · 0 comments

Comments

@Mottoweb
Copy link

Mottoweb commented Sep 4, 2024

I am trying to access methods of numeral dynamically in typescript like so:

numeral(currentPrice)[method as keyof Numeral](priceDiff).format('0.00000')

which results in Type 'Numeral' has no call signatures type error, as far as i understand its because type Numeral is declared as class rather than interface, any help for a workaround or a fix would be much appreciated

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

No branches or pull requests

1 participant