( schema: S )
| 704 | * The "json" variants will use the object schema directly. |
| 705 | * |
| 706 | * @category schemas |
| 707 | * @since 4.0.0 |
| 708 | */ |
| 709 | export const JsonFromString = <S extends Schema.Top>( |
| 710 | schema: S |
| 711 | ): JsonFromString<S> => { |
| 712 | const parsed = Schema.fromJsonString(Schema.toCodecJson(schema)) as any |
| 713 | return Field({ |
| 714 | select: parsed, |
| 715 | insert: parsed, |
| 716 | update: parsed, |
| 717 | json: schema, |
| 718 | jsonCreate: schema, |
| 719 | jsonUpdate: schema |
| 720 | }) |
| 721 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…