Package version:

Used to perform operations on a specific item.

Items for operations on all items; see container.items.

Properties

Accessors

Methods

Properties

container: Container

The parent Container.

id: string

The id of the given Item.

Accessors

Methods

  • Read the item's definition.

    Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it. If the type, T, is a class, it won't pass typeof comparisons, because it won't have a match prototype. It's recommended to only use interfaces.

    There is no set schema for JSON items. They may contain any number of custom properties.

    Type Parameters

    Parameters

    Returns Promise<ItemResponse<T>>

    interface TodoItem {
    title: string;
    done: bool;
    id: string;
    }

    let item: TodoItem;
    ({body: item} = await item.read<TodoItem>());