Skip to content

Conversation

@oscartbeaumont
Copy link
Member

@oscartbeaumont oscartbeaumont commented Dec 3, 2025

Is it possible to cleanup the API surface? This could be a bad idea but worth investigating.

TODO:

  • FIx TS exporter of Any, etc
  • How do we compare types?
  • How can we easily get an ID if required??? Can we make SpectaID not required???
  • We loose some typesafety in the exporter primitives. Is this fine or can we restore it by only allow a NamedDataType struct to be passed in?
  • Tauri Specta - tauri::ipc::Channel
  • Tauri Specta - Event system

Rethinking references:

  • Enforce constraints when constructing Reference that the type is in the typemap
  • Using Reference instead of SpectaID publically and seal it????
  • Allow comparing References?
  • Allow producing reference to type or a completly random reference, which fixes the TypeCollection clone problem if it can be cloned.

Other:

// TODO: Put this somewhere. Maybe make public?
fn get_tid(dt: DataType) -> Option<SpectaID> {
    match dt {
        DataType::Reference(r) => Some(r.sid()),
        _ => None,
    }
}

@oscartbeaumont
Copy link
Member Author

Replaced by #423

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.

2 participants