这是indexloc提供的服务,不要输入任何密码
Skip to content

Expand define value type to be any json or single type #503

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

Closed
wants to merge 1 commit into from
Closed

Expand define value type to be any json or single type #503

wants to merge 1 commit into from

Conversation

hennessyevan
Copy link

The Options['define'] type only allows string values however using any other type like booleans, numbers, etc. are supported by esbuild.

@vercel
Copy link

vercel bot commented Dec 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/egoist/tsup/FPU69BFa4B6D53FfvFjjHP57SiU6
✅ Preview: https://tsup-git-fork-hennessyevan-patch-1-egoist.vercel.app

@egoist
Copy link
Owner

egoist commented Dec 22, 2021

CleanShot 2021-12-23 at 00 53 26@2x

this is esbuild's type declaration, to use boolean number you pass it in as a string, like 'true' '1'

@hennessyevan
Copy link
Author

Oh! Thanks for letting me know, I was using key: true and it was working as intended but giving me a type error. Will close this PR then. Thanks for this awesome lib btw!

@hennessyevan hennessyevan deleted the patch-1 branch December 22, 2021 16:59
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