File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export interface Plug {
48
48
49
49
track < T extends ExternalEventType > ( type : T , payload : ExternalEventPayload < T > ) : Promise < ExternalEvent < T > > ;
50
50
51
- evaluate ( expression : string , options ?: EvaluationOptions ) : Promise < JsonValue > ;
51
+ evaluate < T extends JsonValue > ( expression : string , options ?: EvaluationOptions ) : Promise < T > ;
52
52
53
53
unplug ( ) : Promise < void > ;
54
54
}
@@ -281,8 +281,8 @@ export class GlobalPlug implements Plug {
281
281
return this . sdk . tracker . track ( type , payload ) ;
282
282
}
283
283
284
- public evaluate ( expression : string , options : EvaluationOptions = { } ) : Promise < JsonValue > {
285
- return this . sdk . evaluator . evaluate ( expression , options ) ;
284
+ public evaluate < T extends JsonValue > ( expression : string , options : EvaluationOptions = { } ) : Promise < T > {
285
+ return this . sdk . evaluator . evaluate ( expression , options ) as Promise < T > ;
286
286
}
287
287
288
288
public test ( expression : string , options : EvaluationOptions = { } ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments