Skip to content

Commit d8ba1e2

Browse files
Merge pull request modelcontextprotocol#2215 from jonathanhefner/schema-ref-index-property-only-types
Style Schema Reference index-property-only types
2 parents 2ca902e + cbd4f51 commit d8ba1e2

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

docs/style.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ body:has(#schema-reference) {
314314

315315
/* Sub-members */
316316
.tsd-type-declaration {
317-
/* Templated heading */
317+
/* Templated heading ("Type Declaration") */
318318
[data-typedoc-h="4"] {
319319
display: none;
320320
}
@@ -364,6 +364,25 @@ body:has(#schema-reference) {
364364
display: none;
365365
}
366366
}
367+
368+
/* Types with only index properties (e.g., `type Foo = { [key: string]: unknown }`) */
369+
.type > .tsd-type-declaration {
370+
/* Hide property if no doc comments */
371+
&:not(:has(.tsd-comment)) {
372+
display: none;
373+
}
374+
375+
/* Templated heading ("Type Declaration") */
376+
[data-typedoc-h="4"] {
377+
display: none;
378+
}
379+
380+
/* Index property */
381+
[data-typedoc-h="5"] {
382+
font-family: var(--font-mono);
383+
font-weight: 700;
384+
}
385+
}
367386
}
368387

369388

0 commit comments

Comments
 (0)