From aaf2c200b3c2b20976dd803dc8102fc0f0d65540 Mon Sep 17 00:00:00 2001 From: Niklas Kiefer Date: Fri, 13 Oct 2023 10:23:49 +0200 Subject: [PATCH] docs: update JSDocs for `getSchemaVariables` --- packages/form-js-viewer/src/util/index.js | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) 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[]} */