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
@ -2,14 +2,14 @@
|
||||
import { Attributes, XmlComponent } from "@file/xml-components";
|
||||
import { Run } from "../run";
|
||||
|
||||
enum BreakType {
|
||||
COLUMN = "column",
|
||||
PAGE = "page",
|
||||
const BreakType = {
|
||||
COLUMN: "column",
|
||||
PAGE: "page",
|
||||
// textWrapping breaks are the default and already exposed via the "Run" class
|
||||
}
|
||||
} as const;
|
||||
|
||||
class Break extends XmlComponent {
|
||||
public constructor(type: BreakType) {
|
||||
public constructor(type: (typeof BreakType)[keyof typeof BreakType]) {
|
||||
super("w:br");
|
||||
this.root.push(
|
||||
new Attributes({
|
||||
|
Reference in New Issue
Block a user