How to programmatically close vscode.window's showInformationMessage box
<p>I just began learning about vscode extensions and I'm wondering if there is a simple way to programmatically close the information message box that is generated via <code>vscode.window.showInformationMessage()</code>.  If you want to reproduce, I started with the <a href="https://code.visualstudio.com/docs/extensions/example-word-count" rel="noreferrer">WordCount demo here</a>, and after copy/pasting the body of <code>extension.ts</code>, as outlined in the tutorial, I made some modifications to <code>activate()</code> like so...</p>

<pre><code>export function activate(context: ExtensionContext) {
    let wordCounter = new WordCounter();
    let wcTimeout = null;
    let setWCTimeout = function() {
        clearWCTimeout();
        wcTimeout = setTimeout(clearWCTimeout, 1000);
    };
    let clearWCTimeout = function() {
        if (wcTimeout !== null) {
            clearTimeout(wcTimeout);
            wcTimeout = null;
            // clear/hide the message box here, but how?
        }
    };

    let disposable = commands.registerCommand('extension.sayHello', () =&gt; {
        wordCounter.updateWordCount();
        setWCTimeout();
        vscode.window
            .showInformationMessage(wordCounter._getWordCount(window.activeTextEditor.document).toString())
            .then(clearWCTimeout);
    });

    // Add to a list of disposables which are disposed when this extension is deactivated.
    context.subscriptions.push(wordCounter);
    context.subscriptions.push(wcTimeout);
    context.subscriptions.push(disposable);
}   
</code></pre>

<p>What I've tried, or considered:</p>

<ul>
<li>calling <code>vscode.window.showInformationMessage()</code> with both <code>null</code> and empty string - does nothing, anything besides <code>null</code>|empty string results in a new information message box appearing</li>
<li>disposing of the command - didn't really have any reason to think this would work, and the command has to be re-registered before it will work again of course</li>
<li>tried to access the DOM to simply find the "Close" button and trigger a click on it - but no luck finding any kind of entry point for manipulating the DOM</li>
</ul>

<hr>

<p>Side note: I <em>am</em> interested in best practices within this paradigm.  For instance, is there a popular node lib that wraps js timers that I might want to consider using?  However, that is not my primary concern with this post.  If you're going to comment on the delay mechanism (<code>setTimeout()/clearTimeout()</code>), please make it constructive in terms of what is best practice within this environment/paradigm (beyond "that's ugly", or "that's not how [you would personally] do it).  </p>