Close notification in TabContext with given tabId and MSITabId

Here's a Typescript example:

const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');
const tabContext: ITabContext = await frameworkProvider.getTabContext('browserTabId','msiTabId');
    let notificationContext: INotificationContext = await tabContext.getNotificationContext('notificationId007'); 
    const requestObject: IOperationRequest = frameworkProvider.requestHelper.createPublishRequest('CloseNotification') as IOperationRequest; 
    notificationContext.publish(requestObject).then((message) => {
        const response = message as INotificationOperationResponse;         
        //custom code   
    });
Here's a JavaScript example:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');   
const tabContext = await frameworkProvider.getTabContext('browserTabId','msiTabId');  
    let notificationContext = await tabContext.getNotificationContext('notificationId007'); 
    const requestObject = frameworkProvider.requestHelper.createPublishRequest('CloseNotification');     
    notificationContext.publish(requestObject).then((resp) => {
        //custom code
    }).catch((err) => {
        //custom code
    });