Fix linting
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { XmlComponent, IXmlableObject } from "file/xml-components";
|
||||
import { SectionProperties, SectionPropertiesOptions } from "./section-properties/section-properties";
|
||||
import { IXmlableObject, XmlComponent } from "file/xml-components";
|
||||
import { Paragraph, ParagraphProperties } from "../..";
|
||||
import { SectionProperties, SectionPropertiesOptions } from "./section-properties/section-properties";
|
||||
|
||||
export class Body extends XmlComponent {
|
||||
private defaultSection: SectionProperties;
|
||||
@ -22,7 +22,7 @@ export class Body extends XmlComponent {
|
||||
* - last section should be direct child of body
|
||||
* @param section new section
|
||||
*/
|
||||
addSection(section: SectionPropertiesOptions | SectionProperties) {
|
||||
public addSection(section: SectionPropertiesOptions | SectionProperties): void {
|
||||
const currentSection = this.sections.pop() as SectionProperties;
|
||||
this.root.push(this.createSectionParagraph(currentSection));
|
||||
if (section instanceof SectionProperties) {
|
||||
@ -45,11 +45,11 @@ export class Body extends XmlComponent {
|
||||
this.root.push(component);
|
||||
}
|
||||
|
||||
get DefaultSection() {
|
||||
get DefaultSection(): SectionProperties {
|
||||
return this.defaultSection;
|
||||
}
|
||||
|
||||
private createSectionParagraph(section: SectionProperties) {
|
||||
private createSectionParagraph(section: SectionProperties): Paragraph {
|
||||
const paragraph = new Paragraph();
|
||||
const properties = new ParagraphProperties();
|
||||
properties.addChildElement(section);
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { FooterReferenceAttributes, FooterReferenceType } from "./footer-reference-attributes";
|
||||
|
||||
export interface FooterOptions {
|
||||
export interface IFooterOptions {
|
||||
footerType?: FooterReferenceType;
|
||||
footerId?: number;
|
||||
}
|
||||
|
||||
export class FooterReference extends XmlComponent {
|
||||
constructor(options: FooterOptions) {
|
||||
constructor(options: IFooterOptions) {
|
||||
super("w:footerReference");
|
||||
|
||||
this.root.push(
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { HeaderReferenceAttributes, HeaderReferenceType } from "./header-reference-attributes";
|
||||
|
||||
export interface HeaderOptions {
|
||||
export interface IHeaderOptions {
|
||||
headerType?: HeaderReferenceType;
|
||||
headerId?: number;
|
||||
}
|
||||
|
||||
export class HeaderReference extends XmlComponent {
|
||||
constructor(options: HeaderOptions) {
|
||||
constructor(options: IHeaderOptions) {
|
||||
super("w:headerReference");
|
||||
this.root.push(
|
||||
new HeaderReferenceAttributes({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { PageSizeAttributes, PageOrientation } from "./page-size-attributes";
|
||||
import { PageOrientation, PageSizeAttributes } from "./page-size-attributes";
|
||||
|
||||
export class PageSize extends XmlComponent {
|
||||
constructor(width: number, height: number, orientation: PageOrientation) {
|
||||
|
@ -5,8 +5,8 @@ import { Columns } from "./columns/columns";
|
||||
import { IColumnsAttributes } from "./columns/columns-attributes";
|
||||
import { DocumentGrid } from "./doc-grid/doc-grid";
|
||||
import { IDocGridAttributesProperties } from "./doc-grid/doc-grid-attributes";
|
||||
import { FooterOptions, FooterReference } from "./footer-reference/footer-reference";
|
||||
import { HeaderOptions, HeaderReference } from "./header-reference/header-reference";
|
||||
import { FooterReference, IFooterOptions } from "./footer-reference/footer-reference";
|
||||
import { HeaderReference, IHeaderOptions } from "./header-reference/header-reference";
|
||||
import { HeaderReferenceType } from "./header-reference/header-reference-attributes";
|
||||
import { PageMargin } from "./page-margin/page-margin";
|
||||
import { IPageMarginAttributes } from "./page-margin/page-margin-attributes";
|
||||
@ -18,8 +18,8 @@ export type SectionPropertiesOptions = IPageSizeAttributes &
|
||||
IPageMarginAttributes &
|
||||
IColumnsAttributes &
|
||||
IDocGridAttributesProperties &
|
||||
HeaderOptions &
|
||||
FooterOptions &
|
||||
IHeaderOptions &
|
||||
IFooterOptions &
|
||||
IPageNumberTypeAttributes;
|
||||
|
||||
export class SectionProperties extends XmlComponent {
|
||||
|
@ -71,7 +71,7 @@ export class Document extends XmlComponent {
|
||||
return run;
|
||||
}
|
||||
|
||||
get Body() {
|
||||
get Body(): Body {
|
||||
return this.body;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ export class Footer extends XmlComponent {
|
||||
);
|
||||
}
|
||||
|
||||
get referenceId() {
|
||||
public get referenceId(): number {
|
||||
return this.refId;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ export class Header extends XmlComponent {
|
||||
);
|
||||
}
|
||||
|
||||
get referenceId() {
|
||||
get referenceId(): number {
|
||||
return this.refId;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user