( schema: S )
| 109 | * @since 4.0.0 |
| 110 | */ |
| 111 | export const initialMessage = <S extends Schema.Constraint>( |
| 112 | schema: S |
| 113 | ): Effect.Effect<S["Type"], NoSuchElementError | Schema.SchemaError, Protocol | S["DecodingServices"]> => |
| 114 | ProtocolTag.pipe( |
| 115 | Effect.flatMap((protocol) => protocol.initialMessage), |
| 116 | Effect.flatMap(Effect.fromOption), |
| 117 | Effect.flatMap(Schema.decodeUnknownEffect(Schema.toCodecJson(schema))) |
| 118 | ) |
nothing calls this directly
no test coverage detected