@@ -16,10 +16,12 @@ extension Metadata {
1616 ///
1717 /// `@Available` is analogous to the `@available` attribute in Swift: It allows you to specify a
1818 /// platform version that the page relates to. To specify a platform and version, list the platform
19- /// name and use the `introduced` argument:
19+ /// name and use the `introduced` argument. In addition, you can also specify a deprecated
20+ /// version, using the `deprecated` argument:
2021 ///
2122 /// ```markdown
2223 /// @Available(macOS, introduced: "12.0")
24+ /// @Available(macOS, introduced: "12.0", deprecated: "14.0")
2325 /// ```
2426 ///
2527 /// Any text can be given to the first argument, and will be displayed in the page's
@@ -48,8 +50,6 @@ extension Metadata {
4850 public static let introducedVersion = " 5.8 "
4951
5052 public enum Platform : RawRepresentable , Hashable , DirectiveArgumentValueConvertible {
51- // FIXME: re-add `case any = "*"` when `isBeta` and `isDeprecated` are implemented
52- // cf. https://github.com/apple/swift-docc/issues/441
5353 case macOS, iOS, watchOS, tvOS
5454
5555 case other( String )
@@ -90,16 +90,18 @@ extension Metadata {
9090 @DirectiveArgumentWrapped ( name: . unnamed)
9191 public var platform : Platform
9292
93- /// The platform version that this page applies to .
93+ /// The platform version that this page was introduced in .
9494 @DirectiveArgumentWrapped
9595 public var introduced : String
9696
97- // FIXME: `isBeta` and `isDeprecated` properties/arguments
98- // cf. https://github.com/apple/swift-docc/issues/441
97+ /// The platform version that this page was deprecated in.
98+ @DirectiveArgumentWrapped
99+ public var deprecated : String ? = nil
99100
100101 static var keyPaths : [ String : AnyKeyPath ] = [
101102 " platform " : \Availability . _platform,
102103 " introduced " : \Availability . _introduced,
104+ " deprecated " : \Availability . _deprecated,
103105 ]
104106
105107 public let originalMarkup : Markdown . BlockDirective
0 commit comments