Skip to main content
Defined in: gates/accessList.ts:115 A set of opaque ids with change notifications. Used as bot.blacklist; the Whitelist subclass adds the enable/disable switch.

Extended by

Constructors

Constructor

Defined in: gates/accessList.ts:119

Parameters

Returns

AccessList

Properties

name

Defined in: gates/accessList.ts:119

Methods

add()

Defined in: gates/accessList.ts:122 Add one id or many. Duplicates are ignored. Throws TypeError on an empty/non-string id.

Parameters

Returns

this

remove()

Defined in: gates/accessList.ts:134 Remove one id or many. Unknown ids are ignored. Throws TypeError on an empty/non-string id.

Parameters

Returns

this

has()

Defined in: gates/accessList.ts:144 Is id on the list? Exact, case-sensitive match. Never throws.

Parameters

Returns

boolean

list()

Defined in: gates/accessList.ts:149 The ids on the list, in insertion order (a copy).

Returns

string[]

clear()

Defined in: gates/accessList.ts:159 Remove every id.

Returns

this

load()

Defined in: gates/accessList.ts:171 Replace the contents with a snapshot from export (or a bare id array). Always notifies onChange listeners with action 'load'.

Parameters

Returns

this

export()

Defined in: gates/accessList.ts:180 JSON-serializable snapshot for host-side persistence.

Returns

AccessListSnapshot

onChange()

Defined in: gates/accessList.ts:188 Subscribe to effective mutations (no-op calls do not notify). Returns an unsubscriber. A throwing listener never breaks the mutation that triggered it.

Parameters

Returns

() => void

Accessors

size

Get Signature

Defined in: gates/accessList.ts:154 Number of ids on the list.
Returns
number