UNPKG

@stolbivi/pirojok

Version:

Some minimalistic library used to build chrome extensions, covers some popular Chrome Extension API

19 lines (18 loc) 608 B
/// <reference types="chrome" /> import Tab = chrome.tabs.Tab; /** * A utility class for interacting with Chrome browser tabs. * Provides methods to query and work with the current tab and all tabs. */ export declare class Tabs { /** * Retrieves the currently active tab in the current window. * @returns A promise that resolves to the current tab or null if no tab is found. */ withCurrentTab(): Promise<Tab | null>; /** * Retrieves all tabs across all windows. * @returns A promise that resolves to an array of all tabs. */ withAllTabs(): Promise<Tab[]>; }