( defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions )
| 6128 | * @since 4.0.0 |
| 6129 | */ |
| 6130 | export function withDecodingDefaultTypeKey<S extends Constraint, R = never>( |
| 6131 | defaultValue: Effect.Effect<S["Type"], SchemaError, R>, |
| 6132 | options?: DecodingDefaultOptions |
| 6133 | ): (self: S) => withDecodingDefaultTypeKey<S, R> { |
| 6134 | return (self: S): withDecodingDefaultTypeKey<S, R> => { |
| 6135 | return toType(self).pipe( |
| 6136 | withDecodingDefaultKey<toType<S>, R>(defaultValue, options), |
| 6137 | encodeTo(optionalKey(self)) |
| 6138 | ) |
| 6139 | } |
| 6140 | } |
| 6141 | /** |
| 6142 | * Type-level representation returned by {@link withDecodingDefault}. |
| 6143 | * |
nothing calls this directly
no test coverage detected