UNPKG

@thepassle/app-tools

Version:

Collection of tools I regularly use to build apps. Maybe they're useful to somebody else. Maybe not. Most of these are thin wrappers around native API's, like the native `<dialog>` element, `fetch` API, and `URLPattern`.

10 lines (9 loc) 296 B
/** * Syntax sugar to conditionally render a template * * @param {boolean} expression * @param {() => any} trueValue * @param {() => any} [falseValue] * @returns {any | undefined} */ export function when(expression: boolean, trueValue: () => any, falseValue?: () => any): any | undefined;