You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to use this wonderful library with typescript but when imported it does not compile and gives me this error TS1192: Module '"path/project/node_modules/numbro/numbro"' has no default export.
After changing the last line of the file numbro.d.ts from export = numbro into export default it compiles successfully.
After a litle bit of investigation i found that if we/you want to use es6 syntax you should explicit export default or use require('module') if you have export = module witch is our case and this breaks es6 style syntax
See microsoft/TypeScript#2242 (comment)
The text was updated successfully, but these errors were encountered:
@BenjaminVanRyseghem isn't this fixed with #363? I didn't tested it coz at the time I had to find some alternatives since I was running on a tight schedule.
Hello, I'm trying to use this wonderful library with typescript but when imported it does not compile and gives me this error
TS1192: Module '"path/project/node_modules/numbro/numbro"' has no default export.
After changing the last line of the file
numbro.d.ts
fromexport = numbro
intoexport default
it compiles successfully.After a litle bit of investigation i found that if we/you want to use es6 syntax you should explicit
export default
or userequire('module')
if you haveexport = module
witch is our case and this breaks es6 style syntaxSee microsoft/TypeScript#2242 (comment)
The text was updated successfully, but these errors were encountered: