We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8650cb5 commit 8be509dCopy full SHA for 8be509d
client/src/app/model/models/instanceLink.ts
@@ -1,3 +1,4 @@
1
+import { Instance } from './instance';
2
3
export interface InstanceLink {
4
idFrom: number;
@@ -15,3 +16,13 @@ export interface InstanceLink {
15
16
Failed: 'Failed' as LinkStateEnum
17
};
18
19
+ export interface InstanceLinkPayload {
20
+ link: InstanceLink;
21
+ instanceFrom: Instance;
22
+ instanceTo: Instance;
23
+ }
24
+
25
+ export function objIsLink(obj: any): obj is InstanceLink {
26
+ return obj.idFrom !== undefined && typeof obj.idFrom === 'number' && obj.idTo !== undefined && typeof obj.idTo === 'number' &&
27
+ obj.linkState !== undefined && obj.linkState in LinkStateEnum;
28
0 commit comments