public override void WriteJavascript(JavascriptTextWriter writer, VueComputed value, JsonSerializer serializer) { writer.WriteStartJsMember(value.Name); writer.WriteStartJsObject(); var declaration = value.Body.Members.First() as PropertyDeclarationSyntax; var syntaxWriter = new JavascriptSyntaxWriter(writer); foreach (var accessor in declaration.AccessorList.Accessors) { syntaxWriter.Visit(accessor); } writer.WriteEndJsObject(); writer.WriteEndJsMember(); }
public override void WriteJavascript(JavascriptTextWriter writer, VueMethod value, JsonSerializer serializer) { var syntaxWalker = new JavascriptSyntaxWriter(writer); syntaxWalker.Visit(value.Declaration); }