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

3.2.7 • Public • Published

Installation

npm install --save @types/vue-ls

Summary

This package contains type definitions for vue-ls (https://github.com/RobinCK/vue-ls#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vue-ls.

index.d.ts

import _Vue, { PluginObject } from "vue";

declare module "vue/types/vue" {
    interface Vue {
        $ls: WebStorage;
    }

    interface VueConstructor {
        ls: WebStorage;
    }
}

export enum Types {
    Session = "session",
    Local = "local",
    Memory = "memory",
}

export interface Options {
    namespace?: string | undefined;
    name?: string | undefined;
    storage?: Types | undefined;
}

export class WebStorage {
    length: number;

    constructor(storage: Types);
    get(name: string, def?: any): any;
    set(name: string, value: any, expire?: number): void;
    key(index: number): string | null;
    remove(name: string): void;
    clear(): void;
    on(name: string, callback: () => void): void;
    off(name: string, callback: () => void): void;
    setOptions(options?: Options): void;
}

declare const VueStorage: PluginObject<Options>;

// forced to use deault export, the reason is discussed on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38653#discussion_r331455390
export default VueStorage;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: vue

Credits

These definitions were written by Prateek Malhotra, and Oleg Spakov.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.2.7388ts5.7
3.2.7388ts5.6
3.2.7388latest
3.2.7388ts4.5
3.2.7388ts4.6
3.2.7388ts4.7
3.2.7388ts4.8
3.2.7388ts4.9
3.2.7388ts5.0
3.2.7388ts5.1
3.2.7388ts5.2
3.2.7388ts5.3
3.2.7388ts5.4
3.2.7388ts5.5
3.2.7388ts5.8
3.2.3221ts3.6
3.2.3221ts3.7
3.2.3221ts3.8
3.2.3221ts3.9
3.2.3221ts4.0
3.2.3221ts4.1
3.2.3221ts4.2
3.2.3221ts4.3
3.2.3221ts4.4

Version History

VersionDownloads (Last 7 Days)Published
3.2.7388
3.2.61
3.2.50
3.2.40
3.2.3221
3.2.211
3.2.134
3.2.00

Package Sidebar

Install

npm i @types/vue-ls

Weekly Downloads

513

Version

3.2.7

License

MIT

Unpacked Size

4.87 kB

Total Files

5

Last publish

Collaborators

  • types