forked from retejs/angular-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
31 lines (25 loc) · 882 Bytes
/
types.ts
File metadata and controls
31 lines (25 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Component, Type } from '@angular/core';
import { IO, Control } from 'rete';
export type SocketType = 'input' | 'output';
export type BindSocket = (el: HTMLElement, type: SocketType, io: IO) => void;
export type BindControl = (el: HTMLElement, control: Control) => void;
export interface Props {
[key: string]: unknown;
}
export interface ElementProps extends Props {
component: Type<Component>;
props: Props;
}
export interface AngularControl<P extends Props = {}, T extends Component = any> {
render?: 'angular' | string;
component: Type<T>;
props: P;
}
export interface AngularComponentData<P extends Props = {}, T extends Component = any> {
render?: 'angular' | string;
component: Type<T>;
props?: P;
}
export interface AngularComponent<P extends Props = {}, T extends Component = any> {
data : AngularComponentData<P, T>;
}