I'm developing a mobile application using React-Native and TypeScript super-set. I am looking for a format library in which I can perform numbers, currencies, dates, numbers and localizations.
I've used the Numeral JS library before, but the format range is too narrow, and I tried the autoNumeric library, but I didn't have the possibility to use it because @types was not available.
Apart from this, I did not get the efficiency I wanted from many libraries. I'd love to hear your suggestions.
Even if @types is not available you can still use the autoNumeric library by adding your own type definition.
@types
folder inside project folderInside the file add the following line
declare module 'autonumeric';
Add the path of the newly created folder in tsconfig.json
under compilerOptions
like so
"typeRoots": ["node_modules/@types", "src/@types"]
Note: "node_modules/@types" will already be present. You only need to add the newly path of the new folder.
Save. Run npm i
and then start the application.