implement ApResolver.secureResolve to use a provided object only if the authority matches
This commit is contained in:
parent
1ed2f207f7
commit
ad49faa956
2 changed files with 36 additions and 2 deletions
|
|
@ -1,4 +1,11 @@
|
|||
export function fromTuple<T>(value: T | [T]): T {
|
||||
/*
|
||||
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export function fromTuple<T>(value: T | [T]): T;
|
||||
export function fromTuple<T>(value: T | [T] | T[]): T | undefined;
|
||||
export function fromTuple<T>(value: T | [T] | T[]): T | undefined {
|
||||
if (Array.isArray(value)) {
|
||||
return value[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue