implement ApResolver.secureResolve to use a provided object only if the authority matches
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user