champollion.directive.js_function

class champollion.directive.js_function.AutoFunctionDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Directive to render Javascript function documentation.

The unique argument should be the identifier of the function element.

.. js:autofunction:: module.doSomething

The available options are:

  • alias:
    String element to replace the function name.
  • module-alias:
    String element to replace the module name.
  • module-path-alias:
    String element to replace the module path.
  • force-partial-import:
    Indicate whether the function import statement display should be indicated with partial import if the function element is exported.
has_arguments = True

Javascript function is callable

objtype = 'function'

Define the Object type

option_spec = {'alias': <function unchanged_required>, 'force-partial-import': <function <lambda>>, 'module-alias': <function unchanged_required>, 'module-path-alias': <function unchanged_required>}

function options

handle_signature(signature, node)[source]

Update the signature node.

before_content()[source]

Update the content.

Compute the description and import statement if available.