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

Function group

packages/effect/src/Console.ts:460–477  ·  view source on GitHub ↗
(
  options?: { label?: string | undefined; collapsed?: boolean | undefined } | undefined
)

Source from the content-addressed store, hash-verified

458 * @since 2.0.0
459 */
460export const group = (
461 options?: { label?: string | undefined; collapsed?: boolean | undefined } | undefined
462): Effect.Effect<void, never, Scope> =>
463 consoleWith((console) =>
464 effect.acquireRelease(
465 effect.sync(() => {
466 if (options?.collapsed) {
467 console.groupCollapsed(options.label)
468 } else {
469 console.group(options?.label)
470 }
471 }),
472 () =>
473 effect.sync(() => {
474 console.groupEnd()
475 })
476 )
477 )
478
479/**
480 * Writes an informational message to the console, typically displayed with info

Callers

nothing calls this directly

Calls 5

consoleWithFunction · 0.85
groupCollapsedMethod · 0.80
groupEndMethod · 0.80
groupMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected