Skip to content

Commit

Permalink
Update 99_labs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Apr 25, 2024
1 parent c50e2e9 commit e8cd62e
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions docs/04_examples/99_labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,17 @@ const notesLab = new Lab()
return notes.get(id);
},
["notes"],
)
.procedure(
"notes.list",
(_, { notes }) => {
return Array.from(notes.values());
},
["notes"],
);

notesLab.execute(
const noteID = notesLab.execute(
"notes.add",
{ title: "Hello", content: "World" },
);

const notes = notesLab.execute(
"notes.list",
{},
const note = notesLab.execute(
"notes.get",
{ id: noteID.id },
);

console.log(notes);
console.log(note); // { title: "Hello", content: "World" }
```

0 comments on commit e8cd62e

Please sign in to comment.