Skip to content

Commit

Permalink
chore: fix small type problem
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Mar 11, 2024
1 parent ced28c7 commit 4c0ac0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/buildFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down
7 changes: 4 additions & 3 deletions lib/utils/createFormatArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
/**
Expand All @@ -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;
Expand All @@ -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<File>, so we just typecast it.
file = /** @type {File} */ (deepExtend([{}, fileOptsTakenFromPlatform, file]));

return {
return /** @type {FormatterArguments} */ ({
dictionary,
allTokens,
tokens,
Expand All @@ -51,5 +52,5 @@ export default function createFormatArgs({ dictionary, platform, options, file }
...(file.options || {}),
usesDtcg: options?.usesDtcg ?? false,
},
};
});
}

0 comments on commit 4c0ac0c

Please sign in to comment.