{"id":18072033,"url":"https://github.com/stereobooster/pragmatic-types","last_synced_at":"2025-07-12T08:32:52.067Z","repository":{"id":66225628,"uuid":"144390947","full_name":"stereobooster/pragmatic-types","owner":"stereobooster","description":"Small practical guide on Flow and TypeScript for JavaScript developers","archived":false,"fork":false,"pushed_at":"2018-10-24T18:56:10.000Z","size":98,"stargazers_count":41,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T02:55:33.249Z","etag":null,"topics":["flow","flowtype","static-types","typescript"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stereobooster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-11T14:15:43.000Z","updated_at":"2025-03-28T14:24:38.000Z","dependencies_parsed_at":"2023-03-21T20:17:31.262Z","dependency_job_id":null,"html_url":"https://github.com/stereobooster/pragmatic-types","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stereobooster/pragmatic-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fpragmatic-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fpragmatic-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fpragmatic-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fpragmatic-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stereobooster","download_url":"https://codeload.github.com/stereobooster/pragmatic-types/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stereobooster%2Fpragmatic-types/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264962346,"owners_count":23689799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flow","flowtype","static-types","typescript"],"created_at":"2024-10-31T09:18:50.098Z","updated_at":"2025-07-12T08:32:52.060Z","avatar_url":"https://github.com/stereobooster.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pragmatic types\n\n[![Tweet][twitter-badge]][twitter]\n\n## Introduction\n\n### What\nSmall practical guide on statically-typed languages for developers who switching from dynamically-typed languages to statically-typed versions. For example from JavaScript to TypeScript or Flow.\n\n### For who\nThis guide assumes at least some prior knowledge of dynamically-typed languages. The idea of this guide is to help make a mental shift from dynamic to static types.\n\nMost of the time I will use JavaScript and TypeScript or Flow examples. Maybe this will be useful for other languages - I do not know yet, let's see.\n\nIf you have prior knowledge of statically typed languages, but Hindley-Milner doesn't ring a bell for you, this guide can be useful for you too.\n\n### Why\nThis is my diary of personal discoveries. I find myself explaining those things again and again to different people. I decided to write it down once and for all.\n\n## Table of contents\n- [Exhaustive check and why it is useful for event processing, enums, unions or disjoint unions](posts/exhaustive-check.md)\n- [Opaque types and how they could have saved Mars Climate Orbiter](posts/opaque-types.md)\n- [IO validation or how to handle JSON-based APIs in statically typed language](posts/io-validation.md)\n- [What are types?](posts/what-are-types.md)\n- [Dynamically-, statically-, gradually-, weakly-, strongly- and un-typed languages](posts/dynamic-static-gradual-untyped.md)\n- [Is JavaScript an untyped language?](posts/is-javascript-an-untyped-language.md)\n- [Type system vs null](posts/type-system-vs-null.md)\n- [Making Impossible States Impossible](posts/making-impossible-states-impossible.md)\n- [Immutability and type system](posts/immutability-and-type-system.md)\n- Classes, types, sets, structural and nominal subtyping, Liskov substitution principle\n- Redux and impossible states\n- Redux and impossible state transitions or FSM\n- Redux and side effects\n- Types and proofs\n- Why JavaScript Promise is unsound?\n- Terminology: soundness, completeness, totality, decidability\n- Rosetta stone, Curry–Howard correspondence\n- To be continued...\n\n## Similar works\n\n- [To type or not to type: quantifying detectable bugs in JavaScript](https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-quantifying-detectable-bugs-in-javascript/) Gao et al., ICSE 2017\n- [Type systems will make you a better JavaScript programmer](https://jaredforsyth.com/type-systems-js-dev/#/) by Jared Forsyth 2017\n- [Types, and Why You Should Care](https://www.youtube.com/watch?time_continue=1\u0026v=0arFPIQatCU)\n- [Lauren Tan Swipe Left, Uncaught TypeError Learning to Love Type Systems](https://youtu.be/y3uXazpAdwo)\n\n## Contribution\nIdeas, questions, and fixes are welcome. Sharing on social networks is also a big help. Thank you.\n\n[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20small%20practical%20guide%20on%20Flow%20and%20TypeScript%20for%20JavaScript%20developers%0A%20by%20%40stereobooster%20https%3A%2F%2Fgithub.com%2Fstereobooster%2Fpractical-types%20%F0%9F%91%8D\n[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/stereobooster/react-ideal-image.svg?style=social\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Fpragmatic-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstereobooster%2Fpragmatic-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereobooster%2Fpragmatic-types/lists"}