From 97bc188ca6beb2057ab734e791b1afe96b6e4650 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 3 Dec 2023 11:15:50 -0500 Subject: Remove unused types --- types/ext/anki-templates.d.ts | 6 ------ types/ext/backend.d.ts | 33 -------------------------------- types/ext/event-listener-collection.d.ts | 6 ------ types/ext/offscreen.d.ts | 2 -- types/ext/request-builder.d.ts | 5 ----- types/ext/settings.d.ts | 2 -- 6 files changed, 54 deletions(-) (limited to 'types/ext') diff --git a/types/ext/anki-templates.d.ts b/types/ext/anki-templates.d.ts index c7e49905..5c40f406 100644 --- a/types/ext/anki-templates.d.ts +++ b/types/ext/anki-templates.d.ts @@ -47,12 +47,6 @@ export type MediaSimpleType = ( 'selectionText' ); -export type MediaType = ( - MediaSimpleType | - 'textFurigana' | - 'dictionaryMedia' -); - export type TextFuriganaSegment = { text: string; readingMode: TextFuriganaReadingMode; diff --git a/types/ext/backend.d.ts b/types/ext/backend.d.ts index 5f1bd83d..08cbf4b0 100644 --- a/types/ext/backend.d.ts +++ b/types/ext/backend.d.ts @@ -47,39 +47,6 @@ export type TabInfo = { url: string | null; }; -export type SettingModification = SettingModificationSet | SettingModificationDelete | SettingModificationSwap | SettingModificationSplice | SettingModificationPush; - -export type SettingModificationSet = { - action: 'set'; - path: string; - value: unknown; -}; - -export type SettingModificationDelete = { - action: 'delete'; - path: string; -}; - -export type SettingModificationSwap = { - action: 'swap'; - path1: string; - path2: string; -}; - -export type SettingModificationSplice = { - action: 'splice'; - path: string; - start: number; - deleteCount: number; - items: unknown[]; -}; - -export type SettingModificationPush = { - action: 'push'; - path: string; - items: unknown[]; -}; - export type FindTabsPredicate = (tabInfo: TabInfo) => boolean | Promise; export type InvokeWithProgressRequestMessage = ( diff --git a/types/ext/event-listener-collection.d.ts b/types/ext/event-listener-collection.d.ts index f22d6bcc..eee05658 100644 --- a/types/ext/event-listener-collection.d.ts +++ b/types/ext/event-listener-collection.d.ts @@ -69,12 +69,6 @@ export type AddEventListenerArgs = [ options?: AddEventListenerOptions | boolean, ]; -export type AddListenerArgs = [ - target: ExtensionEvent, - callback: TCallback, - ...args: TArgs[], -]; - export type OnArgs = [ target: EventDispatcher, eventName: string, diff --git a/types/ext/offscreen.d.ts b/types/ext/offscreen.d.ts index ddf7eadc..85bce1ff 100644 --- a/types/ext/offscreen.d.ts +++ b/types/ext/offscreen.d.ts @@ -24,8 +24,6 @@ import type * as Environment from './environment'; import type * as Translation from './translation'; import type * as Translator from './translator'; -export type MessageAny2 = Message; - export type Message = ( MessageDetailsMap[T] extends undefined ? {action: T} : diff --git a/types/ext/request-builder.d.ts b/types/ext/request-builder.d.ts index 8f375754..b231bcd7 100644 --- a/types/ext/request-builder.d.ts +++ b/types/ext/request-builder.d.ts @@ -15,9 +15,4 @@ * along with this program. If not, see . */ -export type FetchEventListeners = { - onBeforeSendHeaders: ((details: chrome.webRequest.WebRequestHeadersDetails) => (chrome.webRequest.BlockingResponse | void)) | null; - onErrorOccurred: ((details: chrome.webRequest.WebResponseErrorDetails) => void) | null; -}; - export type ProgressCallback = (complete: boolean) => void; diff --git a/types/ext/settings.d.ts b/types/ext/settings.d.ts index 19c4aa1f..8ce82b28 100644 --- a/types/ext/settings.d.ts +++ b/types/ext/settings.d.ts @@ -283,8 +283,6 @@ export type AnkiOptions = { downloadTimeout: number; }; -export type AnkiCardType = 'terms' | 'kanji'; - export type AnkiScreenshotOptions = { format: AnkiScreenshotFormat; quality: number; -- cgit v1.2.3