mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 13:13:22 +00:00
PM-22143 Refactor TS enums to be const objects (Send specific enums) (#16399)
This commit is contained in:
@@ -25,13 +25,16 @@ import { SearchBarService } from "../../layout/search/search-bar.service";
|
||||
|
||||
import { AddEditComponent } from "./add-edit.component";
|
||||
|
||||
// FIXME: update to use a const object instead of a typescript enum
|
||||
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||
enum Action {
|
||||
None = "",
|
||||
Add = "add",
|
||||
Edit = "edit",
|
||||
}
|
||||
const Action = Object.freeze({
|
||||
/** No action is currently active. */
|
||||
None: "",
|
||||
/** The user is adding a new Send. */
|
||||
Add: "add",
|
||||
/** The user is editing an existing Send. */
|
||||
Edit: "edit",
|
||||
} as const);
|
||||
|
||||
type Action = (typeof Action)[keyof typeof Action];
|
||||
|
||||
const BroadcasterSubscriptionId = "SendComponent";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user