Skip to content

Commit 3181598

Browse files
committed
fix: make type fields required
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent 0b1758e commit 3181598

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/model/IJsonModel.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export interface IRowAttributes {
483483
id?: string;
484484

485485
/** The type of this node (always "row") */
486-
type?: "row";
486+
type: "row";
487487

488488
/**
489489
relative weight for sizing of this row in parent row
@@ -641,7 +641,7 @@ export interface ITabSetAttributes {
641641
tabLocation?: ITabLocation;
642642

643643
/** The type of this node (always "tabset") */
644-
type?: "tabset";
644+
type: "tabset";
645645

646646
/**
647647
relative weight for sizing of this tabset in parent row
@@ -828,7 +828,7 @@ export interface ITabAttributes {
828828
tabsetClassName?: string;
829829

830830
/** The type of this node (always "tab") */
831-
type?: "tab";
831+
type: "tab";
832832
}
833833
export interface IBorderAttributes {
834834
/**
@@ -909,5 +909,5 @@ export interface IBorderAttributes {
909909
size?: number;
910910

911911
/** The type of this node (always "border") */
912-
type?: "border";
912+
type: "border";
913913
}

src/model/TabNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class TabNode extends Node implements IDraggable {
177177
toJson(): IJsonTabNode {
178178
const json = {};
179179
TabNode.attributeDefinitions.toJson(json, this.attributes);
180-
return json;
180+
return json as IJsonTabNode;
181181
}
182182

183183
/** @internal */

0 commit comments

Comments
 (0)