( defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions )
| 5869 | options?: DecodingDefaultOptions |
| 5870 | ) { |
| 5871 | const encode = options?.encodingStrategy === "omit" ? SchemaGetter.omit() : SchemaGetter.passthrough() |
| 5872 | return (self: S): withDecodingDefaultKey<S, R> => { |
| 5873 | return optionalKey(toEncoded(self)).pipe(decodeTo(self, { |
| 5874 | decode: SchemaGetter.withDefault(toIssueEffect(defaultValue)), |
| 5875 | encode |
| 5876 | })) |
| 5877 | } |
| 5878 | } |
| 5879 | |
| 5880 | /** |
| 5881 | * Type-level representation returned by {@link withDecodingDefaultTypeKey}. |
| 5882 | * |
| 5883 | * @category decoding |
| 5884 | * @since 4.0.0 |
nothing calls this directly
no test coverage detected
searching dependent graphs…