diff --git a/packages/form-js-viewer/src/util/index.js b/packages/form-js-viewer/src/util/index.js index d61cc313a..f100a0d48 100644 --- a/packages/form-js-viewer/src/util/index.js +++ b/packages/form-js-viewer/src/util/index.js @@ -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[]} */