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;