Some changes were required to get the type checking passing again:
Functions that return declarativeNetRequest rules with/without rule
IDs need to be more clearly annotated, so that it's clear to
typescript when a rule's ID is available.
Edge cases where getNextSessionRuleId() fails need to be handled
properly, adding rules with an undefined/null ID won't work.
The DNRRule type needed to be replaced with the
chrome.declarativeNetRequest.Rule rule type, and with that some
string type rule properties needed to be cast to the correct enum
types.
Some changes were required to get the type checking passing again:
See https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/#notable-behavioral-changes
Reviewer: @jonathanKingston
Description:
Steps to test this PR:
Automated tests:
Reviewer Checklist:
PR Author Checklist: