Skip to content

Commit 7331a68

Browse files
Merge pull request #51 from Nekith/master
Add TypeScript typings
2 parents f540bd2 + aa96f37 commit 7331a68

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

index.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
declare module 'react-native-default-preference' {
2+
export interface RNDefaultPreferenceKeys {
3+
[key: string]: string;
4+
}
5+
6+
export default class RNDefaultPreference {
7+
static get(key: string): Promise<string>;
8+
static set(key: string, value: string): Promise<void>;
9+
static clear(key: string): Promise<void>;
10+
static getMultiple(keys: string[]): Promise<RNDefaultPreferenceKeys>;
11+
static setMultiple(data: RNDefaultPreferenceKeys): Promise<void>;
12+
static clearMultiple(keys: string[]): Promise<void>;
13+
static getAll(): Promise<RNDefaultPreferenceKeys>;
14+
static clearAll(): Promise<void>;
15+
16+
static getName(): Promise<string>;
17+
static setName(name: string): Promise<void>;
18+
}
19+
}

0 commit comments

Comments
 (0)