This commit is contained in:
Erik 2023-08-16 14:11:05 +03:00
parent f4f7e66c31
commit 91ecd33db4
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68

View File

@ -92,7 +92,7 @@ class CommandOption implements ICommandOption {
clone (rawValue?: string[], resolver?: IResolver): CommandOption { clone (rawValue?: string[], resolver?: IResolver): CommandOption {
// Call own constructor, important to do it like this in order to preserve any potentially extended classes // 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 // 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.rawValue = rawValue;
opt.resolver = resolver; opt.resolver = resolver;
return opt; return opt;