export type TCategoryAnalyzes = Record<string, { categoryId: string; analyzes: IAnalyzesStorageData[]; }>;
This may also work for your use case. However, the Record utility type may be less flexible than the original answer.