Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuanced types #203

Open
oscartbeaumont opened this issue Dec 24, 2023 · 1 comment
Open

Nuanced types #203

oscartbeaumont opened this issue Dec 24, 2023 · 1 comment
Labels
breaking change This will probs end up in the next major version.

Comments

@oscartbeaumont
Copy link
Owner

Specta needs some way of tracking types at a lower level.

Eg. How to express the difference between Date and String (for the TS exporter) or Vec vs HashSet (for the Rust exporter)

@oscartbeaumont
Copy link
Owner Author

oscartbeaumont commented Dec 24, 2023

Maybe something like:

impl DataType {
    /// TODO
    pub fn is<T: Type>(&self) -> bool {
        todo!();
    }
}

However, idk how that works for something like chrono/uuid which uses PrimitiveDataType instead of their own types. Maybe we should post-process them instead of pre-processing stuff.

@oscartbeaumont oscartbeaumont added the breaking change This will probs end up in the next major version. label Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This will probs end up in the next major version.
Projects
None yet
Development

No branches or pull requests

1 participant