refactor: strictly typed

This commit is contained in:
harttle
2019-02-23 00:49:54 +08:00
parent 51f7e66f60
commit 5b6100d12b
86 changed files with 2630 additions and 2590 deletions
+2 -2
View File
@@ -33,14 +33,14 @@ describe('Liquid', function () {
})
after(restore)
it('should render single template', function (done) {
render.call({ root: '.' }, 'foo', null, (err, result) => {
render.call({ root: '.' }, 'foo', null as any, (err: Error | null, result: string | undefined) => {
if (err) return done(err)
expect(result).to.equal('foo')
done()
})
})
it('should render single template with Array-typed root', function (done) {
render.call({ root: ['.'] }, 'foo', null, (err, result) => {
render.call({ root: ['.'] }, 'foo', null as any, (err: Error | null, result: string | undefined) => {
if (err) return done(err)
expect(result).to.equal('foo')
done()