(options?: ErrorOptions)
| 9369 | * @since 4.0.0 |
| 9370 | */ |
| 9371 | export function Defect(options?: ErrorOptions): Defect { |
| 9372 | const key = getErrorOptionsKey(options) |
| 9373 | const cached = defectSchemaCache[key] |
| 9374 | if (cached !== undefined) { |
| 9375 | return cached |
| 9376 | } |
| 9377 | const schema = Json.pipe(decodeTo(Unknown, SchemaTransformation.defectFromJson(getErrorOptions(key)))) |
| 9378 | defectSchemaCache[key] = schema |
| 9379 | return schema |
| 9380 | } |
| 9381 | /** |
| 9382 | * Type-level representation returned by {@link ReadonlyMap}. |
| 9383 | * |
nothing calls this directly
no test coverage detected