5b48ae99f4
BREAKING CHANGE: Rename `defineBackgroundScript` to `defineBackground`. Update your background entrypoints
13 lines
430 B
TypeScript
13 lines
430 B
TypeScript
import { BackgroundScriptDefintition } from '..';
|
|
|
|
export function defineBackground(main: () => void): BackgroundScriptDefintition;
|
|
export function defineBackground(
|
|
definition: BackgroundScriptDefintition,
|
|
): BackgroundScriptDefintition;
|
|
export function defineBackground(
|
|
arg: (() => void) | BackgroundScriptDefintition,
|
|
): BackgroundScriptDefintition {
|
|
if (typeof arg === 'function') return { main: arg };
|
|
return arg;
|
|
}
|