Skip to content

Commit

Permalink
docs: update JSDocs for getSchemaVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Oct 13, 2023
1 parent 0e87a13 commit aaf2c20
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions packages/form-js-viewer/src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,33 @@ export function clone(data, replacer) {
}

/**
* Parse the schema for input variables a form might make use of
* @typedef { import('../types').Schema } Schema
*/

/**
* Parse the schema for variables a form might make use of.
*
* @example
*
* // retrieve variables from schema
* const variables = getSchemaVariables(schema);
*
* @example
*
* // retrieve input variables from schema
* const inputVariables = getSchemaVariables(schema, { outputs: false });
*
* @example
*
* // retrieve output variables from schema
* const outputVariables = getSchemaVariables(schema, { inputs: false });
*
* @param {any} schema
* @param {Schema} schema
* @param {object} [options]
* @param {any} [options.expressionLanguage]
* @param {any} [options.templating]
* @param {boolean} [options.inputs=true]
* @param {boolean} [options.outputs=true]
*
* @return {string[]}
*/
Expand Down

0 comments on commit aaf2c20

Please sign in to comment.