chore: fix types

This commit is contained in:
harttle
2020-03-25 00:25:47 +08:00
parent 479c63350a
commit 02e6171e25
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -9,6 +9,7 @@
"scripts": {
"lint": "eslint .",
"docs": "rm docs -rf && typedoc --gitRevision master --out docs src && cp -r website/. docs/",
"check": "npm run lint && npm test && npm run docs && git checkout origin/master docs",
"unit": "mocha \"test/unit/**/*.ts\"",
"integration": "mocha \"test/integration/**/*.ts\"",
"e2e": "npm run build && mocha \"test/e2e/**/*.ts\"",
+2 -2
View File
@@ -34,8 +34,8 @@ export class Liquid {
this.filters = new FilterMap(this.options.strictFilters)
this.tags = new TagMap()
forOwn(builtinTags, (conf, name) => this.registerTag(snakeCase(name), conf))
forOwn(builtinFilters, (handler, name) => this.registerFilter(snakeCase(name), handler))
forOwn(builtinTags, (conf: TagImplOptions, name: string) => this.registerTag(snakeCase(name), conf))
forOwn(builtinFilters, (handler: FilterImplOptions, name: string) => this.registerFilter(snakeCase(name), handler))
}
public parse (html: string, filepath?: string): Template[] {
const tokenizer = new Tokenizer(html, filepath)