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

Exporter Attributes #314

Open
oscartbeaumont opened this issue Jan 19, 2025 · 1 comment
Open

Exporter Attributes #314

oscartbeaumont opened this issue Jan 19, 2025 · 1 comment

Comments

@oscartbeaumont
Copy link
Member

'#[specta(typescript(attribute = ...))]'

We should transfer 'typescript' into 'specta_typescript::Attribute' and then parse all nested attributes into the struct.

This should give up compile time errors to any crates. We could also allow a custom Cargo.toml mapping for which crate should handle each attribute.

Then we need to somehow get this struct into the exporter. Probably '&'static dyn Any' + downcasting the struct cause it will be 'static.

@oscartbeaumont
Copy link
Member Author

oscartbeaumont commented Jan 20, 2025

With this being merged we need to look into the removal of:

  • DataType::Any/DataType::Unknown (either custom attribute or DataType::Custom)
  • EnumRepr
  • Inling information. As #[specta(inline)] is a Typescript-specific thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant