ADK TypeScript Documentation - v0.0.4
    Preparing search index...

    Class SessionState

    Represents the state of a session

    Index

    Constructors

    Methods

    • Deletes a key from the state

      Parameters

      • key: string

        The key to delete

      Returns boolean

      Whether the key was deleted

    • Gets a value from the state

      Type Parameters

      • T

      Parameters

      • key: string

        The key to get

      Returns undefined | T

      The value or undefined if not present

    • Checks if the state has a key

      Parameters

      • key: string

        The key to check

      Returns boolean

      Whether the key exists

    • Checks if state has changed since last save

      Returns boolean

      Whether the state has been modified

    • Sets a value in the state

      Parameters

      • key: string

        The key to set

      • value: any

        The value to set

      Returns void