UNPKG

@qaflag/core

Version:

Base requirements for the QA Flag library

10 lines (8 loc) 239 B
import { ValueInterface } from '../value/value.interface'; export async function as<T extends ValueInterface>( value: Promise<T> | T, name: string, ): Promise<T> { const awaitedValue = await value; return awaitedValue.as(name); }