mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[angular-local-storage] - Added missing parameter and function to the ILocalStorageServiceProvider
* Added missing parameter "secure" to the "setStorageCookie" function * Added missing function "setDefaultToCookie" to the "ILocalStorageServiceProvider"
This commit is contained in:
@@ -64,6 +64,7 @@ app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorage
|
||||
localStorageServiceProvider
|
||||
.setPrefix('myApp')
|
||||
.setStorageType('sessionStorage')
|
||||
.setDefaultToCookie(false)
|
||||
.setNotify(true, true);
|
||||
});
|
||||
|
||||
|
||||
+9
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for angular-local-storage v0.1.6
|
||||
// Type definitions for angular-local-storage v0.6.0
|
||||
// Project: https://github.com/grevory/angular-local-storage
|
||||
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>
|
||||
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>, Davide Donadello <https://github.com/dona278>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -27,12 +27,18 @@ declare module 'angular' {
|
||||
* @param storageType localstorage or sessionStorage. default: localStorage
|
||||
*/
|
||||
setStorageType(storageType: string): ILocalStorageServiceProvider;
|
||||
/**
|
||||
* If localStorage is not supported, the library will default to cookies instead. This behavior can be disabled
|
||||
* @param shouldDefault default: true
|
||||
*/
|
||||
setDefaultToCookie(shouldDefault: boolean): ILocalStorageServiceProvider;
|
||||
/**
|
||||
* Setter for cookie config
|
||||
* @param exp number of days before cookies expire (0 = does not expire). default: 30
|
||||
* @param path the web path the cookie represents. default: '/'
|
||||
* @param secure to store cookies as secure. default: false
|
||||
*/
|
||||
setStorageCookie(exp: number, path: string): ILocalStorageServiceProvider;
|
||||
setStorageCookie(exp: number, path: string, secure: boolean): ILocalStorageServiceProvider;
|
||||
/**
|
||||
* Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location.
|
||||
* No default value
|
||||
|
||||
Reference in New Issue
Block a user