I am struggling to write a macro that does the following:
enum E: CaseIterable {
case a
case b
}
@CasesAsProperties(from: E.Type, typeDeclaration: "String")
struct S {
}
should result in the following declaration of S:
struct S {
let a: String
let b: String
}
Does there exist a macro like that (could not find one), or else how would such a macro look like?