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<ClipboardItems, PlatformError>
  readonly readString: Effect.Effect<string, PlatformError>
  readonly write: (items: ClipboardItems) => Effect.Effect<void, PlatformError>
  readonly writeString: (text: string) => Effect.Effect<void, PlatformError>
  readonly writeBlob: (blob: Blob) => Effect.Effect<void, PlatformError>
  readonly clear: Effect.Effect<void, PlatformError>
}

Added in v1.0.0

layers

layer

A layer that directly interfaces with the navigator.clipboard api

Signature

export declare const layer: Layer.Layer<Clipboard>

Added in v1.0.0

tag

Clipboard

Signature

export declare const Clipboard: Tag<Clipboard, Clipboard>

Added in v1.0.0