Skip to content

Error

11 exports Added in v1.0.0 Source

Error

TypeIdError

Added in v1.0.0 Source

Signature

declare function TypeIdError<TypeId extends symbol, Tag extends string>(
  typeId: TypeId,
  tag: Tag,
): <A extends Record<string, any>>(
  args: Simplify<A>,
) => YieldableError &
  Record<TypeId, TypeId> & {
    readonly _tag: Tag;
  } & Readonly<A>;

Model

Signature

declare const SystemErrorReason: Literal<"AlreadyExists">;

SystemErrorReason type

Added in v1.0.0 Source

Signature

type SystemErrorReason = typeof SystemErrorReason.Type;

Models

BadArgument

Added in v1.0.0 Source

Signature

declare class BadArgument extends any {
  constructor();
  readonly [TypeId]: typeof TypeId;
  message: string;
}

Module

Added in v1.0.0 Source

Signature

declare const Module: Literal<"Clipboard">;

Signature

declare const PlatformError: Union<[typeof BadArgument, typeof SystemError]>;

PlatformError type

Added in v1.0.0 Source

Signature

type PlatformError = BadArgument | SystemError;

Models

SystemError

Added in v1.0.0 Source

Signature

declare class SystemError extends any {
  constructor();
  readonly [TypeId]: typeof TypeId;
  message: string;
}

Refinements

Signature

declare function isPlatformError(u: unknown): u is PlatformError;

Type Id

TypeId

Added in v1.0.0 Source

Signature

declare const TypeId: unique symbol;

TypeId type

Added in v1.0.0 Source

Signature

type TypeId = typeof TypeId;