@@ -31,13 +31,13 @@ export type CellProps = Omit<TableCellProperties, 'width'>;
31
31
* quietly fix that for you if you don't have a paragraph there already.
32
32
*/
33
33
export class Cell extends Component < CellProps , CellChild > {
34
- public static readonly children : string [ ] = [
34
+ public static override readonly children : string [ ] = [
35
35
'Paragraph' ,
36
36
'Table' ,
37
37
'BookmarkRangeStart' ,
38
38
'BookmarkRangeEnd' ,
39
39
] ;
40
- public static readonly mixed : boolean = false ;
40
+ public static override readonly mixed : boolean = false ;
41
41
42
42
public constructor ( cellProps : CellProps , ...cellChild : CellChild [ ] ) {
43
43
// Ensure that properties of type `number` are not `NaN`.
@@ -48,7 +48,7 @@ export class Cell extends Component<CellProps, CellChild> {
48
48
/**
49
49
* Creates an XML DOM node for this component instance.
50
50
*/
51
- public async toNode ( ancestry : ComponentAncestor [ ] ) : Promise < Node > {
51
+ public override async toNode ( ancestry : ComponentAncestor [ ] ) : Promise < Node > {
52
52
const table = ancestry . find ( ( ancestor ) : ancestor is Table => ancestor instanceof Table ) ;
53
53
if ( ! table ) {
54
54
throw new Error ( 'A cell cannot be rendered outside the context of a table' ) ;
@@ -147,14 +147,14 @@ export class Cell extends Component<CellProps, CellChild> {
147
147
/**
148
148
* Asserts whether or not a given XML node correlates with this component.
149
149
*/
150
- static matchesNode ( node : Node ) : boolean {
150
+ static override matchesNode ( node : Node ) : boolean {
151
151
return node . nodeName === 'w:tc' ;
152
152
}
153
153
154
154
/**
155
155
* Instantiate this component from the XML in an existing DOCX file.
156
156
*/
157
- static fromNode ( node : Node , context : ComponentContext ) : null | Cell {
157
+ static override fromNode ( node : Node , context : ComponentContext ) : null | Cell {
158
158
const { mergedAway, children, ...props } = evaluateXPathToMap <
159
159
CellProps & { mergedAway : boolean ; children : Node [ ] }
160
160
> (
0 commit comments