Skip to content

Commit

Permalink
Breaking: Renamed Throwable to ThrowableType to better reflect its pu…
Browse files Browse the repository at this point in the history
…rpose.
  • Loading branch information
RogWilco committed Sep 1, 2020
1 parent 6e8ccbb commit 3389b54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Represents a constructor of [[Error]] or one of its subclasses. Primarily
* used when specifying which type of error will be caught.
*/
export type Throwable = new () => Error
export type ThrowableType = new () => Error

/**
* A function containing the code to be executed as part of a try block.
Expand Down Expand Up @@ -161,7 +161,7 @@ export class Runner {
* @param t the type of error handled by the catch block
* @param callback the function to be executed as the catch block
*/
Catch (t: Throwable, callback: CatchBlock) {
Catch (t: ThrowableType, callback: CatchBlock) {
this.catches[t.name] = callback
return this
}
Expand Down

0 comments on commit 3389b54

Please sign in to comment.