• Gets a JSON item from local storage. If the item is not present or is not of the correct type, returns null (instead of throwing an error). This can be used to safely retrieve items from local storage without having to worry about the item not being present or being of the wrong type.

    Type Parameters

    • T

    Parameters

    • key: string
    • typeGuard: ((item) => boolean)
        • (item): boolean
        • Parameters

          • item: unknown

          Returns boolean

    Returns T | null

Generated using TypeDoc