3.2.7 • Published 6 months ago
@types/vue-ls v3.2.7
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
// Type definitions for vue-ls 3.2
// Project: https://github.com/RobinCK/vue-ls#readme
// Definitions by: Prateek Malhotra <https://github.com/someone1>
// Oleg Spakov <https://github.com/lexasss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.6
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: Fri, 02 Jul 2021 18:05:10 GMT
- Dependencies: @types/vue
- Global values: none
Credits
These definitions were written by Prateek Malhotra, and Oleg Spakov.