outfoxx / swiftpoet

Kotlin and Java API for generating .swift source files.
Apache License 2.0
277 stars 26 forks source link

How to indicate that a function returns "some TypeName"? #114

Closed Lavmee closed 5 months ago

Lavmee commented 5 months ago

I need to generate functions of this type:

public func onChange() -> some View {
}
kdubb commented 5 months ago

We will need to add some method of adding qualifiers to types (e.g. some and any).

Lavmee commented 5 months ago

Is it possible to use some kind of workaround?

kdubb commented 5 months ago

Not without using CodeWriter to write the signature manually. I opened PR #115... should be in fairly quickly.