UNPKG

rollup-plugin-chrome-extension

Version:

Build Chrome Extensions with this Rollup plugin.

9 lines (8 loc) 792 B
/// <reference types="chrome" /> import { Unpacked } from './helpers'; export type ManifestV2 = Omit<chrome.runtime.ManifestV2, 'name' | 'description' | 'version'> & Partial<Pick<chrome.runtime.ManifestV2, 'name' | 'description' | 'version'>>; export type ManifestV3 = Omit<chrome.runtime.ManifestV3, 'name' | 'description' | 'version'> & Partial<Pick<chrome.runtime.ManifestV3, 'name' | 'description' | 'version'>>; export type ContentScript = Unpacked<chrome.runtime.Manifest['content_scripts']>; export type WebAccessibleResource = Unpacked<chrome.runtime.ManifestV3['web_accessible_resources']>; export declare function isMV2(m?: chrome.runtime.ManifestBase): m is chrome.runtime.ManifestV2; export declare function isMV3(m?: chrome.runtime.ManifestBase): m is chrome.runtime.ManifestV3;