MAIDR Documentation - v3.39.0
    Preparing search index...

    Interface StorageService

    Interface for storage operations to persist and retrieve data.

    interface StorageService {
        save: <T>(key: string, value: T) => void;
        load: <T>(key: string) => T | null;
        remove: (key: string) => void;
    }

    Implemented by

    Index

    Properties

    Properties

    save: <T>(key: string, value: T) => void

    Saves a value to storage with the specified key.

    Type Declaration

      • <T>(key: string, value: T): void
      • Type Parameters

        • T

        Parameters

        • key: string

          The storage key

        • value: T

          The value to store

        Returns void

    load: <T>(key: string) => T | null

    Loads a value from storage by key.

    Type Declaration

      • <T>(key: string): T | null
      • Type Parameters

        • T

        Parameters

        • key: string

          The storage key

        Returns T | null

        The stored value or null if not found

    remove: (key: string) => void

    Removes a value from storage by key.

    Type Declaration

      • (key: string): void
      • Parameters

        • key: string

          The storage key

        Returns void