mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-29 09:54:10 +01:00
refactor: fix overlapping types
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -76,6 +76,14 @@ interface BaseNode {
|
|||||||
defaultWidth?: number;
|
defaultWidth?: number;
|
||||||
imageAspectRatio?: number;
|
imageAspectRatio?: number;
|
||||||
constraint?: 'on' | 'off';
|
constraint?: 'on' | 'off';
|
||||||
|
children?: NodeChildren;
|
||||||
|
nodeId?: string;
|
||||||
|
level?: number;
|
||||||
|
descr?: string;
|
||||||
|
type?: number;
|
||||||
|
radius?: number;
|
||||||
|
taper?: number;
|
||||||
|
stroke?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,34 +94,10 @@ export type NodeChildren = Node[];
|
|||||||
export interface ClusterNode extends BaseNode {
|
export interface ClusterNode extends BaseNode {
|
||||||
shape?: ClusterShapeID;
|
shape?: ClusterShapeID;
|
||||||
isGroup: true;
|
isGroup: true;
|
||||||
children?: NodeChildren;
|
|
||||||
nodeId?: string;
|
|
||||||
level?: number;
|
|
||||||
descr?: string;
|
|
||||||
type?: number;
|
|
||||||
height?: number;
|
|
||||||
width?: number;
|
|
||||||
padding?: number;
|
|
||||||
radius?: number;
|
|
||||||
taper?: number;
|
|
||||||
stroke?: string;
|
|
||||||
from?: 'mindmap' | 'flowchart' | 'state' | 'class' | 'sequence' | 'er'; // Indicates the diagram type this node is from
|
|
||||||
}
|
}
|
||||||
export interface NonClusterNode extends BaseNode {
|
export interface NonClusterNode extends BaseNode {
|
||||||
shape?: ShapeID;
|
shape?: ShapeID;
|
||||||
isGroup: false;
|
isGroup: false;
|
||||||
children?: NodeChildren;
|
|
||||||
nodeId?: string;
|
|
||||||
level?: number;
|
|
||||||
descr?: string;
|
|
||||||
type?: number;
|
|
||||||
height?: number;
|
|
||||||
width?: number;
|
|
||||||
padding?: number;
|
|
||||||
radius?: number;
|
|
||||||
taper?: number;
|
|
||||||
stroke?: string;
|
|
||||||
from?: 'mindmap' | 'flowchart' | 'state' | 'class' | 'sequence' | 'er'; // Indicates the diagram type this node is from
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common properties for any node in the system
|
// Common properties for any node in the system
|
||||||
|
|||||||
Reference in New Issue
Block a user