I'm building a VSCode extension and I have an error message which pops up if my condition turns out true. I want the error message to disappear after for example 5 seconds.
I tried the following approach:
let count = 0
if (condition) {
setInterval(() => {
count++
}, 1000);
while (count <= 5) {
vscode.window.showErrorMessage(`Error!`);
}
}
But that didn't work..., How can I achieve this?
Thanks