From 7b2f442579a95e7f5d138aaff4ae7b8140a59037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A9sor=20ILOYI?= Date: Tue, 17 Dec 2024 14:43:19 +0100 Subject: [PATCH] docs(format/flutter): document className option for flutter/class.dart format Resolves #1417 --- docs/src/content/docs/reference/Hooks/Formats/predefined.md | 1 + lib/common/formats.js | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/src/content/docs/reference/Hooks/Formats/predefined.md b/docs/src/content/docs/reference/Hooks/Formats/predefined.md index 5ed292230..3d611d2b7 100644 --- a/docs/src/content/docs/reference/Hooks/Formats/predefined.md +++ b/docs/src/content/docs/reference/Hooks/Formats/predefined.md @@ -1007,6 +1007,7 @@ Creates a Dart implementation file of a class with values | -------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `options.showFileHeader` | `boolean` | Whether or not to include a comment that has the build date. Defaults to `true` | | `options.outputReferences` | `boolean \| OutputReferencesFunction` | Whether or not to keep [references](/reference/hooks/formats#references-in-output-files) (a -> b -> c) in the output. Defaults to `false`. Also allows passing a function to conditionally output references on a per token basis. | +| `options.className` | `string` | The name of the generated Dart Class | Example: diff --git a/lib/common/formats.js b/lib/common/formats.js index adafd24a5..e9deb1e83 100644 --- a/lib/common/formats.js +++ b/lib/common/formats.js @@ -1655,6 +1655,7 @@ declare const ${moduleName}: ${JSON.stringify(treeWalker(dictionary.tokens), nul * @typedef {Object} flutterClassOpts * @property {boolean} [flutterClassOpts.showFileHeader=true] - Whether or not to include a comment that has the build date * @property {OutputReferences} [flutterClassOpts.outputReferences=false] - Whether or not to keep [references](/#/formats?id=references-in-output-files) (a -> b -> c) in the output. + * @property {String} [flutterClassOpts.className] - The name of the generated Dart Class * @param {FormatArgs & { options?: flutterClassOpts }} options * @example * ```dart