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

Enhanced Type manipulation #40

Open
rrousselGit opened this issue Aug 10, 2021 · 1 comment
Open

Enhanced Type manipulation #40

rrousselGit opened this issue Aug 10, 2021 · 1 comment

Comments

@rrousselGit
Copy link
Contributor

rrousselGit commented Aug 10, 2021

So far, a type only exposes limited informations

It would be useful to add extra utilities, such as:

  • converting a runtimeType into a type (similar to TypeChecker from the analyzer)
  • expose an utility to obtain the nearest common interface between two types (like num for double+int, but Object for String+int)
@jakemac53
Copy link
Owner

jakemac53 commented Aug 10, 2021

  • converting a runtimeType into a type (similar to TypeChecker from the analyzer)

This one you can do from the builder instances in your macro - see the type{Reference|Declaration|Definition}Of apis. Or I think that is what you were asking for at least :).

  • expose an utility to obtain the nearest common interface between two types (like num for double+int, but Object for String+int)

Ya I think we also want a utility to check if some type is exactly another type. Possibly with or without taking into account the generic type.

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

2 participants