init(name:doc:annotation:getter:setter:deleter:)

Initializes the property.

Declaration

init(
    name: String,
    doc: String? = nil,
    annotation: (
        () throws -> (
            any Parsable
        )?
    )? = nil,
    getter: Method? = nil,
    setter: Method? = nil,
    deleter: Method? = nil
)

Parameters

  • name: The name of the property.

  • doc: The docstring of the property.

  • annotation: A closure returning the type annotation of the property.

  • getter: The getter method definiton.

  • setter: The setter method definiton.

  • deleter: The deleter method definiton.