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,8 +1,8 @@
|
||||
import { IgnoreIfEmptyXmlComponent } from "@file/xml-components";
|
||||
import { TableWidthElement, WidthType } from "../table-width";
|
||||
import { TableWidthElement, WidthType } from "@file/table";
|
||||
|
||||
export interface ITableCellMarginOptions {
|
||||
readonly marginUnitType?: WidthType;
|
||||
readonly marginUnitType?: (typeof WidthType)[keyof typeof WidthType];
|
||||
readonly top?: number;
|
||||
readonly bottom?: number;
|
||||
readonly left?: number;
|
||||
@ -33,14 +33,15 @@ export interface ITableCellMarginOptions {
|
||||
// </xsd:sequence>
|
||||
// </xsd:complexType>
|
||||
|
||||
export enum TableCellMarginElementType {
|
||||
TABLE = "w:tblCellMar",
|
||||
TABLE_CELL = "w:tcMar",
|
||||
}
|
||||
export const TableCellMarginElementType = {
|
||||
TABLE: "w:tblCellMar",
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
TABLE_CELL: "w:tcMar",
|
||||
} as const;
|
||||
|
||||
export class TableCellMargin extends IgnoreIfEmptyXmlComponent {
|
||||
public constructor(
|
||||
type: TableCellMarginElementType,
|
||||
type: (typeof TableCellMarginElementType)[keyof typeof TableCellMarginElementType],
|
||||
{ marginUnitType = WidthType.DXA, top, left, bottom, right }: ITableCellMarginOptions,
|
||||
) {
|
||||
super(type);
|
||||
|
Reference in New Issue
Block a user