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:
Stepan Svechnikov
2023-12-22 10:25:00 +09:00
committed by GitHub
parent fd1ea5b4dc
commit a756a7697c
60 changed files with 790 additions and 666 deletions

View File

@ -44,7 +44,7 @@ export class Compiler {
this.numberingReplacer = new NumberingReplacer();
}
public compile(file: File, prettifyXml?: PrettifyType): JSZip {
public compile(file: File, prettifyXml?: (typeof PrettifyType)[keyof typeof PrettifyType]): JSZip {
const zip = new JSZip();
const xmlifiedFileMapping = this.xmlifyFile(file, prettifyXml);
const map = new Map<string, IXmlifyedFile | readonly IXmlifyedFile[]>(Object.entries(xmlifiedFileMapping));
@ -66,7 +66,7 @@ export class Compiler {
return zip;
}
private xmlifyFile(file: File, prettify?: PrettifyType): IXmlifyedFileMapping {
private xmlifyFile(file: File, prettify?: (typeof PrettifyType)[keyof typeof PrettifyType]): IXmlifyedFileMapping {
const documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1;
const documentXmlData = xml(