Open
Description
Implement a helper method AnyID() on the TypeID type (or as a generic helper) that converts any arbitrary custom ID type into a standard type safe AnyID (i.e. the common AnyID representation). This will allow developers to easily get a typed value with guaranteed valid prefix (to differentiate from string type) from their custom TypeIDs without breaking compile-time safety elsewhere.
Essentially just a helper function to do the following
document.ID.AnyID() -> typeid.AnyID
instead of
typeid.Must(typeid.Parse[typeid.AnyID](document.ID.String())) -> typeid.AnyID
Metadata
Metadata
Assignees
Labels
No labels