Creating timer dismissable notifications in VS Code

Notifications in Visual Studio Code are trivial for your extensions to notify the user when something happens or a process completes. A downside of these notifications is that they cannot be dismissed programmatically; they require manual user interaction.
As in my current extension, I wanted to be able to have a notification that can do the following:
Published on:
Learn more