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

Preserve tagged template in generated code #7236

Open
DZakh opened this issue Jan 9, 2025 · 2 comments
Open

Preserve tagged template in generated code #7236

DZakh opened this issue Jan 9, 2025 · 2 comments

Comments

@DZakh
Copy link
Contributor

DZakh commented Jan 9, 2025

I've just tried out tagged template, and it would be great if they stayed as tagged templates instead of turning into arrays like here:

https://rescript-lang.org/try?version=v12.0.0-alpha.7&module=esmodule&code=KYDwLsBOB2CGA2ACAtgTwCqwOYDECu0AxmAJYD20iAXIgBSySSyoA8AzmJCdFgHwA0iBk1YByAA4NYyXgEpEAXl6JRZPGHHrFiAEQA3BDoBQRgFJsAdPDJZaaTLgLFy0AAYAzMmVeyjQA

I use the postgres package and it returns the following error:

image
@zth
Copy link
Collaborator

zth commented Jan 9, 2025

You can add @taggedTemplate when it's an external to achieve what you want. What you can't do as of now is have a regular rescript function emitted as a proper tagged template. But I suppose that'd be possible to add too.

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