diff --git a/lib/buildFile.js b/lib/buildFile.js index 1b0f1f92a..4c73139e9 100644 --- a/lib/buildFile.js +++ b/lib/buildFile.js @@ -26,6 +26,7 @@ import createFormatArgs from './utils/createFormatArgs.js'; * @typedef {import('../types/Config.d.ts').Config} Config * @typedef {import('../types/File.d.ts').File} File * @typedef {import('../types/Filter.d.ts').Matcher} Matcher + * @typedef {import('../types/Format.d.ts').FormatterArguments} FormatterArguments */ /** diff --git a/lib/utils/createFormatArgs.js b/lib/utils/createFormatArgs.js index c19b1aa12..dceaf36a3 100644 --- a/lib/utils/createFormatArgs.js +++ b/lib/utils/createFormatArgs.js @@ -18,6 +18,7 @@ import deepExtend from './deepExtend.js'; * @typedef {import('../../types/Config.d.ts').PlatformConfig} PlatformConfig * @typedef {import('../../types/Config.d.ts').Config} Options * @typedef {import('../../types/File.d.ts').File} File + * @typedef {import('../../types/Format.d.ts').FormatterArguments} FormatterArguments * /** @@ -28,7 +29,7 @@ import deepExtend from './deepExtend.js'; * options: Options; * file: File; * }} param0 - * @returns + * @returns {FormatterArguments} */ export default function createFormatArgs({ dictionary, platform, options, file }) { const { allTokens, tokens } = dictionary; @@ -41,7 +42,7 @@ export default function createFormatArgs({ dictionary, platform, options, file } // always has the destination prop, then result will be File rather than Partial, so we just typecast it. file = /** @type {File} */ (deepExtend([{}, fileOptsTakenFromPlatform, file])); - return { + return /** @type {FormatterArguments} */ ({ dictionary, allTokens, tokens, @@ -51,5 +52,5 @@ export default function createFormatArgs({ dictionary, platform, options, file } ...(file.options || {}), usesDtcg: options?.usesDtcg ?? false, }, - }; + }); }