@b-jones-rfd/sp-rest-connect - v5.1.1
    Preparing search index...

    Type Alias PagedAction<TConfig>

    PagedAction: <T = unknown>(options: TConfig) => Promise<PageResult<T>>

    A read action whose item type the caller chooses. The type parameter is an unchecked assertion — SharePoint's JSON is not validated against T.

    Type Parameters

    • TConfig

    Type Declaration

    type Task = { Id: number; Title: string }
    const res = await connection.getListContents<Task>({ listName: 'Tasks' })
    if (res.success) res.data[0].Title // string