|
@@ -212,9 +212,9 @@ export function check(permission: Permission): Promise<PermissionStatus> {
|
212
|
212
|
return internalCheck(permission);
|
213
|
213
|
}
|
214
|
214
|
|
215
|
|
-export function checkMultiple(
|
216
|
|
- permissions: Permission[],
|
217
|
|
-): Promise<{ [permission: Permission]: PermissionStatus }> {
|
|
215
|
+export function checkMultiple<P: Permission>(
|
|
216
|
+ permissions: P[],
|
|
217
|
+): Promise<{ [permission: P]: PermissionStatus }> {
|
218
|
218
|
permissions.forEach(assertValidPermission);
|
219
|
219
|
return internalCheckMultiple(permissions);
|
220
|
220
|
}
|
|
@@ -227,9 +227,9 @@ export function request(
|
227
|
227
|
return internalRequest(permission, config);
|
228
|
228
|
}
|
229
|
229
|
|
230
|
|
-export function requestMultiple(
|
231
|
|
- permissions: Permission[],
|
232
|
|
-): Promise<{ [permission: Permission]: PermissionStatus }> {
|
|
230
|
+export function requestMultiple<P: Permission>(
|
|
231
|
+ permissions: P[],
|
|
232
|
+): Promise<{ [permission: P]: PermissionStatus }> {
|
233
|
233
|
permissions.forEach(assertValidPermission);
|
234
|
234
|
return internalRequestMultiple(permissions);
|
235
|
235
|
}
|