-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made XmlableObject non ambient typings to fix typescript problem
- Loading branch information
Showing
7 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { IXmlableObject } from "./xmlable-object"; | ||
|
||
export abstract class BaseXmlComponent { | ||
protected rootKey: string; | ||
|
||
constructor(rootKey: string) { | ||
this.rootKey = rootKey; | ||
} | ||
|
||
public abstract prepForXml(): XmlableObject; | ||
public abstract prepForXml(): IXmlableObject; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface IXmlableObject extends Object { | ||
_attr?: { [key: string]: (string | number | boolean) }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { BaseXmlComponent } from "../docx/xml-components"; | ||
import { IXmlableObject } from "../docx/xml-components/xmlable-object"; | ||
|
||
export class Formatter { | ||
public format(input: BaseXmlComponent): XmlableObject { | ||
public format(input: BaseXmlComponent): IXmlableObject { | ||
return input.prepForXml(); | ||
} | ||
} |