Rename locks to zones
This commit is contained in:
parent
8f0731d498
commit
7418a5c663
6 changed files with 317 additions and 321 deletions
22
ts/util/Zone.ts
Normal file
22
ts/util/Zone.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export type ZoneOptions = {
|
||||
readonly pendingSessions?: boolean;
|
||||
readonly pendingUnprocessed?: boolean;
|
||||
};
|
||||
|
||||
export class Zone {
|
||||
constructor(
|
||||
public readonly name: string,
|
||||
private readonly options: ZoneOptions = {}
|
||||
) {}
|
||||
|
||||
public supportsPendingSessions(): boolean {
|
||||
return this.options.pendingSessions === true;
|
||||
}
|
||||
|
||||
public supportsPendingUnprocessed(): boolean {
|
||||
return this.options.pendingUnprocessed === true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue