← @mortar-kit/core

ContentReaderinterface

import { ContentReader } from '@mortar-kit/core'

interface ContentReader

Typed reads: pass a collection, get its documents with typed fields.

Properties

list: (collection: Collection<F>, options?: ListOptions) => Promise<DocSummary<InferFields<F>>[]>

Documents of the collection, without their bodies.

get: (collection: Collection<F>, ref: DocRef) => Promise<Doc<InferFields<F>> | null>

One document of the collection, or null.