(type: SchemaType)
| 212 | } |
| 213 | |
| 214 | enum(type: SchemaType): string { |
| 215 | |
| 216 | const reduceEnumValues = (lines: string[], enumValue: EnumValue) => lines |
| 217 | .concat( |
| 218 | [''], |
| 219 | this.description(enumValue.description), [html.property(enumValue.name) + this.deprecated(enumValue)], |
| 220 | ); |
| 221 | |
| 222 | return html.line(html.keyword('enum') + ' ' + html.identifier(type) + ' {') + |
| 223 | type.enumValues |
| 224 | .reduce(reduceEnumValues, []) |
| 225 | .map(line => html.line(html.tab(line))) |
| 226 | .join('') + |
| 227 | html.line('}'); |
| 228 | } |
| 229 | |
| 230 | field(field: Field): string { |
| 231 |
no test coverage detected