add typescript index file

This commit is contained in:
Valérian Cubero 2020-01-07 11:38:38 +01:00
parent f540bd21c4
commit d7770e4cf4

19
index.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
declare module 'react-native-default-preference' {
export interface RNDefaultPreferenceKeys {
[key: string]: string;
}
export default class RNDefaultPreference {
static get(key: string): Promise<string>;
static set(key: string, value: string): Promise<void>;
static clear(key: string): Promise<void>;
static getMultiple(keys: string[]): Promise<string[]>;
static setMultiple(data: RNDefaultPreferenceKeys): Promise<void>;
static clearMultiple(keys: string[]): Promise<void>;
static getAll(): Promise<string[]>;
static clearAll(): Promise<void>;
static getName(): Promise<string>;
static setName(name: string): Promise<void>;
}
}