aboutsummaryrefslogtreecommitdiff
path: root/ext/js/comm/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-28 00:48:33 -0500
committerGitHub <noreply@github.com>2023-12-28 05:48:33 +0000
commit76805bc0fc65452ca830623aa810888f9c476a2b (patch)
treed91e257fd335c75dfca1a37784eb12769fbb5a66 /ext/js/comm/api.js
parentfc2123a45b3ceacc2ec887d24e5e752dca59bb4f (diff)
API type safety updates (#457)
* Update message handlers in SearchDisplayController * Update types * Updates * Updates * Simplify * Updates * Updates * Rename * Improve types * Improve types * Resolve TODOs
Diffstat (limited to 'ext/js/comm/api.js')
-rw-r--r--ext/js/comm/api.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/js/comm/api.js b/ext/js/comm/api.js
index c2351538..423115f1 100644
--- a/ext/js/comm/api.js
+++ b/ext/js/comm/api.js
@@ -156,21 +156,19 @@ export class API {
/**
* @param {import('api').ApiParam<'sendMessageToFrame', 'frameId'>} frameId
- * @param {import('api').ApiParam<'sendMessageToFrame', 'action'>} action
- * @param {import('api').ApiParam<'sendMessageToFrame', 'params'>} [params]
+ * @param {import('api').ApiParam<'sendMessageToFrame', 'message'>} message
* @returns {Promise<import('api').ApiReturn<'sendMessageToFrame'>>}
*/
- sendMessageToFrame(frameId, action, params) {
- return this._invoke('sendMessageToFrame', {frameId, action, params});
+ sendMessageToFrame(frameId, message) {
+ return this._invoke('sendMessageToFrame', {frameId, message});
}
/**
- * @param {import('api').ApiParam<'broadcastTab', 'action'>} action
- * @param {import('api').ApiParam<'broadcastTab', 'params'>} params
+ * @param {import('api').ApiParam<'broadcastTab', 'message'>} message
* @returns {Promise<import('api').ApiReturn<'broadcastTab'>>}
*/
- broadcastTab(action, params) {
- return this._invoke('broadcastTab', {action, params});
+ broadcastTab(message) {
+ return this._invoke('broadcastTab', {message});
}
/**