Skip to main content Link Search Menu Expand Document (external link)

Console overview

Added in v2.0.0


Table of contents


accessor

assert

Signature

export declare const assert: (condition: boolean, ...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

clear

Signature

export declare const clear: Effect<void, never, never>

Added in v2.0.0

consoleWith

Signature

export declare const consoleWith: <A, E, R>(f: (console: Console) => Effect<A, E, R>) => Effect<A, E, R>

Added in v2.0.0

count

Signature

export declare const count: (label?: string) => Effect<void>

Added in v2.0.0

countReset

Signature

export declare const countReset: (label?: string) => Effect<void>

Added in v2.0.0

debug

Signature

export declare const debug: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

dir

Signature

export declare const dir: (item: any, options?: any) => Effect<void>

Added in v2.0.0

dirxml

Signature

export declare const dirxml: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

error

Signature

export declare const error: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

group

Signature

export declare const group: (
  options?: { label?: string | undefined; collapsed?: boolean | undefined } | undefined
) => Effect<void, never, Scope>

Added in v2.0.0

info

Signature

export declare const info: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

log

Signature

export declare const log: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

table

Signature

export declare const table: (tabularData: any, properties?: ReadonlyArray<string>) => Effect<void>

Added in v2.0.0

time

Signature

export declare const time: (label?: string | undefined) => Effect<void, never, Scope>

Added in v2.0.0

timeLog

Signature

export declare const timeLog: (label?: string, ...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

trace

Signature

export declare const trace: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

warn

Signature

export declare const warn: (...args: ReadonlyArray<any>) => Effect<void>

Added in v2.0.0

withGroup

Signature

export declare const withGroup: {
  (options?: {
    readonly label?: string | undefined
    readonly collapsed?: boolean | undefined
  }): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>
  <A, E, R>(
    self: Effect<A, E, R>,
    options?: { readonly label?: string | undefined; readonly collapsed?: boolean | undefined }
  ): Effect<A, E, R>
}

Added in v2.0.0

withTime

Signature

export declare const withTime: {
  (label?: string): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>
  <A, E, R>(self: Effect<A, E, R>, label?: string): Effect<A, E, R>
}

Added in v2.0.0

context

Console

Signature

export declare const Console: Context.Tag<Console, Console>

Added in v2.0.0

default services

setConsole

Signature

export declare const setConsole: <A extends Console>(console: A) => Layer.Layer<never>

Added in v2.0.0

withConsole

Signature

export declare const withConsole: {
  <C extends Console>(console: C): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>
  <A, E, R, C extends Console>(effect: Effect<A, E, R>, console: C): Effect<A, E, R>
}

Added in v2.0.0

model

Console (interface)

Signature

export interface Console {
  readonly [TypeId]: TypeId
  assert(condition: boolean, ...args: ReadonlyArray<any>): Effect<void>
  readonly clear: Effect<void>
  count(label?: string): Effect<void>
  countReset(label?: string): Effect<void>
  debug(...args: ReadonlyArray<any>): Effect<void>
  dir(item: any, options?: any): Effect<void>
  dirxml(...args: ReadonlyArray<any>): Effect<void>
  error(...args: ReadonlyArray<any>): Effect<void>
  group(options?: { readonly label?: string | undefined; readonly collapsed?: boolean | undefined }): Effect<void>
  readonly groupEnd: Effect<void>
  info(...args: ReadonlyArray<any>): Effect<void>
  log(...args: ReadonlyArray<any>): Effect<void>
  table(tabularData: any, properties?: ReadonlyArray<string>): Effect<void>
  time(label?: string): Effect<void>
  timeEnd(label?: string): Effect<void>
  timeLog(label?: string, ...args: ReadonlyArray<any>): Effect<void>
  trace(...args: ReadonlyArray<any>): Effect<void>
  warn(...args: ReadonlyArray<any>): Effect<void>
  readonly unsafe: UnsafeConsole
}

Added in v2.0.0

UnsafeConsole (interface)

Signature

export interface UnsafeConsole {
  assert(condition: boolean, ...args: ReadonlyArray<any>): void
  clear(): void
  count(label?: string): void
  countReset(label?: string): void
  debug(...args: ReadonlyArray<any>): void
  dir(item: any, options?: any): void
  dirxml(...args: ReadonlyArray<any>): void
  error(...args: ReadonlyArray<any>): void
  group(...args: ReadonlyArray<any>): void
  groupCollapsed(...args: ReadonlyArray<any>): void
  groupEnd(): void
  info(...args: ReadonlyArray<any>): void
  log(...args: ReadonlyArray<any>): void
  table(tabularData: any, properties?: ReadonlyArray<string>): void
  time(label?: string): void
  timeEnd(label?: string): void
  timeLog(label?: string, ...args: ReadonlyArray<any>): void
  trace(...args: ReadonlyArray<any>): void
  warn(...args: ReadonlyArray<any>): void
}

Added in v2.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v2.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v2.0.0