Skip to content

Commit

Permalink
move types to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1992 committed Apr 2, 2024
1 parent e27e56f commit 8792e0a
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions packages/mermaid/src/diagrams/sequence/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
export interface Box {
name: string;
wrap: boolean;
fill: string;
actorKeys: string[];
}

export interface Actor {
box?: Box;
name: string;
description: string;
wrap: boolean;
prevActor?: string;
nextActor?: string;
links: Record<string, unknown>;
properties: Record<string, unknown>;
actorCnt: number | null;
rectData: unknown;
type: string;
}

export interface Message {
from?: { actor: string };
to?: { actor: string };
message:
| string
| {
start: number;
step: number;
visible: boolean;
};
wrap: boolean;
answer?: unknown;
type?: number;
activate?: boolean;
placement?: string;
}

export interface AddMessageParams {
from: string;
to: string;
msg: string;
signalType: number;
type:
| 'addMessage'
| 'sequenceIndex'
| 'addParticipant'
| 'createParticipant'
| 'destroyParticipant'
| 'activeStart'
| 'activeEnd'
| 'addNote'
| 'addLinks'
| 'addALink'
| 'addProperties'
| 'addDetails'
| 'boxStart'
| 'boxEnd'
| 'loopStart'
| 'loopEnd'
| 'rectStart'
| 'rectEnd'
| 'optStart'
| 'optEnd'
| 'altStart'
| 'else'
| 'altEnd'
| 'setAccTitle'
| 'parStart'
| 'parAnd'
| 'parEnd'
| 'and'
| 'criticalStart'
| 'criticalOption'
| 'option'
| 'criticalEnd'
| 'breakStart'
| 'breakEnd'
| 'parOverStart'
| 'parOverEnd'
| 'parOverAnd'
| 'parOverEnd';

activate: boolean;
}

0 comments on commit 8792e0a

Please sign in to comment.