jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
29 lines (28 loc) • 1.02 kB
TypeScript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module storage
*/
import type { IStorage, StorageValueType } from "../../../types/index";
export type WebStorageStrategy = 'localStorage' | 'sessionStorage';
/**
* Check if user disable local storages/cookie etc.
*/
export declare const canUsePersistentStorage: (strategy?: WebStorageStrategy) => boolean;
/**
* Persistent storage in localStorage or sessionStorage
*/
export declare class LocalStorageProvider<T = StorageValueType> implements IStorage<T> {
readonly rootKey: string;
readonly strategy: WebStorageStrategy;
private get storage();
set(key: string, value: T): this;
delete(key: string): this;
get<R = T>(key: string): R | void;
exists(key: string): boolean;
constructor(rootKey: string, strategy?: WebStorageStrategy);
clear(): this;
}