- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Sync API Refactor #87
base: main
Are you sure you want to change the base?
Conversation
feat: guards are distinct from type handlers chore: rename some things types: general type improvements chore: add more iterable utils
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ 
 | 
feat!: new guard api
ead1435    to
    f588184      
    Compare
  
    | Codecov ReportAttention:  
 Additional details and impacted files@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   94.08%   85.64%   -8.44%     
==========================================
  Files          31       40       +9     
  Lines        1876     2864     +988     
  Branches      194      258      +64     
==========================================
+ Hits         1765     2453     +688     
- Misses        109      407     +298     
- Partials        2        4       +2     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. | 
<!-- 👋 Hi, thanks for sending a PR to tson! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [ ] Addresses an existing open issue: fixes #000 - [ ] That issue was marked as [`status: accepting prs`](https://github.com/trpc/tupleson/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [ ] Steps in [CONTRIBUTING.md](https://github.com/trpc/tupleson/blob/main/.github/CONTRIBUTING.md) were taken ## Overview <!-- Description of what is changed and how the code change does that. -->
fix: correct assertion behavior docs: update readme for guards
| I've got the async serializer (mostly) spitting out the expected result. The main feature here is using an iterative algorithm for serialization, rather than a recursive one. There's more to do, but this is illustrative enough to be a PoC. The benefits I'm hoping to achieve: 
 Todos: 
 | 
fix: don't stringify primitives prematurely tests: improved tests for new async stuff
| const stringHandler = { | ||
| primitive: "string", | ||
| }; | ||
| } as TsonType<string, string>; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is equivalent to the other way around. Did you want to use the satisfies operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is necessary due to the changes in src/sync/syncTypes.ts (sorry for the slow reply!)
PR Checklist
status: accepting prsOverview
Refactor sync api to be easier to follow and map nicely with the new async api (wip)
Change the api for guards to be separate from that of serialize/deserialize type handlers