diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/apidoc/writer.ts | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/scripts/apidoc/writer.ts b/scripts/apidoc/writer.ts index b5fa5806..0fc7ae78 100644 --- a/scripts/apidoc/writer.ts +++ b/scripts/apidoc/writer.ts @@ -63,20 +63,17 @@ export async function writeApiDocsModule( text: moduleName, link: `/api/${lowerModuleName}.html`, methods, - diff: methods.reduce( - (data, method) => ({ - ...data, - [method.name]: methodDiffHash(method), + diff: { + moduleHash: diffHash({ + name: moduleName, + field: lowerModuleName, + deprecated, + comment, }), - { - moduleHash: diffHash({ - name: moduleName, - field: lowerModuleName, - deprecated, - comment, - }), - } - ), + ...Object.fromEntries( + methods.map((method) => [method.name, methodDiffHash(method)]) + ), + }, }; } |
