( inst: Kernel.Instance, props: unknown, ctx: Context.Context<any> )
| 210 | |
| 211 | /** @internal */ |
| 212 | export const encodeProps = ( |
| 213 | inst: Kernel.Instance, |
| 214 | props: unknown, |
| 215 | ctx: Context.Context<any> |
| 216 | ): Effect.Effect<unknown> => |
| 217 | Effect.catchCause( |
| 218 | encodeJson((inst.component as unknown as Component.Any).props, props), |
| 219 | (cause) => { |
| 220 | warnOnce( |
| 221 | "props", |
| 222 | inst, |
| 223 | ctx, |
| 224 | () => |
| 225 | "its props don't encode as JSON, so the server leaves them out of the state and " + |
| 226 | "HtmlHydrate.decodeProps fails on the client. " + formatCause(cause) |
| 227 | ) |
| 228 | return Effect.undefined |
| 229 | } |
| 230 | ) |
| 231 | |
| 232 | const ignore = () => {} |
| 233 | const mute: services.ServerSink = { |
nothing calls this directly
no test coverage detected