Child pages
  • JSDoc Annotations

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tag

Syntax & Examples

Comments

@AllowToRunInFind

@AllowToRunInFind

Custom Servoy JSDoc tag to annotate a function that it can be run if the Form on which the function is ran is in FindMode

@author

@author {userName}  

Tag indicating the author of the code

@constructor

@constructor

 

@deprecated

@deprecated  

Tag indicating that the function or variable is obsolete or has been replaced and should be used anymore

@example

@example  

Tag allowing to provide some sample code how to use the function or variable

@param

@param {Type} name parameterDescription

  Tag to describe function parameters

@private

@private

Annotates a variable or function as accessible only from within the scope scope^1^ in which it is declared

@protected

@protected

Annotates a function variable or function as accessible from within the scope scope^1^ in which it is declared and all scopes that extend this scope

@return

@return {Type}

 

@returns

@returns {Type}

alias for @return

@see

@see seeDescription

 

@since

@since versionDescription

 

@SuppressWarnings

@SuppressWarnings (warning)

Custom Servoy JSDoc tag to suppress builder markers of a certain type within a function

@throws

@throws {Type}

 

@type

@type {Type}

 

@version

@version versionDescription

 

^1^: A scope can be either a Form or the globals scope. Only Form can be extended, thus the @protected tag is not relevant for annotating variables and functions within the globals scope

Type Expressions

Type Expressions are used to describe the type and/or structure of data in the following cases:

...

Expression name

Syntax example

Comments

Named type

{String}
{Boolean}
{Number}
{XML}
{XMLList}
{RuntimeForm}
{RuntimeLabel}
{JSButton}
{JSForm}

 

AnyType

{ * }

 

OR Type

{String|Number}

 

REST Type

{...String}

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3b81b24125d9b92f-5214b632-47c8453d-80ac944b-e4980372f3a1a410d37509e2"><ac:plain-text-body><![CDATA[

Array Type

{String[]} 
]]></ac:plain-text-body></ac:structured-macro>
{Array<String>} 
{Array<Byte>}

 

Object Type

{Object<String>} 
{Object<Array<String>>} 
{name:String, age:Number}} 

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="52c6d4c4c59cd744-0dbad5e9-47094ef2-b04eb697-6129b0dec780addea057028f"><ac:plain-text-body><![CDATA[

Object Type with optional properties

{ {sDocID:String, [sTemplateID]:String}}
]]></ac:plain-text-body></ac:structured-macro>
{ {sDocID:String, sTemplateID:String=}}

 

JSFoundSet type

{JSFoundset<db:/udm/contacts>} 
{JSFoundset<{column1:String, column2:Number}>}

 

JSRecord type

{JSRecord<db:/udm/contacts>} 
{JSRecord<{column1:String, column2:Number}>}

 

JSDataSet type

{JSDataSet<{name:String, age:Number}>}

 

RuntimeForm Type

{RuntimeForm<superFormName>}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

...