-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nativestorage): add NativeStorage plugin wrapper
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {Plugin, Cordova} from './plugin'; | ||
/** | ||
* @name Native Storage | ||
*/ | ||
@Plugin({ | ||
plugin: 'cordova-plugin-nativestorage', | ||
pluginRef: 'NativeStorage', | ||
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage' | ||
}) | ||
export class NativeStorage { | ||
/** | ||
* Stores a value | ||
* @param reference | ||
* @param value | ||
*/ | ||
@Cordova() | ||
static setItem(reference: string, value: any): Promise<any> {return; } | ||
|
||
/** | ||
* Gets a stored item | ||
* @param reference | ||
*/ | ||
@Cordova() | ||
static getItem(reference: string): Promise<any> {return; } | ||
|
||
/** | ||
* Removes a single stored item | ||
* @param reference | ||
*/ | ||
@Cordova() | ||
static remove(reference: string): Promise<any> {return; } | ||
|
||
/** | ||
* Removes all stored values. | ||
*/ | ||
@Cordova() | ||
static clear(): Promise<any> {return; } | ||
} |