From 91ecd33db4992c0fe73a1f4aa8b8c9d8c80d5419 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 16 Aug 2023 14:11:05 +0300 Subject: [PATCH] bugfix --- src/classes/CommandOption.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/CommandOption.ts b/src/classes/CommandOption.ts index b8a34ae..fc5e95e 100644 --- a/src/classes/CommandOption.ts +++ b/src/classes/CommandOption.ts @@ -92,7 +92,7 @@ class CommandOption implements ICommandOption { clone (rawValue?: string[], resolver?: IResolver): CommandOption { // Call own constructor, important to do it like this in order to preserve any potentially extended classes // eslint-disable-next-line new-parens, no-extra-parens - const opt = new (this.constructor(this) as new () => typeof this); + const opt = new (this.constructor as new (toClone: typeof this) => typeof this)(this); opt.rawValue = rawValue; opt.resolver = resolver; return opt;