X-Git-Url: https://git.r.bdr.sh/rbdr/api-notation.vim/blobdiff_plain/db91656c9723649ea7f2b9f9e5b48a938fe2f006..b59ef9367afd016f26641b421685d09cd3420e7e:/example-syntax.api diff --git a/example-syntax.api b/example-syntax.api index 8c52870..4ad79fa 100644 --- a/example-syntax.api +++ b/example-syntax.api @@ -1,19 +1,20 @@ -HypotheticalModule - +staticProperty - +anotherStaticProperty - ::toggleAnotherStaticProperty() - ::setStaticProperty(newValue ) - -instanceProperty - -anotherInstanceProperty - #instanceMethodSync([optionalParameter]) => resultOfCall - #instanceMethodAsync(someValue , [callback] ) ->(error , result ) - - -// Comment -EventHypotheticalClass - +>AnotherClass<+staticEventToListen(eventData ) // More Comments - <+staticEventDispatched(someData ) - ~>listenedSocketEvent(eventData ) - <~dispatchedSocketEvent(eventData ) - ->AnotherClass<-instanceEventToListen(eventData ) - <-instanceEventDispatched(specificDataType ) +// This is an example of a definition. +Forum.Models.Post + +glyphs > + -id + -created_at + -parent_id + -text + -author + // Comments are also + // Allowed in the middle + ~>textUpdated(text ) + ->authorUpdated(author ) + <~textWillUpdate(text ) + <-postWillRender(post ) + +>authorUpdated(author ) + <+textWillUpdate(text ) + ::getAll(parent_id ) => Promise> #> NotFoundError,DisplayError + ::get(id ) => Promise + #update(text ) => Promise + #transform([transformer] (T) => boolean>)