mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
PM-22143 Refactor TS enums to be const objects (Send specific enums) (#16399)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
// FIXME: update to use a const object instead of a typescript enum
|
||||
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||
export enum SendType {
|
||||
Text = 0,
|
||||
File = 1,
|
||||
}
|
||||
/** A type of Send. */
|
||||
export const SendType = Object.freeze({
|
||||
/** Send contains plain text. */
|
||||
Text: 0,
|
||||
/** Send contains a file. */
|
||||
File: 1,
|
||||
} as const);
|
||||
|
||||
/** A type of Send. */
|
||||
export type SendType = (typeof SendType)[keyof typeof SendType];
|
||||
|
||||
Reference in New Issue
Block a user