@types/angular-localforage
TypeScript icon, indicating that this package has built-in type declarations

1.2.41 • Public • Published

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

Credits

These definitions were written by Stefan Steinhart.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/angular-localforage

Weekly Downloads

80

Version

1.2.41

License

MIT

Unpacked Size

6.99 kB

Total Files

5

Last publish

Collaborators

  • types