Enable TS strict mode and fix all associated errors

This commit is contained in:
William Oldham
2024-03-15 18:49:12 +00:00
parent a884c785f0
commit 8ba0544468
9 changed files with 28 additions and 21 deletions

View File

@@ -14,6 +14,8 @@ type Response = BaseResponse<{
const handler: PlasmoMessaging.MessageHandler<BaseRequest, Response> = async (req, res) => {
try {
if (!req.sender?.tab?.url) throw new Error('No tab URL found in the request.');
const version = getVersion();
res.send({
success: true,
@@ -21,7 +23,7 @@ const handler: PlasmoMessaging.MessageHandler<BaseRequest, Response> = async (re
allowed: await isDomainWhitelisted(req.sender.tab.url),
hasPermission: await hasPermission(),
});
} catch (err) {
} catch (err: any) {
res.send({
success: false,
error: err.message,