aboutsummaryrefslogtreecommitdiff
path: root/types/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-19 00:33:38 -0500
committerGitHub <noreply@github.com>2023-12-19 05:33:38 +0000
commit1ced9aafc00c10992bab8bd3f1b6b1397f05b7b9 (patch)
tree305bb2b3bfc7fc3b051ee1cd3d1c35f442af0de4 /types/ext
parent5f96276fda93dcad39f2165fd3c8d890aa5f9be5 (diff)
Make JSON.parse usage safer (#373)
* Make JSON.parse usage safer * Fix any type * Add readResponseJson * Use readResponseJson * Additional updates * Rename files * Add types
Diffstat (limited to 'types/ext')
-rw-r--r--types/ext/api.d.ts2
-rw-r--r--types/ext/audio-downloader.d.ts10
-rw-r--r--types/ext/cross-frame-api.d.ts13
3 files changed, 24 insertions, 1 deletions
diff --git a/types/ext/api.d.ts b/types/ext/api.d.ts
index 6b7b4b19..2d78cc06 100644
--- a/types/ext/api.d.ts
+++ b/types/ext/api.d.ts
@@ -467,6 +467,6 @@ export type RequestBackendReadySignalResult = boolean;
export type CreateActionPortDetails = Record<string, never>;
export type CreateActionPortResult = {
- name: string;
+ name: 'action-port';
id: string;
};
diff --git a/types/ext/audio-downloader.d.ts b/types/ext/audio-downloader.d.ts
index b8e812f8..dfda8cb9 100644
--- a/types/ext/audio-downloader.d.ts
+++ b/types/ext/audio-downloader.d.ts
@@ -42,3 +42,13 @@ export type AudioBinaryBase64 = {
data: string;
contentType: string | null;
};
+
+export type CustomAudioList = {
+ type: 'audioSourceList';
+ audioSources: CustomAudioListSource[];
+};
+
+export type CustomAudioListSource = {
+ url: string;
+ name?: string;
+};
diff --git a/types/ext/cross-frame-api.d.ts b/types/ext/cross-frame-api.d.ts
index 88ce59a7..e31079b7 100644
--- a/types/ext/cross-frame-api.d.ts
+++ b/types/ext/cross-frame-api.d.ts
@@ -52,3 +52,16 @@ export type Invocation = {
ack: boolean;
timer: Core.Timeout | null;
};
+
+export type PortDetails = CrossFrameCommunicationPortDetails | ActionPortDetails;
+
+export type CrossFrameCommunicationPortDetails = {
+ name: 'cross-frame-communication-port';
+ otherTabId: number;
+ otherFrameId: number;
+};
+
+export type ActionPortDetails = {
+ name: 'action-port';
+ id: string;
+};