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

Function group

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

Source from the content-addressed store, hash-verified

445 * @since 2.0.0
446 */
447export const group = (
448 options?: { label?: string | undefined; collapsed?: boolean | undefined } | undefined
449): Effect.Effect<void, never, Scope> =>
450 consoleWith((console) =>
451 effect.acquireRelease(
452 effect.sync(() => {
453 if (options?.collapsed) {
454 console.groupCollapsed(options.label)
455 } else {
456 console.group(options?.label)
457 }
458 }),
459 () =>
460 effect.sync(() => {
461 console.groupEnd()
462 })
463 )
464 )
465
466/**
467 * Writes an informational message to the console, typically displayed with info

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected