Skip to content

Import attributes #811

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

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Import attributes #811

merged 2 commits into from
Feb 7, 2024

Conversation

zth
Copy link
Collaborator

@zth zth commented Feb 6, 2024

@zth zth requested a review from fhammerschmidt February 6, 2024 19:50
Copy link

vercel bot commented Feb 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rescript-lang.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 7:57pm

3. It should also have a `with` key, with another record where you put all the import attributes you want emitted.

Notice `\"some-exotic-identifier"` - you'll need to escape any key that's not a valid ReScript record key.
Also notice `type_`. Since `type` is a reserved keyword in ReScript, you can use `type_` instead. It will be output as `type` in the JavaScript code.
Copy link
Member

@fhammerschmidt fhammerschmidt Feb 7, 2024

Choose a reason for hiding this comment

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

"you can use"

isn't it more like
"you need to use type_ instead"
since you cannot do it any other way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You can use type if you escape it, but since it's what you'll use 99% of the time I wanted it to have a "shortcut".

@zth zth merged commit 9a59bd4 into master Feb 7, 2024
@zth zth deleted the import-attributes branch February 7, 2024 17:49
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