feat: add option for keeping variable type in output

This commit is contained in:
Alex de Wergifosse
2020-12-16 10:20:10 +08:00
committed by Jun Yang
parent e84fbf32ad
commit cd92e77726
11 changed files with 42 additions and 21 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { Template } from '../template/template'
import { Emitter } from './emitter'
export class Render {
public * renderTemplates (templates: Template[], ctx: Context, emitter = new Emitter()): IterableIterator<string> {
public * renderTemplates (templates: Template[], ctx: Context, emitter: Emitter): IterableIterator<any> {
for (const tpl of templates) {
try {
const html = yield tpl.render(ctx, emitter)