DocObject typedef

An object that represents something that is documented.

Object

Options

  • name {String}:

    The unique name of the object being documented.

  • type {DocType}:

    The "type" of DocObject.

  • parent {String}:

    The name of the parent DocObject.

  • description {String}:

    Markdown content specified by @description. Used in link title attributes so keep it short.

  • body {String}:

    Markdown content specified by @body. Can be as many lines as needed.

  • children {Array<String>}:

    An array of children names. This typically gets added by the system based on the parent property.

  • deprecated {Array<Object>}:

    An array of deprecated warnings specified by @deprecated.

Use

Any property added to a DocObject is available to the templates and the client.

Plugins add arbitrary properties to the DocObject so it's not possible to document them all.

The options documented above are the properties DocObject is most likely to have.

You can see a page's DocObject by typing docObject in the console.

Here is an example of the docObject for this page:

{
  "src":{
    "path":"docs/modules/bit-docs/docs/api/types/docObject.md"
  },
  "description":"\nAn object that represents something that is documented...\n",
  "parent":"bit-docs/types",
  "type":"typedef",
  "title":"DocObject",
  "types":[
    {
      "type":"Object",
      "options":[
        {
          "name":"name",
          "description":"The unique name of the object being documented.\n",
          "types":[
            {
              "type":"String"
            }
          ]
        },
        {
          "name":"type",
          "description":"The type of the DocType...\n",
          "types":[
            {
              "type":"String"
            }
          ]
        },
        {
          "name":"parent",
          "description":"The name of the parent DocObject.\n",
          "types":[
            {
              "type":"String"
            }
          ]
        },
        {
          "name":"description",
          "description":"The description html content specified by\n@description...\n",
          "types":[
            {
              "type":"String"
            }
          ]
        },
        {
          "name":"body",
          "description":"The body html content specified by\n@body.\n",
          "types":[
            {
              "type":"String"
            }
          ]
        },
        {
          "name":"children",
          "description":"An array of children names...\n",
          "types":[
            {
              "type":"Array",
              "template":[
                {
                  "types":[
                    {
                      "type":"String"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name":"deprecated",
          "description":"An array of\ndeprecated warnings created by @deprecated.\n",
          "types":[
            {
              "type":"Array",
              "template":[
                {
                  "types":[
                    {
                      "type":"Object",
                      "options":[
                        {
                          "name":"version",
                          "types":[
                            {
                              "type":"String"
                            }
                          ]
                        },
                        {
                          "name":"description",
                          "types":[
                            {
                              "type":"String"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "name":"bit-docs/types/docObject",
  "comment":" ",
  "pathToRoot":"../../.."
}