/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

weberdominik.com
| | effectivetypescript.com

Effective TypeScript: The Golden Rule of Generics
3.3 parsecs

Travel
| |
| | alexop.dev

Did you know that TypeScript is Turing complete? In this post, I will show you how you can loop with TypeScript.
3.0 parsecs

Travel
| |
| | kamranicus.com

Override specific property type annotations using mapped, conditional, and intersection types with TypeScript for interfaces or classes
3.7 parsecs

Travel
| |
| | konradreiche.com

Writing a generic protobuf writer in Go is straightforward. We simply use proto.Marshal with the protobuf message because proto.Marshal expects the proto.Message interface, which all generated protobuf messages implement. However, when it comes to reading serialized protobuf data into a specific Go type, historically, we had to specify the type explicitly: var post pb.Post if err := proto.Unmarshal(b, &post); err != nil { return nil, err } This approach is clear and explicit: what you see is what you get. But what if you need a more generic solution? You might encounter a scenario similar to mine: a cache abstraction designed to handle different kinds of protobuf messages generically. My initial attempt looked like this:
26.8 parsecs

Travel
|