❔ Source generator, generating type script definitions at compile time
I would like to make a automatic type script definition from code, i consider to use source generator to do that, is it a good idea? is source generator able to do this?
a bit more context: i'm using https://github.com/microsoft/ClearScript to run js from c#, i made a list of methods, classes that are availiable to use in js and now i would like to loop through all of them and generate types
You probably want swagger and NSwag if you're doing a rest api
not rest api
just plain text file with typescript definition
An SG can output non-cs source files afaik.
And if you're doing grpc, you just need to use their compiler
^ thats what i want
i already use grpc lib for it
well it supports generating clients for different languages