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
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 typeNumeral
is declared asclass
rather thaninterface
, any help for a workaround or a fix would be much appreciated