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

Clipboard overview

Added in v1.0.0


Table of contents


constructor

make

Signature

export declare const make: (impl: Omit<Clipboard, "clear" | "writeBlob">) => Clipboard

Added in v1.0.0

interface

Clipboard (interface)

Signature

export interface Clipboard {
  readonly read: Effect.Effect<never, PlatformError, ClipboardItems>
  readonly readString: Effect.Effect<never, PlatformError, string>
  readonly write: (items: ClipboardItems) => Effect.Effect<never, PlatformError, void>
  readonly writeString: (text: string) => Effect.Effect<never, PlatformError, void>
  readonly writeBlob: (blob: Blob) => Effect.Effect<never, PlatformError, void>
  readonly clear: Effect.Effect<never, PlatformError, void>
}

Added in v1.0.0

layers

layer

A layer that directly interfaces with the navigator.clipboard api

Signature

export declare const layer: Layer.Layer<never, never, Clipboard>

Added in v1.0.0

tag

Clipboard

Signature

export declare const Clipboard: Tag<Clipboard, Clipboard>

Added in v1.0.0