Originate / recouple

Declarative and type-safe API bridging. Write full-stack applications with ease.
MIT License
4 stars 1 forks source link

WIP add number type reps #52

Closed ArcherWheeler closed 6 years ago

ArcherWheeler commented 6 years ago

Add number, null and undefined as type reps available for query params. Also defines a type rep union. Defines maybe in terms of type unions.

To(potentially)Do: Let capture params capture numbers. @astampoulis I glanced at this, it looks non trivial.

23

soenkehahn commented 6 years ago

I think this is missing a test for the actual feature, i.e. using numbers and maybes for query params. Also, I would consider splitting this up in supporting number and supporting maybe.

astampoulis commented 6 years ago

Copying an offline discussion here. I think we should add serialization/deserialization methods to TypeRep in this PR, so that we can control how a given type gets serialized to and from a querystring. This is the right place for that since it's the first point where we're adding something that serialization is not trivial (e.g. for the null case). This would fix the issue on #41 as well. @soenkehahn @sleexyz What do you guys think?

astampoulis commented 6 years ago

Actually after talking more about #41, I think what I suggested above is not needed yet. It'll be necessary I think once we work on NumberRep, but that will be part of a separate PR.

ArcherWheeler commented 6 years ago

I'm renaming this branch and will reopen these changes in a new PR later.