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

add support for top level as #288

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

dr-bonez
Copy link
Contributor

@dr-bonez dr-bonez commented Apr 1, 2024

Goal

This adds support for easily defining a struct or enum's type definition manually at the top level using the as = ".." attribute. This is for symmetry with #286.

Changes

Added type_as to the container attributes, and defined an early-returned implementation for if this attribute is specified

Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

Copy link
Contributor

@escritorio-gustavo escritorio-gustavo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! @NyxCode, do you want to change anything?

@NyxCode
Copy link
Collaborator

NyxCode commented Apr 2, 2024

Hope you guys had a nice easter!

I love it! Seems like a natural extension after supporting #[ts(type = "..")] on types. Thanks @dr-bonez for the PR, and thanks @escritorio-gustavo for taking a look!

@escritorio-gustavo escritorio-gustavo merged commit c862aa6 into Aleph-Alpha:main Apr 2, 2024
7 checks passed
@escritorio-gustavo
Copy link
Contributor

Hope you guys had a nice easter!

Thanks! Hope you did as well!

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.

3 participants