(template: string, params: any)
| 35 | } |
| 36 | |
| 37 | export function interpolate(template: string, params: any) { |
| 38 | const names = Object.keys(params); |
| 39 | const vals = Object.values(params); |
| 40 | // eslint-disable-next-line @typescript-eslint/no-implied-eval |
| 41 | return new Function(...names, `return \`${template}\`;`)(...vals); |
| 42 | } |
| 43 | |
| 44 | export function assert(arg0: boolean, arg1?: string) { |
| 45 | if (!arg0) { |