From 3389b549519c67680221e1c44aeaa64e1d70ba3e Mon Sep 17 00:00:00 2001 From: Nick Williams Date: Mon, 31 Aug 2020 23:05:03 -0700 Subject: [PATCH] Breaking: Renamed Throwable to ThrowableType to better reflect its purpose. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4833b83..7416097 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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. @@ -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 }