Update tslint to v6
This commit is contained in:
@ -41,7 +41,7 @@ export interface ISectionOptions {
|
||||
readonly size?: IPageSizeAttributes;
|
||||
readonly margins?: IPageMarginAttributes;
|
||||
readonly properties?: SectionPropertiesOptions;
|
||||
readonly children: Array<Paragraph | Table | TableOfContents | HyperlinkRef>;
|
||||
readonly children: (Paragraph | Table | TableOfContents | HyperlinkRef)[];
|
||||
}
|
||||
|
||||
export class File {
|
||||
|
@ -2,7 +2,7 @@ import { Paragraph } from "./paragraph";
|
||||
import { Table } from "./table";
|
||||
|
||||
export interface IHeaderOptions {
|
||||
readonly children: Array<Paragraph | Table>;
|
||||
readonly children: (Paragraph | Table)[];
|
||||
}
|
||||
|
||||
export class Header {
|
||||
|
@ -8,10 +8,10 @@ import { ILevelsOptions } from "./level";
|
||||
import { ConcreteNumbering } from "./num";
|
||||
|
||||
export interface INumberingOptions {
|
||||
readonly config: Array<{
|
||||
readonly config: {
|
||||
readonly levels: ILevelsOptions[];
|
||||
readonly reference: string;
|
||||
}>;
|
||||
}[];
|
||||
}
|
||||
|
||||
export class Numbering extends XmlComponent {
|
||||
|
@ -10,9 +10,16 @@ import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run
|
||||
|
||||
export interface IParagraphOptions extends IParagraphPropertiesOptions {
|
||||
readonly text?: string;
|
||||
readonly children?: Array<
|
||||
TextRun | PictureRun | SymbolRun | Bookmark | PageBreak | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef
|
||||
>;
|
||||
readonly children?: (
|
||||
| TextRun
|
||||
| PictureRun
|
||||
| SymbolRun
|
||||
| Bookmark
|
||||
| PageBreak
|
||||
| SequentialIdentifier
|
||||
| FootnoteReferenceRun
|
||||
| HyperlinkRef
|
||||
)[];
|
||||
}
|
||||
|
||||
export class Paragraph extends XmlComponent {
|
||||
|
@ -30,11 +30,11 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp
|
||||
readonly heading?: HeadingLevel;
|
||||
readonly bidirectional?: boolean;
|
||||
readonly pageBreakBefore?: boolean;
|
||||
readonly tabStops?: Array<{
|
||||
readonly tabStops?: {
|
||||
readonly position: number | TabStopPosition;
|
||||
readonly type: TabStopType;
|
||||
readonly leader?: LeaderType;
|
||||
}>;
|
||||
}[];
|
||||
readonly style?: string;
|
||||
readonly bullet?: {
|
||||
readonly level: number;
|
||||
|
@ -10,7 +10,7 @@ import { IRunPropertiesOptions, RunProperties } from "./properties";
|
||||
import { Text } from "./run-components/text";
|
||||
|
||||
export interface IRunOptions extends IRunPropertiesOptions {
|
||||
readonly children?: Array<Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string>;
|
||||
readonly children?: (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
||||
readonly text?: string;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ export interface IStylesOptions {
|
||||
readonly initialStyles?: BaseXmlComponent;
|
||||
readonly paragraphStyles?: IParagraphStyleOptions[];
|
||||
readonly characterStyles?: ICharacterStyleOptions[];
|
||||
readonly importedStyles?: Array<XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent>;
|
||||
readonly importedStyles?: (XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent)[];
|
||||
}
|
||||
|
||||
export class Styles extends XmlComponent {
|
||||
|
@ -44,7 +44,7 @@ export interface ITableCellOptions {
|
||||
readonly color: string;
|
||||
};
|
||||
};
|
||||
readonly children: Array<Paragraph | Table>;
|
||||
readonly children: (Paragraph | Table)[];
|
||||
}
|
||||
|
||||
export class TableCell extends XmlComponent {
|
||||
|
@ -6,7 +6,7 @@ export const EMPTY_OBJECT = Object.seal({});
|
||||
|
||||
export abstract class XmlComponent extends BaseXmlComponent {
|
||||
// tslint:disable-next-line:readonly-keyword no-any
|
||||
protected root: Array<BaseXmlComponent | string | any>;
|
||||
protected root: (BaseXmlComponent | string | any)[];
|
||||
|
||||
constructor(rootKey: string) {
|
||||
super(rootKey);
|
||||
|
Reference in New Issue
Block a user