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

globalization.numberToString needs number param #835

Closed
medi-y-sato opened this issue Nov 29, 2016 · 1 comment
Closed

globalization.numberToString needs number param #835

medi-y-sato opened this issue Nov 29, 2016 · 1 comment

Comments

@medi-y-sato
Copy link

Globalization.numberToString() is convert number to string as format, but src/plugins/globalization.ts hasn't number param.
Therefore, transpile fails.

[18:45:03] typescript: src/pages/globalization/globalization.ts, line: 95
Supplied parameters do not match any signature of call target.

  L95:      Globalization.numberToString(3.141592,{type:'decimal'}).then(
  L96:        res=>{ this.state.push({name:'numberToString', value: res.value}) },

[18:45:03] transpile failed

I think fix solution is below . Is it correct ?

https://github.com/driftyco/ionic-native/blob/master/src/plugins/globalization.ts#L102

-  static numberToString(options: { type: string }): Promise<{ value: string }> { return; }
+   static numberToString(numberToConvert: number , options: { type: string }): Promise<{ value: string }> { return; }

env:

node : v6.9.1
ionic-native : 2.2.7
cordova-plugin-globalization : 1.0.4

@ihadeed
Copy link
Collaborator

ihadeed commented Nov 29, 2016

Thanks! I just pushed a commit to fix this.

The fix will be available in the next patch release.

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

2 participants