File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ interface EffectScope<EffectModel> extends ng.IScope {
33 [ x : string ] : unknown ;
44}
55
6- type EffectTriggerResponse = {
6+ export type EffectOutput < Outputs = Record < string , unknown > > = {
7+ label : string ;
8+ description : string ;
9+ defaultName : keyof Outputs ;
10+ } ;
11+
12+ type EffectTriggerResponse < Outputs = Record < string , unknown > > = {
713 success : boolean ;
8- // outputs: Record<string, unknown> ;
14+ outputs ?: Outputs ;
915 execution ?: {
1016 stop : boolean ;
1117 bubbleStop : boolean ;
@@ -79,7 +85,11 @@ export namespace Effects {
7985 [ x : string ] : unknown ;
8086 } ;
8187
82- type EffectType < EffectModel , OverlayData = unknown > = {
88+ type EffectType <
89+ EffectModel ,
90+ OverlayData = unknown ,
91+ Outputs = Record < string , unknown >
92+ > = {
8393 definition : {
8494 id : string ;
8595 name : string ;
@@ -88,6 +98,7 @@ export namespace Effects {
8898 categories : EffectCategory [ ] ;
8999 triggers ?: TriggerType [ ] | TriggersObject ;
90100 dependencies ?: Array < "chat" > ;
101+ outputs ?: EffectOutput < Outputs > [ ] ;
91102 } ;
92103 optionsTemplate : string ;
93104 optionsController ?: (
@@ -102,7 +113,7 @@ export namespace Effects {
102113 data : OverlayData ,
103114 overlayInstance ?: string
104115 ) => void ;
105- } ) => Promise < void | boolean | EffectTriggerResponse > ;
116+ } ) => Promise < void | boolean | EffectTriggerResponse < Outputs > > ;
106117 overlayExtension ?: {
107118 dependencies ?: {
108119 globalStyles ?: string ;
You can’t perform that action at this time.
0 commit comments