Public API Without Type (ARCH9193)
Ce contenu n’est pas encore disponible dans votre langue.
Key swift.quality.public-api-without-type · Severity info · Category quality
Flags public properties declared without an explicit type - the API’s type is whatever the initializer infers.
Incorrect
Section titled “Incorrect”public let timeout = 30Correct
Section titled “Correct”public let timeout: TimeInterval = 30Declare the type on public API.