Function tag

  • A template tag that will resolve only after all interpolated promises have been resolved, finally returning the intended string.

    Parameters

    • strings: string[]
    • Rest ...expressions: any[]

    Returns Promise<string>

    Example

    import { tag } from 'deleight/apriori';
    const t = tag`I will wait for this ${Promise.resolve("promise")}!!!`
    // t === 'I will wait for this promise!!!'