Docsy / docs

PORTABLE METADATA · MANUAL EXAMPLE

Portable metadata · manual example

An explicitly hand-authored compact-format example for custom converters. Not a native generator fixture and not counted among the 20 native languages.

4 symbols4 categoriestypescript

Clients

An asynchronous client for the fictional Atlas document API.

Properties

baseUrlstring

The configured API origin.

Methods

getDocumentasync→ Promise<Document>

Fetch a document by its stable identifier.

  • id: string

Models

interface

Document

A document returned by the Atlas API.

Properties

idstring

Stable identifier.

titlestring

Human-readable title.

stateDocumentState

Publication state.

Hooks

A React hook for loading one document.

Parameters

idstring

Stable document identifier.

Returns

{ document?: Document; loading: boolean }

The current document and loading state.

Enums

The publication state of a document.

Values

draftpublishedarchived
—