Package: @effect/platform-browser
Module: Permissions
Wrapper on the Permission API (navigator.permissions) with methods for
querying status of permissions.
Signature
export interface Permissions {
readonly [TypeId]: typeof TypeId
/**
* Returns the state of a user permission on the global scope.
*/
readonly query: <Name extends PermissionName>(
name: Name
) => Effect.Effect<
// `name` is identical to the name passed to Permissions.query
// https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus
Omit<PermissionStatus, "name"> & { name: Name },
PermissionsError
>
}
Since v4.0.0