Right Now I'm using this function to update some timeouts without having to pass the callbacks.
private _changeTimeout(timeout: NodeJS.Timeout, at: milliseconds): NodeJS.Timeout {
// @ts-expect-error
const timeout = setTimeout(timeout._onTimeout, at);
clearTimeout(timeout);
return timeout;
}
Is there a better way, without having to use a private variable that forces me to use // @ts-expect-error?