• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15/**
16 * @file
17 * @kit ArkUI
18 * @arkts 1.2
19 */
20
21import { AbstractProperty, SubscribedAbstractProperty } from '../base/decoratorBase';
22
23export declare class LocalStorage {
24    public constructor(initializingProperties?: Object);
25    public static getShared(): LocalStorage | undefined;
26    public ref<T>(propName: string): AbstractProperty<T> | undefined;
27    public setAndRef<T>(propName: string, defaultValue: T): AbstractProperty<T>;
28    public link<T>(propName: string): SubscribedAbstractProperty<T> | undefined;
29    public setAndLink<T>(propName: string, defaultValue: T): SubscribedAbstractProperty<T>;
30    public prop<T>(propName: string): SubscribedAbstractProperty<T> | undefined;
31    public setAndProp<T>(propName: string, defaultValue: T): SubscribedAbstractProperty<T>;
32    public has(propName: string): boolean;
33    public get<T>(propName: string): T | undefined;
34    public set<T>(propName: string, newValue: T): boolean;
35    public setOrCreate<T>(propName: string, newValue: T): boolean;
36    public keys(): IterableIterator<string>;
37    public size(): number;
38    public delete(propName: string): boolean;
39    public clear(): boolean;
40}