-
Notifications
You must be signed in to change notification settings - Fork 230
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
(Re)load decorators and functions directly from TypeScript #533
Comments
+1 for being able to reload the decorators without reloading the IDE since I just wasted an hour troubleshooting this 😛 |
Just a note that there is now Ctrl+P -> Restart Cadl Server option that should be faster than restarting the whole IDE. Still not great but perhaps a better workaround. |
Could we give that a keyboard shortcut? It will become part of my standard CADL troubleshooting ritual... |
You can assign one yourself. Search for cadl in File -> Preferences -> Keyboard Shortcuts. |
Is there not a way to set one as a repo setting? I'm thinking of how Ctrl+Shift+B starts up the three watch processes, but maybe that's a VS Code built-in thing... |
We are no longer depending on this for decorator and function typing so the priority was lowered and this is now on the backlog. |
A problem with this is the same as with Some option is to run the js code of typescript inside nodejs VM but that is still experimental as of node 20 for es modules |
See also proposal linked from #528.
We have the idea (option 1 there) to host the TypeScript compiler and consume TypeScript on the fly without a user build step. This hosting of the compiler could then be used to get the documentation and typing for decorators or Cadl-callable functions. We also have a desire to make it possible to change decorator and function definitions and immediately see the results in the IDE. Today, you have to restart the language server to observe any change to the JavaScript.
To keep work split, this issue tracks the experience of being able to write in TypeScript, save and see the results in Cadl immediately. It does not track doing anything with the JSDoc or TS typing yet. That will be left for other issues that will require further design. When we do this, though, we should have in mind that we intend to consume this data eventually, so it would be worth structuring the code for this eventuality and at least proving that we can get to the information even if we don't use it yet.
The text was updated successfully, but these errors were encountered: