Skip to content

Permissions

8 exports Added in v1.0.0 Source

Errors

Signature

declare class PermissionsError extends any {
  constructor();
  message: any;
}

Interface

Permissions interface

Added in v1.0.0 Source

Wrapper on the Permission API (navigator.permissions) with methods for querying status of permissions.

Signature

interface Permissions {
  readonly [TypeId]: typeof TypeId;
  readonly query: <Name extends PermissionName>(
    name: Name,
  ) => Effect<
    Omit<PermissionStatus, "name"> & {
      name: Name;
    },
    PermissionsError
  >;
}

Layers

layer

Added in v1.0.0 Source

A layer that directly interfaces with the navigator.permissions api

Signature

declare const layer: Layer.Layer<Permissions>;

Tags

Permissions

Added in v1.0.0 Source

Signature

declare const Permissions: Tag<Permissions, Permissions>;

Type Ids

ErrorTypeId

Added in v1.0.0 Source

Signature

declare const ErrorTypeId: unique symbol;

ErrorTypeId type

Added in v1.0.0 Source

Signature

type ErrorTypeId = typeof ErrorTypeId;

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;