From 534aed7f7cd700cc83a9d61f928bba6628e05c86 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 31 Jul 2021 13:58:38 -0400 Subject: throw error objects instead of strings --- src/lib/models/Level.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/lib/models/Level.ts') diff --git a/src/lib/models/Level.ts b/src/lib/models/Level.ts index d8b98bf..309e6e6 100644 --- a/src/lib/models/Level.ts +++ b/src/lib/models/Level.ts @@ -19,25 +19,31 @@ export class Level extends BaseModel { * The user's id. */ public get user(): Snowflake { - return null; + throw new Error('This should never be executed'); + } + public set user(_: Snowflake) { + throw new Error('This should never be executed'); } - public set user(value: Snowflake) {} /** * The guild where the user is gaining xp. */ public get guild(): Snowflake { - return null; + throw new Error('This should never be executed'); + } + public set guild(_: Snowflake) { + throw new Error('This should never be executed'); } - public set guild(value: Snowflake) {} /** * The user's xp. */ public get xp(): number { - return null; + throw new Error('This should never be executed'); + } + public set xp(_: number) { + throw new Error('This should never be executed'); } - public set xp(value: number) {} public get level(): number { return Level.convertXpToLevel(this.xp); -- cgit