From 7796e9aa798f4e094e3576d08bdc2ae93ce2112b Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sat, 13 Jun 2026 10:36:17 +0800 Subject: [PATCH] Add some JSDoc comment (#19349) --- src/cli/format-results-cache.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cli/format-results-cache.js b/src/cli/format-results-cache.js index 562712fa1..9dfcaf72e 100644 --- a/src/cli/format-results-cache.js +++ b/src/cli/format-results-cache.js @@ -7,6 +7,10 @@ import fileEntryCache from "file-entry-cache"; import { version as prettierVersion } from "../index.js"; import { createHash, getOrInsertComputed } from "./utilities.js"; +/** +@import {FileDescriptor, FileDescriptorMeta, CreateOptions} from "file-entry-cache" +*/ + const optionsHashCache = new WeakMap(); const nodeVersion = process.version; @@ -21,8 +25,6 @@ function getHashOfOptions(options) { } /** - * @import {FileDescriptor, FileDescriptorMeta} from "file-entry-cache" - * * @param {FileDescriptor} fileDescriptor * @returns {FileDescriptorMeta & {data?: {hashOfOptions?: string }}}} */ @@ -39,6 +41,8 @@ class FormatResultsCache { */ constructor(cacheFileLocation, cacheStrategy) { const useCheckSum = cacheStrategy === "content"; + + /** @type {CreateOptions} */ const fileEntryCacheOptions = { useCheckSum, useModifiedTime: !useCheckSum,