@mantlebee/ts-data
    Preparing search index...

    Type Alias IDataSourceWith<TItem, TCapability>

    IDataSourceWith: IDataSource<
        TItem,
        Pick<DataSourceCapabilities<TItem>, TCapability>,
    >

    Shortcut for an IDataSource guaranteeing some extensions of the package, named by key: IDataSourceWith<User, "filtering" | "pagination"> is IDataSource<User, { filtering: IFilterExtension<User>; pagination: IPaginationExtension<User> }>, see DataSourceCapabilities. It is the way a consumer states what it needs from a source in a signature; a record is needed only to name a custom key or an optional one, and the two compose by intersection.

    Type Parameters

    function bindGrid(source: IDataSourceWith<User, "filtering" | "pagination">) {
    source.filtering.addFilter(adult);
    source.pagination.goToNextPage();
    }
    bindGrid(createDataSource(readUsers, { filtering, pagination, sorting })); // more than asked: fits
    bindGrid(createDataSource(readUsers, { filtering })); // compile error: no `pagination`

    // A key of the package and a custom one.
    type UsersSource = IDataSourceWith<User, "filtering"> &
    IDataSource<User, { distinct: DistinctExtension<User> }>;