generics in BindExt
This commit is contained in:
@@ -32,20 +32,20 @@ typedef Chain = {
|
||||
@:access(bindx.BindMacros)
|
||||
class BindExt {
|
||||
|
||||
@:noUsing macro static public function expr(expr:Expr, listener:Expr):Expr {
|
||||
@:noUsing macro static public function expr<T>(expr:ExprOf<T>, listener:ExprOf<Null<T>->Null<T>->Void>):ExprOf<Void->Void> {
|
||||
return internalBindExpr(expr, listener);
|
||||
}
|
||||
|
||||
@:noUsing macro static public function exprTo(expr:Expr, target:Expr):Expr {
|
||||
@:noUsing macro static public function exprTo<T>(expr:ExprOf<T>, target:ExprOf<T>):ExprOf<Void->Void> {
|
||||
var type = Context.typeof(expr).toComplexType();
|
||||
return internalBindExpr(expr, macro function (_, to:Null<$type>) $target = to);
|
||||
}
|
||||
|
||||
@:noUsing macro static public function chain(expr:Expr, listener:Expr):Expr {
|
||||
@:noUsing macro static public function chain<T>(expr:ExprOf<T>, listener:ExprOf<Null<T>->Null<T>->Void>):ExprOf<Void->Void> {
|
||||
return internalBindChain(expr, listener);
|
||||
}
|
||||
|
||||
@:noUsing macro static public function chainTo(expr:Expr, target:Expr):Expr {
|
||||
@:noUsing macro static public function chainTo<T>(expr:ExprOf<T>, target:ExprOf<T>):ExprOf<Void->Void> {
|
||||
var type = Context.typeof(expr).toComplexType();
|
||||
return internalBindChain(expr, macro function (_, to:Null<$type>) $target = to);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user