2 --- description: API Notation
5 The following document attempts to define a legend for easy specification of APIs for components. Any suggestions to improve are welcome.
8 NameOfClass.WithPossibleNamespace
11 ~> listened events (socket)
12 +> listened events (class/module)
13 -> listened events (instance)
14 <~ dispatched events (socket)
15 <+ dispatched events(class/module)
16 <- dispatched events (instance)
26 Recommended order: class first, then sockets, then instance. Internally: Properties, events, methods.
28 // Anything after two forward slashes is a comment
31 Here's an example of usage
35 +staticProperty <String>
36 +anotherStaticProperty <Boolean>
37 ::toggleAnotherStaticProperty()
38 ::setStaticProperty(newValue <String>)
39 -instanceProperty <Number>
40 -anotherInstanceProperty <String>
41 #instanceMethodSync([optionalParameter]<Boolean>) => resultOfCall <String>
42 #instanceMethodAsync(someValue <Number>, [callback] <Function>) ->(error <String|null>, result <Number|null>)
45 Here's another example but with events.
48 EventHypotheticalClass
49 +>AnotherClass<+staticEventToListen(eventData <PredefinedObject>)
50 <+staticEventDispatched(someData <SomeData>)
51 ~>listenedSocketEvent(eventData <SomeObject>)
52 <~dispatchedSocketEvent(eventData <BlaBla>)
53 ->AnotherClass<-instanceEventToListen(eventData <Object>)
54 <-instanceEventDispatched(specificDataType <DefinedObject>)