Skip to content

v1.2.3

Latest
Compare
Choose a tag to compare
@davidscheutz davidscheutz released this 29 Nov 00:18
· 2 commits to master since this release

Add support for struct's with custom init methods!

struct Example {
    let value: String
    let lastUpdated: Date

    init(value: String) {
        self.value = value
        lastUpdated = .now
    }
}

Previously this would've caused several compiler issues, because the code generation included the lastUpdated member, even though it is a read only value because it can't be assigned via the constructor.

SwiftCopy.stencil now has a iterate macro which can be used to dynamically generate code for each member of a given type.

Happy thanksgiving 🦃