X-Git-Url: https://git.r.bdr.sh/rbdr/api-notation.vim/blobdiff_plain/ff11ecc1ac84459c448430ce843741d20b70057f..d328110bba356c9ac681f88ceff05587510281f7:/example-syntax.api diff --git a/example-syntax.api b/example-syntax.api index 670be57..4ad79fa 100644 --- a/example-syntax.api +++ b/example-syntax.api @@ -1,17 +1,20 @@ -HypotheticalModule - +staticProperty - +anotherStaticProperty - ::toggleAnotherStaticProperty() - ::setStaticProperty(newValue ) - -instanceProperty - -anotherInstanceProperty - #instanceMethodSync([optionalParameter]) => resultOfCall - #instanceMethodAsync(someValue , [callback] ) ->(error , result ) - -EventHypotheticalClass - +>AnotherClass<+staticEventToListen(eventData ) - <+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>)