(definitions: DefinitionCollections)
| 131 | } |
| 132 | |
| 133 | function experimentalDefinitionNames(definitions: DefinitionCollections): Set<string> { |
| 134 | const names = new Set<string>(); |
| 135 | for (const defs of [definitions.definitions, definitions.$defs]) { |
| 136 | for (const [name, def] of Object.entries(defs ?? {})) { |
| 137 | if (typeof def === "object" && def !== null && isSchemaExperimental(def as JSONSchema7)) { |
| 138 | names.add(name); |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | return names; |
| 143 | } |
| 144 | |
| 145 | function annotateTypeScriptTypes(code: string, typeNames: Iterable<string>, annotation: string): string { |
| 146 | let annotated = code; |
no test coverage detected
searching dependent graphs…