PromiseLiteDebugger

public protocol PromiseLiteDebugger

Methods you can implement to observe promise lifecycle.

  • Tells the debugger that a promise gets initialized.

    Declaration

    Swift

    func promise(description: String, initAt date: Date)

    Parameters

    description

    A short text that describes the promise, cf. init.

    date

    The date when the promise’s init has been called.

  • Tells the debugger that a promise resolves.

    Declaration

    Swift

    func promise(description: String, resolvesAt date: Date)

    Parameters

    description

    A short text that describes the promise, cf. init.

    date

    The date when the promise’s resolve gets called.

  • Tells the debugger that a promise rejects.

    Declaration

    Swift

    func promise(description: String, rejectsAt date: Date, error: Error)

    Parameters

    description

    A short text that describes the promise, cf. init.

    date

    The date when the promise’s reject gets called.

    error

    The reason why the promise rejects.