MCPcopy Index your code
hub / github.com/Effect-TS/effect / isCompactableLiteral

Function isCompactableLiteral

packages/effect/src/JSONSchema.ts:1025–1027  ·  view source on GitHub ↗
(jsonSchema: JsonSchema7 | undefined)

Source from the content-addressed store, hash-verified

1023}
1024
1025function isCompactableLiteral(jsonSchema: JsonSchema7 | undefined): jsonSchema is JsonSchema7Enum {
1026 return Predicate.hasProperty(jsonSchema, "enum") && "type" in jsonSchema && Object.keys(jsonSchema).length === 2
1027}
1028
1029function compactUnion(members: Array<JsonSchema7>): Array<JsonSchema7> {
1030 const out: Array<JsonSchema7> = []

Callers 1

compactUnionFunction · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected