@persistent

Allow save value inside persistent storage as set/get to property

import { component, persistent } from './src/core/decorators';

@component
class Item extends UIElement {
  @persistent
  options = {
    some: true
  };
}

const item = new Item(jodit);
console.log(item.options); // {some: true}

item.options = {
  some: false
};

const item2 = new Item(jodit); // or reload page
console.log(item.options); // {some: false}

persistent

persistent<T>(target, propertyKey): void

Type parameters

Name Type
T extends IComponent<IViewBased<IViewOptions>>

Parameters

Name Type
target T
propertyKey string

Returns

void

Defined in

jodit/src/core/decorators/persistent/persistent.ts:17