❔ 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?
CrosRoad9512/10/2022
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
AntonC12/10/2022
You probably want swagger and NSwag if you're doing a rest api
CrosRoad9512/10/2022
not rest api
CrosRoad9512/10/2022
just plain text file with typescript definition
thinker22712/10/2022
An SG can output non-cs source files afaik.
AntonC12/10/2022
And if you're doing grpc, you just need to use their compiler
CrosRoad9512/10/2022
^ thats what i want
CrosRoad9512/10/2022
i already use grpc lib for it
AntonC12/10/2022
well it supports generating clients for different languages