Add support for C# script return types
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 17h 56m
- Merged PRs (30d)
- 21
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.