Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Nov 10, 2024
1 parent e0999ea commit c5ea0bc
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,49 @@
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2Ftsafe%2Fmod.ts">
</a>
<br/>
<a href="https://bundlephobia.com/package/tsafe">
<img src="https://img.shields.io/bundlephobia/minzip/tsafe">
</a>
<i>(you can cherrypick what you import)</i>
</p>
<p align="center">
<a href="https://docs.tsafe.dev">Documentation</a>
</p>

## A few GIFs to convince you that you need `tsafe` in your life

<p align="center">
<br>
<i>Assert things you know are true, get runtime errors where you were wrong:</i>
<br>
<i>Make sure two types are identical</i>
<br>
<img width="550" src="https://user-images.githubusercontent.com/6702424/134988258-9d3d4097-628b-4b8f-b00b-d256f7c2361c.gif">
</p>
<p align="center">
<br>
<img width="550" src="https://github.com/user-attachments/assets/e4ba75d9-1898-4668-8898-ea60c1e0fcc5">
<br>
<i>Implement compile time unit testing</i>
<img width="550" src="https://github.com/user-attachments/assets/18bd0ca0-7ea3-4f61-8b10-f0407544b3b4">
<br>
<i><a href="https://stackblitz.com/edit/typescript-rfpzav?file=index.ts&view=editor">Playground</a></i>
</p>
<p align="center">
<br>
<img width="550" src="https://user-images.githubusercontent.com/6702424/134994250-29f1b5c3-2193-49ba-ad75-e3c981723724.gif">
<i>A assertion function that typescript understands</i>
<br>
<img width="550" src="https://user-images.githubusercontent.com/6702424/182005615-5d967945-0758-4457-8068-748bc01f9008.png">
<br>
<i><a href="https://stackblitz.com/edit/typescript-rfpzav?file=index.ts&view=editor">Playground</a></i>
<img width="550" src="https://github.com/user-attachments/assets/653ddf17-7caf-4c4b-889f-49a2b9bce18d">
</p>
<p align="center">
<br>
<br>
<i>Make sure all properties of an object are deconstructed</i>
<br>
<i>Make sure your zod schema exactly matches a given type:</i>
<br>
<img width="550" src="https://github.com/garronej/tsafe/releases/download/v0.0.1/dont_forget_props.gif">
<img width="550" src="https://github.com/user-attachments/assets/11a4a5b4-8c36-4b36-8b02-7df123901e0d">
<br>
<i><a href="https://stackblitz.com/edit/typescript-rryd73?file=index.ts&view=editor">Playground</a></i>
<i><a href="https://stackblitz.com/edit/typescript-rfpzav?file=index.ts&view=editor">Playground</a></i>
</p>
<p align="center">
<br>
<br>
<i>Make sure you never forget a case in a switch</i>
<br>
<br>
<img width="550" src="https://github.com/garronej/tsafe/releases/download/v0.0.1/tsafe_switch.gif">
<img width="550" src="https://github.com/user-attachments/assets/d794da18-3279-42af-9889-6abddc763c40">
<br>
<i><a href="https://stackblitz.com/edit/typescript-ryj2ba?file=index.ts&view=editor">Playground</a></i>
</p>

<p align="center">
<br>
<br>
Expand All @@ -79,14 +71,6 @@
<br>
<img width="550" src="https://user-images.githubusercontent.com/6702424/134994590-f01b8aee-a94a-4b4c-8f43-ee5ce8911443.gif">
</p>
<p align="center">
<br>
<br>
<i>Make sure your zod schema exactly matches a given type:</i>
<br>
<img width="550" src="https://github.com/garronej/tsafe/releases/download/v0.0.1/tsafe_zod.gif">
</p>

## Motivations

Expand Down

0 comments on commit c5ea0bc

Please sign in to comment.