ProcessTagsCommand typedef

Return type from Tag.add that is a bit-docs-process-tags/process-tags command.

*<Array<String,String|Object|DocObject>>

Options

  • push {Array<"push",Object>}:

    Push custom data onto ProcessTagsStack.

    Example of push: ['push', customDataObject].

  • pop {Array<"pop",String>}:

    Pop off ProcessTagsStack and give text to previous Tag.

    Example of pop: ['pop', text].

    This command calls Tag.addMore of the previous tag with text.

  • poppop {Array<"poppop",String>}:

    Pops twice, giving text to the tag before the previous Tag.

    Example of poppop: ['poppop', text].

    Useful for a closing Tag to pop itself and an opening Tag off the ProcessTagsStack.

    For example, bit-docs-js/tags/codeend.add will return a ProcessTagsCommand like:

    ['poppop', '```javascript\nvar myString = "hello world";\n```']
    
  • default {Array<"default",String>}:

    Set the DocObject property for appending processed output from normal lines.

    Any normal line processed after the @ declaration in a TagBlock will be appended to this property.

    Example of default: ['default', propName].

    Both @body and @description expect multiple lines.

    For example, [bit-docs-process-tags/tags/body.add] returns a ProcessTagsCommand like:

    ['default', 'body']
    

    While [bit-docs-process-tags/tags/description.add] returns a ProcessTagsCommand like:

    ['default', 'description']
    

    Tags specify different DocObject properties (like body and description) to store the HTML output from multiple lines.

  • add {Array<"add",DocObject>}:

    Add to DocMap.

    Example of add: ['add', docObject].

    Used by:

    • [bit-docs-js/tags/prototype.add]
    • [bit-docs-js/tags/static.add]
  • scope {Array<"scope",DocObject>|Array<"scope",DocObject,DocObject>}:

    Change the scope.

    Example of scope: ['scope', scopeDocObject].

    Used by:

    Example of changing the scope and the DocObject being added to:

    ['scope', scopeDocObject, docObject].

    Used by:

    • [bit-docs-js/tags/add.add]

Use

Use these commands to manipulate the ProcessTagsStack as needed from your respective Tag.add.