chore: standardize tsconfig (#9568)

This commit is contained in:
forehalo
2025-01-08 04:07:56 +00:00
parent 39f4b17315
commit c0ed74dfed
151 changed files with 1041 additions and 1566 deletions

View File

@@ -9,11 +9,14 @@ import {
WebContentViewsManager,
} from './tab-views';
export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
export const showTabContextMenu = async (
tabId: string,
viewIndex: number
): Promise<TabAction | null> => {
const workbenches = WebContentViewsManager.instance.tabViewsMeta.workbenches;
const tabMeta = workbenches.find(w => w.id === tabId);
if (!tabMeta) {
return;
return null;
}
const { resolve, promise } = Promise.withResolvers<TabAction | null>();
@@ -93,7 +96,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
];
const menu = Menu.buildFromTemplate(template);
menu.popup();
// eslint-disable-next-line prefer-const
let unsub: (() => void) | undefined;
const subscription = WebContentViewsManager.instance.tabAction$.subscribe(
action => {