Skip to content

Commit 4f8c634

Browse files
chore: limit enum splaying (#2039)
1 parent 530833a commit 4f8c634

File tree

1 file changed

+1
-7
lines changed
  • packages/fern-docs/ui/src/type-shorthand

1 file changed

+1
-7
lines changed

packages/fern-docs/ui/src/type-shorthand/index.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,7 @@ export function renderTypeShorthand(
218218
},
219219
discriminatedUnion: () =>
220220
plural ? "objects" : maybeWithArticle("an", "object"),
221-
enum: (enumValue) => {
222-
// if there are only 1 or 2 values, we can list them like literals (e.g. "apple" or "banana")
223-
if (enumValue.values.length > 0 && enumValue.values.length < 3) {
224-
return enumValue.values
225-
.map((value) => `"${value.value}"`)
226-
.join(" or ");
227-
}
221+
enum: () => {
228222
return plural ? "enums" : maybeWithArticle("an", "enum");
229223
},
230224

0 commit comments

Comments
 (0)