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

[AppPreferences] store should accept string, number, boolean #1334

Closed
EbilPanda opened this issue Apr 6, 2017 · 1 comment · Fixed by #1498
Closed

[AppPreferences] store should accept string, number, boolean #1334

EbilPanda opened this issue Apr 6, 2017 · 1 comment · Fixed by #1498

Comments

@EbilPanda
Copy link

as stated in the title - AppPreference-Plugin accepts string, number, boolean as inputs, as stated here

currently it only accepts string as keys and value, so if I define an value (e.q. boolean -> toogle-type in app-settings.json) and want to change it in code, the saved type will be changed to string and the preference-screen will not work anymore because the type is not as expected

solution:

change

store(dict: string, key: string, value?: string): Promise<any>;

to

store(dict: string, key: string|number|boolean, value?: string|number|boolean): Promise<any>;

(key must be same because of overloading...)

@danielsogl
Copy link
Owner

Hey @EbilPanda,

I implemented your suggestions.

ihadeed pushed a commit that referenced this issue May 9, 2017
* refactor(AppPreferences): changed input type

fix #1334

* Update index.ts
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

Successfully merging a pull request may close this issue.

2 participants