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

Add support for C# script return types #7720

Open
tomdegoede opened this issue Nov 1, 2024 · 0 comments
Open

Add support for C# script return types #7720

tomdegoede opened this issue Nov 1, 2024 · 0 comments

Comments

@tomdegoede
Copy link

We use VS Code as the editor for C# scripts. These scripts are compiled using CSharpCompilation.CreateScriptCompilation() and can therefore have a return type. In our case this is a JObject, but this can change in the future.

We generate a .csproj file next to each script to get intellisense working. Using C#'s top level statements and implicit usings we achieve this for 99%! The only thing that currently is missing is that there is no way to declare the expected return type. VS Code will expect a void or an integer, and therefore mark each return JObject as an error.

I've searched for hooks to pass this along inside this codebase but fear that there is no easy solution.

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

1 participant