chore(types): strongly type BackgroundScriptContainer et al

This commit is contained in:
Max Baumann
2020-12-13 20:48:09 +01:00
parent d80dad7963
commit dde6b44005
3 changed files with 25 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
import * as CompileConfig from "../config.json";
import Config from "./config";
import { Registration } from "./types";
// Make the config public for debugging purposes
(<any> window).SB = Config;
@@ -90,7 +91,7 @@ chrome.runtime.onInstalled.addListener(function (object) {
*
* @param {JSON} options
*/
function registerFirefoxContentScript(options) {
function registerFirefoxContentScript(options: Registration) {
const oldRegistration = contentScriptRegistrations[options.id];
if (oldRegistration) oldRegistration.unregister();