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

Should the optimizer.global.envs type include Record<string, string>? #8494

Closed
davidmurdoch opened this issue Jan 9, 2024 · 4 comments · Fixed by #8620
Closed

Should the optimizer.global.envs type include Record<string, string>? #8494

davidmurdoch opened this issue Jan 9, 2024 · 4 comments · Fixed by #8620
Milestone

Comments

@davidmurdoch
Copy link
Contributor

optimizer.global.envs type is defined here:

https://github.com/swc-project/swc/blob/9cf91a375bbd87abb16bffa2d6ec44a32059d102/packages/types/index.ts#L868C8-L868C8

I don't know Rust, but with a little intuition and a lot of GPT, I think it should be something like:

-    envs?: string[];
+    envs?: string[] | Record<string, string>;
@davidmurdoch
Copy link
Contributor Author

davidmurdoch commented Feb 6, 2024

Does this look correct? I'll submit a PR if so.

@kdy1
Copy link
Member

kdy1 commented Feb 7, 2024

Yes, it's valid. Thank you in advance!

@davidmurdoch
Copy link
Contributor Author

Done. Thank you!

@kdy1 kdy1 closed this as completed in #8620 Feb 7, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.4.1 Feb 13, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Mar 14, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants