(namespace: string, view: string, params: Hogan.Context, partials?: Hogan.Partials, indent?: string)
| 37 | } |
| 38 | |
| 39 | render(namespace: string, view: string, params: Hogan.Context, partials?: Hogan.Partials, indent?: string): string { |
| 40 | const templateKey = this.templateKey(namespace, view); |
| 41 | try { |
| 42 | const template = this.preCompiledTemplates[templateKey]; |
| 43 | return template.render(params, partials, indent); |
| 44 | } catch (_e) { |
| 45 | throw new Error(`Could not find template to render '${templateKey}'`); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | template(namespace: string, view: string): Hogan.Template { |
| 50 | return this.preCompiledTemplates[this.templateKey(namespace, view)]; |
no test coverage detected