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

Rethink Type and NamedType + rewrite specta_typescript #308

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

oscartbeaumont
Copy link
Member

@oscartbeaumont oscartbeaumont commented Jan 15, 2025

This PR is an exploration into rethinking the core Specta interface with the goal of supporting specta-jsonschema converting schemars::Schema -> specta::DataType.

TODO:

  • variants.dedup();
  • Inlining
  • Flatten
  • Docs
  • Fix test suite
  • Finish todos in Typescript exporter
  • Fix field_flattened
  • Drop jsdoc and legacy modules from Typescript
  • Typescript detect_duplicate_type_names hooked back up
  • Dynamic specta id’s
  • Drop DataTypeFrom
  • Tauri Specta and rspc working on this new stuff

Future:

  • NamedDataType whats the plan? Rename NamedType trait???
  • Rethink to_named??
  • Flatten NamedDataTypeExt onto NamedDataType?
  • TypeCollection::flatten_stack is it still needed?
  • Remove datatype::inline module. It's not a Specta feature?
  • Can DataType::Generic be a special Reference instead?
  • Maybe we should move docs and deprecated from NamedDataType to StructType/EnumType. Would help Mattrax & struct fields also hold docs so... - Would prevent documenting/deprecating a primtive type though so idk.
  • static_types.rs into specta_typescript
  • Remove DataType::Any, DataType::Unknown, etc.

@oscartbeaumont oscartbeaumont changed the title Changes Rethink Type and NamedType Jan 19, 2025
@oscartbeaumont oscartbeaumont changed the title Rethink Type and NamedType Rethink Type and NamedType + rewrite specta_typescript Jan 20, 2025
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

Successfully merging this pull request may close these issues.

1 participant