11/**
22 * Allows you to save and restore any kind of information related to your application.
33 */
4- declare module "application-settings" {
5- /**
6- * Checks whether such a key exists.
7- * @param key The key to check for.
8- */
9- export function hasKey ( key : string ) : boolean ;
10-
11- /**
12- * Gets a value (if existing) for a key as a Boolean Object. A default value can be provided in case there is no existing value.
13- * @param key The key to check for.
14- * @param defaultValue An optional value to be returned in case there is no existing value.
15- */
16- export function getBoolean ( key : string , defaultValue ?: boolean ) : boolean ;
17-
18- /**
19- * Gets a value (if existing) for a key as a String Object. A default value can be provided in case there is no existing value.
20- * @param key The key to check for.
21- * @param defaultValue An optional value to be returned in case there is no existing value.
22- */
23- export function getString ( key : string , defaultValue ?: string ) : string ;
24-
25- /**
26- * Gets a value (if existing) for a key as a Number Object. A default value can be provided in case there is no existing value.
27- * @param key The key to check for.
28- * @param defaultValue An optional value to be returned in case there is no existing value.
29- */
30- export function getNumber ( key : string , defaultValue ?: number ) : number ;
31-
32- /**
33- * Sets a Boolean Object for a key.
34- * @param key The key.
35- * @param value The value.
36- */
37- export function setBoolean ( key : string , value : boolean ) : void ;
38-
39- /**
40- * Sets a String Object for a key.
41- * @param key The key.
42- * @param value The value.
43- */
44- export function setString ( key : string , value : string ) : void ;
45-
46- /**
47- * Sets a Number Object for a key.
48- * @param key The key.
49- * @param value The value.
50- */
51- export function setNumber ( key : string , value : number ) : void ;
52-
53- /**
54- * Removes a value (if existing) for a key.
55- * @param key The key to check for.
56- */
57- export function remove ( key : string ) : void ;
58-
59- /**
60- * Removes all values.
61- */
62- export function clear ( ) : void ;
63- }
4+ /**
5+ * Checks whether such a key exists.
6+ * @param key The key to check for.
7+ */
8+ export function hasKey ( key : string ) : boolean ;
9+
10+ /**
11+ * Gets a value (if existing) for a key as a Boolean Object. A default value can be provided in case there is no existing value.
12+ * @param key The key to check for.
13+ * @param defaultValue An optional value to be returned in case there is no existing value.
14+ */
15+ export function getBoolean ( key : string , defaultValue ?: boolean ) : boolean ;
16+
17+ /**
18+ * Gets a value (if existing) for a key as a String Object. A default value can be provided in case there is no existing value.
19+ * @param key The key to check for.
20+ * @param defaultValue An optional value to be returned in case there is no existing value.
21+ */
22+ export function getString ( key : string , defaultValue ?: string ) : string ;
23+
24+ /**
25+ * Gets a value (if existing) for a key as a Number Object. A default value can be provided in case there is no existing value.
26+ * @param key The key to check for.
27+ * @param defaultValue An optional value to be returned in case there is no existing value.
28+ */
29+ export function getNumber ( key : string , defaultValue ?: number ) : number ;
30+
31+ /**
32+ * Sets a Boolean Object for a key.
33+ * @param key The key.
34+ * @param value The value.
35+ */
36+ export function setBoolean ( key : string , value : boolean ) : void ;
37+
38+ /**
39+ * Sets a String Object for a key.
40+ * @param key The key.
41+ * @param value The value.
42+ */
43+ export function setString ( key : string , value : string ) : void ;
44+
45+ /**
46+ * Sets a Number Object for a key.
47+ * @param key The key.
48+ * @param value The value.
49+ */
50+ export function setNumber ( key : string , value : number ) : void ;
51+
52+ /**
53+ * Removes a value (if existing) for a key.
54+ * @param key The key to check for.
55+ */
56+ export function remove ( key : string ) : void ;
57+
58+ /**
59+ * Removes all values.
60+ */
61+ export function clear ( ) : void ;
0 commit comments