You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gives tools to describe binary structures with full TypeScript support. Encodes and decodes into pure JavaScript objects, while giving type context for the parsed data.
8
9
10
+
## Prioritising Developer Experience
11
+
Serialise and deserialise typed schemas without the need for redundant interfaces or an external DSL. Schemas themselves define what type they encode and decode, and **the IDE knows it**!
12
+
13
+

14
+
15
+
Above is a self-contained code snippet using typed-binary. The IDE can properly infer what `Dog` is. What's even more interesting, is that the "parsed" properties inherit the schema's **JSDocs** (seen on the gif above).
16
+
17
+
## Highlight feature
18
+
The feature I am most proud of would have to be [recursive types](#recursive-types). I wasn't sure it it would be possible to achieve without additional tooling, but pushing the TypeScript type inference engine to it's extremes paid off.
19
+
9
20
# Table of contents
10
21
-[Features](#features)
11
22
-[Installation](#installation)
@@ -22,12 +33,14 @@ Gives tools to describe binary structures with full TypeScript support. Encodes
22
33
-[Serialization and Deserialization](#serialization-and-deserialization)
23
34
24
35
# Features:
25
-
- Type-safe schemas (your IDE will know what structure the parsed binary is in).
26
-
-Generic objects
27
-
- Estimating the size of any resulting binary object (helpful for creating buffered storage)
36
+
-[Type-safe schema definition system](#defining-schemas) (your IDE will know what structure the parsed binary is in).
0 commit comments