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
@ -5,10 +5,10 @@ import { uniqueId } from "@util/convenience-functions";
|
||||
import { ParagraphChild } from "../paragraph";
|
||||
import { HyperlinkAttributes, IHyperlinkAttributesProperties } from "./hyperlink-attributes";
|
||||
|
||||
export enum HyperlinkType {
|
||||
INTERNAL = "INTERNAL",
|
||||
EXTERNAL = "EXTERNAL",
|
||||
}
|
||||
export const HyperlinkType = {
|
||||
INTERNAL: "INTERNAL",
|
||||
EXTERNAL: "EXTERNAL",
|
||||
} as const;
|
||||
|
||||
export class ConcreteHyperlink extends XmlComponent {
|
||||
public readonly linkId: string;
|
||||
@ -39,7 +39,12 @@ export class InternalHyperlink extends ConcreteHyperlink {
|
||||
}
|
||||
|
||||
export class ExternalHyperlink extends XmlComponent {
|
||||
public constructor(public readonly options: { readonly children: readonly ParagraphChild[]; readonly link: string }) {
|
||||
public constructor(
|
||||
public readonly options: {
|
||||
readonly children: readonly ParagraphChild[];
|
||||
readonly link: string;
|
||||
},
|
||||
) {
|
||||
super("w:externalHyperlink");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user