EandrewJones commented on code in PR #466: URL: https://github.com/apache/flagon-useralejs/pull/466#discussion_r1662577565
########## src/types.d.ts: ########## @@ -154,7 +154,7 @@ export declare namespace Callbacks { export declare namespace Extension { export type PluginConfig = { urlWhitelist: string }; export type ConfigPayload = { - useraleConfig: Settings.Config; + useraleConfig: Settings.Config<Partial>; Review Comment: Is this supposed to be a partial over Settings.Config.... I've never seen this syntax. If so, shouldn't it be: ```ts Partial<Settings.Config> ``` ?? ########## test/unit/spec/main.html: ########## @@ -17,7 +17,7 @@ <!doctype html> <html> <head> - <script src="../build/userale-2.4.0.min.js"></script> + <script src="../../../build/userale-2.4.0.min.js"></script> Review Comment: We ought to remove version numbering from our build artifacts, otherwise every time we bump a version, all these tests break/go stale... ########## src/UserALEWebExtension/options.ts: ########## @@ -53,19 +53,17 @@ function setConfig() { }, }; - // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded - // to support chromium style MV2 callbacks - browser.storage.local.set(payload, () => { - userale.options(config); - browser.runtime.sendMessage({ type: MessageTypes.CONFIG_CHANGE, payload }); - }); + userale.options(config); + browser.runtime.sendMessage({ type: MessageTypes.CONFIG_CHANGE, payload }); } function getConfig() { // @ts-expect-error Typescript is not aware that firefox's broswer is overloaded // to support chromium style MV2 callbacks - browser.storage.local.get("useraleConfig", (res: Extension.ConfigPayload) => { - const config = res.useraleConfig; + browser.storage.local.get([configKey], (res) => { + const payload = res[configKey]; + console.log(payload); Review Comment: Leftovers? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For additional commands, e-mail: notifications-h...@flagon.apache.org