Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sanoel committed Jun 19, 2024
1 parent 3ee5470 commit c19946d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ For detailed options, see the `Options` type in src/Options.ts
## Basic Usage Example

```typescript
import { ChangeType, ListWatch } from '@oada/list-lib'
import { ChangeType, ListWatch, AssumeState } from '@oada/list-lib'

// See type definitions for all supported options
const watch = new ListWatch({
path: '/bookmarks/foo/list',
assertItem: /* assertion function to run on each item handled */,
conn: /* an @oada/client instance */,
name: /* string; key name of the oada-list-lib entry in the _meta doc*/,
resume: /* boolean; whether to track changes using a _meta/oada-list-lib/<name> entry */
onNewList: /* AssumeState.New || AssumeState.Handled; Whether or not to handle existing
list items on startup. `New` means it will treat the list as new every time
it starts up and will attempt to process each item; `Handled` means it will
not process existing items. */,
})

// Uses async generators
Expand Down

0 comments on commit c19946d

Please sign in to comment.