Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(management): use stricter typing for launchType
  • Loading branch information
addon-stack committed Oct 10, 2025
commit 9f55dc703e9c829fc5870181d4f09548cc4dba7f
2 changes: 1 addition & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {handleListener} from "./utils";
type Action = typeof chrome.action;
type BrowserAction = typeof chrome.browserAction;

type ColorArray = chrome.action.ColorArray;
type ColorArray = chrome.extensionTypes.ColorArray;
type TabIconDetails = chrome.action.TabIconDetails;
type UserSettings = chrome.action.UserSettings;
type Color = string | ColorArray;
Expand Down
3 changes: 2 additions & 1 deletion src/management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {throwRuntimeError} from "./runtime";
import {handleListener} from "./utils";

type ExtensionInfo = chrome.management.ExtensionInfo;
type LaunchType = chrome.management.LaunchType;

const management = () => browser().management;

Expand Down Expand Up @@ -124,7 +125,7 @@ export const setExtensionEnabled = async (id: string, enabled: boolean): Promise
});
});

export const setExtensionLaunchType = async (id: string, launchType: string): Promise<void> =>
export const setExtensionLaunchType = async (id: string, launchType: `${LaunchType}`): Promise<void> =>
new Promise<void>((resolve, reject) => {
management().setLaunchType(id, launchType, () => {
try {
Expand Down