Change all project enums to objects with as const (#2445)
* feat: change all enums to as const objects * Add word to dictionary --------- Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
fd1ea5b4dc
commit
a756a7697c
@ -1,12 +1,15 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
|
||||
enum FieldCharacterType {
|
||||
BEGIN = "begin",
|
||||
END = "end",
|
||||
SEPARATE = "separate",
|
||||
}
|
||||
const FieldCharacterType = {
|
||||
BEGIN: "begin",
|
||||
END: "end",
|
||||
SEPARATE: "separate",
|
||||
} as const;
|
||||
|
||||
class FidCharAttrs extends XmlAttributeComponent<{ readonly type: FieldCharacterType; readonly dirty?: boolean }> {
|
||||
class FidCharAttrs extends XmlAttributeComponent<{
|
||||
readonly type: (typeof FieldCharacterType)[keyof typeof FieldCharacterType];
|
||||
readonly dirty?: boolean;
|
||||
}> {
|
||||
protected readonly xmlKeys = { type: "w:fldCharType", dirty: "w:dirty" };
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user