Installation
npm install --save @types/angular-localforage
Summary
This package contains type definitions for angular-localforage (https://github.com/ocombe/angular-localForage).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-localforage.
index.d.ts
/// <reference types="localforage" />
/// <reference types="angular" />
import * as angular from "angular";
declare module "angular" {
export namespace localForage {
interface LocalForageConfig {
driver?: string | undefined;
name?: string | number | undefined;
version?: number | undefined;
storeName?: string | undefined;
description?: string | undefined;
}
interface ILocalForageProvider {
config(config: LocalForageConfig): void;
setNotify(onItemSet: boolean, onItemRemove: boolean): void;
}
interface ILocalForageService {
driver(): LocalForageDriver;
setDriver(name: string | string[]): angular.IPromise<void>;
setItem(key: string, value: any): angular.IPromise<void>;
setItem(keys: string[], values: any[]): angular.IPromise<void>;
getItem(key: string): angular.IPromise<any>;
getItem(keys: string[]): angular.IPromise<any[]>;
removeItem(key: string | string[]): angular.IPromise<void>;
pull(key: string): angular.IPromise<any>;
pull(keys: string[]): angular.IPromise<any[]>;
clear(): angular.IPromise<void>;
key(n: number): angular.IPromise<string>;
keys(): angular.IPromise<string>;
length(): angular.IPromise<number>;
iterate<T>(iteratorCallback: (value: string | number, key: string) => T): angular.IPromise<T>;
bind($scope: angular.IScope, key: string): angular.IPromise<any>;
bind($scope: angular.IScope, config: {
key: string;
defaultValue?: any;
scopeKey?: string | undefined;
name?: string | undefined;
}): angular.IPromise<any>;
unbind($scope: angular.IScope, key: string, scopeKey?: string): void;
createInstance(config: LocalForageConfig): ILocalForageService;
instance(name: string): ILocalForageService;
}
}
}
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:23 GMT
- Dependencies: @types/angular, localforage
Credits
These definitions were written by Stefan Steinhart.