Skip to content

Geolocation

9 exports Added in v1.0.0 Source

Accessors

Signature

declare function watchPosition(
  options?: PositionOptions & {
    readonly bufferSize?: number;
  },
): Stream<GeolocationPosition, GeolocationError, Geolocation>;

Errors

Signature

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

Layers

layer

Added in v1.0.0 Source

Signature

declare const layer: Layer.Layer<Geolocation>;

Models

Geolocation interface

Added in v1.0.0 Source

Signature

interface Geolocation {
  readonly [TypeId]: typeof TypeId;
  readonly getCurrentPosition: (
    options?: PositionOptions,
  ) => Effect<GeolocationPosition, GeolocationError>;
  readonly watchPosition: (
    options?: PositionOptions & {
      readonly bufferSize?: number;
    },
  ) => Stream<GeolocationPosition, GeolocationError>;
}

Tags

Geolocation

Added in v1.0.0 Source

Signature

declare const Geolocation: Tag<Geolocation, Geolocation>;

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;