]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/blobdiff - example.api
Simplify dir
[rbdr/tree-sitter-api-notation] / example.api
diff --git a/example.api b/example.api
new file mode 100644 (file)
index 0000000..37e08d8
--- /dev/null
@@ -0,0 +1,19 @@
+Forum.Models.Post
+  +glyphs <Array<String>>
+  -id <UUID>
+  -created_at <Date>
+  -parent_id <UUID>
+  -text <String>
+  -author <Author>
+  // Comments are also
+  // Allowed in the middle
+  ~>textUpdated(text <String>)
+  ->authorUpdated(author <Author>)
+  <~textWillUpdate(text <String>)
+  <-postWillRender(post <Forum.Models.Post>)
+  +>authorUpdated(author <Author>)
+  <+textWillUpdate(text <String>)
+  ::getAll(parent_id <UUID>) => Promise<Array<Forum.Models.Post>> #> NotFoundError,DisplayError
+  ::get(id <UUID>) => Promise<Forum.Models.Post>
+  #update(text <String>) => Promise<void>
+  #transform([transformer] <Function<T>(T) => boolean>)