Documentation - v1.2.0-alpha.3
    Preparing search index...

    Manages memory scopes and path resolvers.

    MemoryScopes are named root level objects, which can exist either in the dialog context or off of turn state. Path resolvers allow for shortcut behavior for mapping things like $foo -> dialog.foo

    Index

    Constructors

    Properties

    Gets or sets the configured path resolvers and memory scopes for the dialog state manager.

    There is a single set of configuration information for a given chain of dialog contexts. Assigning a new configuration to any DialogStateManager within the chain will update the configuration for the entire chain.

    Methods

    • Check to see if any path has changed since watermark.

      Parameters

      • counter: number

        Time counter to compare to.

      • paths: string[]

        Paths from trackPaths method to check.

      Returns boolean

      True if any path has changed since counter.

    • Get the value from memory using path expression.

      Type Parameters

      • T = any

        The value type to return.

      Parameters

      • pathExpression: string

        Path expression to use.

      • OptionaldefaultValue: T | (() => T)

        (Optional) default value to use if the path isn't found. May be a function that returns the default value to use.

      Returns T

      The found value or undefined if not found and no defaultValue specified.

      This always returns a CLONE of the memory, any modifications to the result will not affect memory.

    • Normalizes the path segments of a passed in path.

      Parameters

      • pathExpression: string

        The path to normalize.

      • allowNestedPaths: boolean = true

        Optional. If false then detection of a nested path will cause an empty path to be returned. Defaults to 'true'.

      Returns (string | number)[]

      The normalized path.

      A path of profile.address[0] will be normalized to profile.address.0.