use multiline types for objects

This commit is contained in:
Robonau
2024-11-11 22:18:04 +00:00
committed by shamoon
parent dd7a06819c
commit a1f86a4470

View File

@@ -24,10 +24,23 @@ function makeFields(Fields = []) {
export default function Component({ service }) {
const { t } = useTranslation();
/** @type {{widget: { fields: string[]|null }}} */
/**
* @type {{
* widget: {
* fields: string[]|null
* }
* }}
*/
const { widget } = service;
/** @type { { data: { label: string, count: number }[], error: unknown }} */
/**
* @type {{
* error: unknown
* data: ({
* label: string, count: number
* }[]),
* }}
*/
const { data: suwayomiData, error: suwayomiError } = useWidgetAPI(widget);
if (suwayomiError) {