Skip to content

Commit

Permalink
Add doc comments to deprecated methods
Browse files Browse the repository at this point in the history
These comments are just stubs that largely exist to inform the reader
what they were replaced with.
  • Loading branch information
lilyball committed Nov 26, 2019
1 parent b228ce2 commit 11287fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@
import typealias Foundation.TimeInterval

public extension Promise {
/// Returns a `Promise` that is already resolved with the given result.
///
/// - Note: This initializer has been renamed to `init(with:)`.
/// - SeeAlso: `Promise.init(with:)`.
@available(*, deprecated, renamed: "init(with:)")
init(result: PromiseResult<Value,Error>) {
self.init(with: result)
}

/// Returns a `Promise` that resolves with the given result after a delay.
///
/// - Note: This initializer has been renamed to `init(on:with:after:)`.
/// - SeeAlso: `Promise.init(on:with:after:)`.
@available(*, deprecated, renamed: "init(on:with:after:)")
init(on context: PromiseContext = .auto, result: PromiseResult<Value,Error>, after delay: TimeInterval) {
self.init(on: context, with: result, after: delay)
Expand Down

0 comments on commit 11287fc

Please sign in to comment.