mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Augment typing in DefaultMap to admit use by autocontainer code
This commit is contained in:
parent
5c7ae5331f
commit
0582e4fb5e
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ import Logger from "@src/lib/logging"
|
|||
|
||||
const logger = new Logger("requests")
|
||||
|
||||
class DefaultMap extends Map {
|
||||
class DefaultMap<K,V> extends Map<K,V> {
|
||||
constructor(private defaultFactory, ...args) {
|
||||
// super(...args)
|
||||
super()
|
||||
|
@ -36,7 +36,7 @@ export function clobberCSP(response) {
|
|||
)
|
||||
|
||||
if (cspHeader !== undefined) {
|
||||
const policy = new DefaultMap(
|
||||
const policy = new DefaultMap<string, Set<string>>(
|
||||
() => new Set(),
|
||||
csp.parse(cspHeader.value),
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue