public static JsFunction NamedFunction(string name, params IJsDeclaration[] parameters) { var function = new JsFunction(name); foreach (var parameter in parameters) { function.Parameters.Add(parameter); } return(function); }
public static JsFunction Body(this JsFunction function, JsBlockStatement statement) { function.Body = statement; return(function); }
public static JsFunction Body(this JsFunction function, JsStatement statement) { function.Body.Aggregate(statement); return(function); }
public static JsFunction Body(this JsFunction function, JsExpression expression) { function.Body.Add(Express(expression)); return(function); }
public static JsFunctionDeclaration Declare(JsFunction function) { return(new JsFunctionDeclaration(function)); }