specta
specta copied to clipboard
#203 - Nuanced types
The high-level thinking is to separate the idea of a Rust declaration and a Typescript type. Would this mean we can remove Any, Unknown and PrimitiveType/LiteralType::None.
Questions:
- How should
ListandMapconstructors deal withinlinevsreference - Right now you can have a
DataType::Nullable(DataType::Nullable(...))which is not great. Should we have it be more split up. - How does
DataTypeFromfit into this? - Should
Type::inlinego and instead haveReference { inline: true }and post-process it? - Should we merge
ReferenceandDatTypeReference?? I feel like it makes it more typesafe so probs. - What if
inlineanddefinitionbecome one method and thegenericsarg is an enum instead. - Removing
NamedType???
TODO:
- [ ] Can
ImplLocationbe constructed usinguse_caller? Should it be removed? - [ ] Public
Listconstructor - [ ] Public
Mapconstructor - [ ]
DataType::is - [ ] Give each type a
SpectaIDincluding primitives. - [ ]
std::convert::Infallibleshould be rejected by the Serde validator. - [ ] Rename
ListandMaptoListTypeandMapType - [ ] Support
!but with Serde exporter warning - [ ] Option for static arrays. A normal data structure should require zero memory allocations.
Tied to #203 and #140.