From 9ce2c56c342970d630d389917f770af7d38919ec Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 5 Jan 2023 19:10:40 -0800 Subject: [PATCH] Fix compilation. --- .../mindplot/src/components/export/FreemindExporter.ts | 8 ++++---- packages/mindplot/src/components/model/INodeModel.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mindplot/src/components/export/FreemindExporter.ts b/packages/mindplot/src/components/export/FreemindExporter.ts index 4c71b55f..cddfe5e6 100644 --- a/packages/mindplot/src/components/export/FreemindExporter.ts +++ b/packages/mindplot/src/components/export/FreemindExporter.ts @@ -254,11 +254,11 @@ class FreemindExporter extends Exporter { } private addFontNode(freemindNode: FreeminNode, mindmapTopic: INodeModel): void { - const fontFamily: string = mindmapTopic.getFontFamily(); - const fontSize: number = mindmapTopic.getFontSize(); - const fontColor: string = mindmapTopic.getFontColor(); + const fontFamily: string | undefined = mindmapTopic.getFontFamily(); + const fontSize: number | undefined = mindmapTopic.getFontSize(); + const fontColor: string | undefined = mindmapTopic.getFontColor(); const fontWeigth: string | number | boolean | undefined = mindmapTopic.getFontWeight(); - const fontStyle: string = mindmapTopic.getFontStyle(); + const fontStyle: string | undefined = mindmapTopic.getFontStyle(); if (fontFamily || fontSize || fontColor || fontWeigth || fontStyle) { const font: Font = this.objectFactory.createFont(); diff --git a/packages/mindplot/src/components/model/INodeModel.ts b/packages/mindplot/src/components/model/INodeModel.ts index 8fcca1c8..04e5c2c7 100644 --- a/packages/mindplot/src/components/model/INodeModel.ts +++ b/packages/mindplot/src/components/model/INodeModel.ts @@ -159,7 +159,7 @@ abstract class INodeModel { this.putProperty('fontFamily', fontFamily); } - getFontFamily(): string { + getFontFamily(): string | undefined { return this.getProperty('fontFamily') as string; } @@ -167,11 +167,11 @@ abstract class INodeModel { this.putProperty('fontStyle', fontStyle); } - getFontStyle(): FontStyleType { + getFontStyle(): FontStyleType | undefined { return this.getProperty('fontStyle') as FontStyleType; } - setFontWeight(weight: FontWeightType) { + setFontWeight(weight: FontWeightType): void { this.putProperty('fontWeight', weight); }