MCPcopy Create free account
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/effect/src/unstable/socket/Socket.ts:347–358  ·  view source on GitHub ↗
(props: {
    readonly reason: SocketReadError | SocketWriteError | SocketOpenError | SocketCloseError
  })

Source from the content-addressed store, hash-verified

345}) {
346 // @effect-diagnostics-next-line overriddenSchemaConstructor:off
347 constructor(props: {
348 readonly reason: SocketReadError | SocketWriteError | SocketOpenError | SocketCloseError
349 }) {
350 if ("cause" in props.reason) {
351 super({
352 ...props,
353 cause: props.reason.cause
354 } as any)
355 } else {
356 super(props)
357 }
358 }
359
360 /**
361 * Marks this value as a socket error wrapper for runtime guards.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected