Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

feat: expose TsonSerialized type #83

Merged
merged 3 commits into from
Oct 29, 2023
Merged

Conversation

juliusmarminge
Copy link
Member

usecase:

// server component
function SC() {
  const someobj = new Map<string, string>()

  return <CC obj={tson.serialize(someobj)} />
}

// client component
function CC(props: {
  someobj: TsonSerialized<Map<string, string>>;
}) {
  const someobj = tson.deserialize(props.someobj)

  // ...
}

@vercel
Copy link

vercel bot commented Oct 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tupleson-async ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2023 1:36am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Issue Reference

In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our Contributing Guide. We are closing this pull request for now but you can update the pull request description and reopen the pull request.
The check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Merging #83 (4098b71) into main (d190fa6) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
+ Coverage   94.07%   94.08%   +0.01%     
==========================================
  Files          31       31              
  Lines        1872     1876       +4     
  Branches      194      194              
==========================================
+ Hits         1761     1765       +4     
  Misses        109      109              
  Partials        2        2              
Flag Coverage Δ
unit 94.08% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
src/sync/syncTypes.ts 100.00% <100.00%> (ø)

@juliusmarminge juliusmarminge merged commit 4cf7fef into main Oct 29, 2023
16 checks passed
@juliusmarminge juliusmarminge deleted the juliusmarminge-patch-1 branch October 29, 2023 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants