Skip to content

Conversation

@KyleAMathews
Copy link
Contributor

Main odd thing was the typescript error here — the code runs as expected though:

Screenshot 2024-12-12 at 4 38 21 PM

Also I was trying to log out the materialized view after each step but... not really sure how to do that.

@samwillis
Copy link
Contributor

Fixed up and added comments. TS error was a misunderstanding.

output:

--------------------------------
Sending initial orders
Counts by Status:
{
  "apple-packed": 100,
  "banana-packed": 150
}
Fruit Processed:
{
  "apple": 100,
  "banana": 150
}
--------------------------------
Shipping 2 orders
Counts by Status:
{
  "apple-shipped": 100,
  "banana-shipped": 150
}
Fruit Processed:
{
  "apple": 100,
  "banana": 150
}
--------------------------------
One order arrives
Counts by Status:
{
  "banana-shipped": 150,
  "apple-delivered": 100
}
Fruit Processed:
{
  "apple": 100,
  "banana": 150
}
--------------------------------

Copy link
Contributor

@samwillis samwillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@KyleAMathews
Copy link
Contributor Author

Neat! Feel free to merge or close as you'd like. I'm not sure it adds much over the other examples.

@samwillis samwillis merged commit 107a14f into main Dec 13, 2024
1 check passed
@samwillis samwillis deleted the fruit-example branch December 13, 2024 14:28
cursor bot pushed a commit to samwillis/d2ts that referenced this pull request Jul 13, 2025
* Add fruit shipping example

* Improve fruit example

* Fix import

* Fix lint errors

---------

Co-authored-by: Sam Willis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants