@mudssky/jsutils
    Preparing search index...

    Class TaroStorage<T>

    对Taro的Storage API进行封装,主要是为了提供ts类型提示。

    import { TaroStorage } from '@mudssky/jsutils'

    import {
    clearStorageSync,
    getStorageInfoSync,
    getStorageSync,
    removeStorageSync,
    setStorageSync,
    } from '@tarojs/taro'

    export type StorageKey = 'USERINFO'

    export const GlobalStorage = new TaroStorage<StorageKey>({
    getStorageSync,
    setStorageSync,
    clearStorageSync,
    removeStorageSync,
    getStorageInfoSync,
    })

    Type Parameters

    • T extends string = string

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    prefix: string
    Taro: any

    Methods