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,29 +1,29 @@
|
||||
import { Attributes, XmlComponent } from "@file/xml-components";
|
||||
import { hexColorValue } from "@util/values";
|
||||
|
||||
export enum UnderlineType {
|
||||
SINGLE = "single",
|
||||
WORDS = "words",
|
||||
DOUBLE = "double",
|
||||
THICK = "thick",
|
||||
DOTTED = "dotted",
|
||||
DOTTEDHEAVY = "dottedHeavy",
|
||||
DASH = "dash",
|
||||
DASHEDHEAVY = "dashedHeavy",
|
||||
DASHLONG = "dashLong",
|
||||
DASHLONGHEAVY = "dashLongHeavy",
|
||||
DOTDASH = "dotDash",
|
||||
DASHDOTHEAVY = "dashDotHeavy",
|
||||
DOTDOTDASH = "dotDotDash",
|
||||
DASHDOTDOTHEAVY = "dashDotDotHeavy",
|
||||
WAVE = "wave",
|
||||
WAVYHEAVY = "wavyHeavy",
|
||||
WAVYDOUBLE = "wavyDouble",
|
||||
NONE = "none",
|
||||
}
|
||||
export const UnderlineType = {
|
||||
SINGLE: "single",
|
||||
WORDS: "words",
|
||||
DOUBLE: "double",
|
||||
THICK: "thick",
|
||||
DOTTED: "dotted",
|
||||
DOTTEDHEAVY: "dottedHeavy",
|
||||
DASH: "dash",
|
||||
DASHEDHEAVY: "dashedHeavy",
|
||||
DASHLONG: "dashLong",
|
||||
DASHLONGHEAVY: "dashLongHeavy",
|
||||
DOTDASH: "dotDash",
|
||||
DASHDOTHEAVY: "dashDotHeavy",
|
||||
DOTDOTDASH: "dotDotDash",
|
||||
DASHDOTDOTHEAVY: "dashDotDotHeavy",
|
||||
WAVE: "wave",
|
||||
WAVYHEAVY: "wavyHeavy",
|
||||
WAVYDOUBLE: "wavyDouble",
|
||||
NONE: "none",
|
||||
} as const;
|
||||
|
||||
export class Underline extends XmlComponent {
|
||||
public constructor(underlineType: UnderlineType = UnderlineType.SINGLE, color?: string) {
|
||||
public constructor(underlineType: (typeof UnderlineType)[keyof typeof UnderlineType] = UnderlineType.SINGLE, color?: string) {
|
||||
super("w:u");
|
||||
this.root.push(
|
||||
new Attributes({
|
||||
|
Reference in New Issue
Block a user