-
Notifications
You must be signed in to change notification settings - Fork 13
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
Automatically install .d.ts
types for imported snippets when someone runs snippets dev ./path/to/snippets.tsx
#3
Comments
💎 $20 bounty • tscircuitSteps to solve:
Thank you for contributing to tscircuit/snippets-cli! Add a bounty • Share on socials
|
/attempt #3
|
@seveibar how do i access the snippets api? is is the registry-api? |
@ShiboSoftwareDev sorry for the delay, yes it's the registry api! |
@ShiboSoftwareDev it shouldn't be needed but there's also a config manager that let's you access the auth token from the original cli |
I injected the types, but they are not known inside the project, I commented the types inside the old type files. @seveibar |
@ShiboSoftwareDev hmm not sure, we might need to put in a package json file too |
@seveibar I had one but maybe it's missing something, I don't have to do bun add don't I? |
Maybe set the main entry to "index.js"? |
Technically you could insert the registry .npmrc and fully install the package normally with "bun add". That is acceptable but wont fix type issues because the registry may not support returning types (or it might not sure) |
That full package installation isnt a bad idea to do even if its currently broken because it'll allow for theoretical future execution. The downside is you have to call to shell and npm installation is technically insecure |
I guess im ok with either i guess but if you do installation i would make sure the code is pretty rock solid because itll will have operating system and runtime bugs.... It might be nice to have the minimal types version... |
I'll see what I can do |
@seveibar today it worked without I do anything, maybe removing the old test files caused a bug in my editor |
@seveibar this is the content from the fetched dts: |
@ShiboSoftwareDev yes that looks right! |
💡 @ShiboSoftwareDev submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @ShiboSoftwareDev has been awarded $20! 🎈🎊 |
node_modules/@tsci/seveibar.red-led/index.d.ts
with the content from the snippets api (snippet.dts
), creating directories where necessary/bounty $20
The text was updated successfully, but these errors were encountered: