@@ -14,7 +14,7 @@ import { FilterMap } from './template/filter/filter-map'
14
14
import { LiquidOptions , normalizeStringArray , NormalizedFullOptions , applyDefault , normalize } from './liquid-options'
15
15
import { FilterImplOptions } from './template/filter/filter-impl-options'
16
16
import { FS } from './fs/fs'
17
- import { toThenable , toValue } from './util/async'
17
+ import { toPromise , toValue } from './util/async'
18
18
19
19
export * from './types'
20
20
@@ -49,7 +49,7 @@ export class Liquid {
49
49
return this . renderer . renderTemplates ( tpl , ctx )
50
50
}
51
51
public async render ( tpl : Template [ ] , scope ?: object , opts ?: LiquidOptions ) : Promise < string > {
52
- return toThenable ( this . _render ( tpl , scope , opts , false ) )
52
+ return toPromise ( this . _render ( tpl , scope , opts , false ) )
53
53
}
54
54
public renderSync ( tpl : Template [ ] , scope ?: object , opts ?: LiquidOptions ) : string {
55
55
return toValue ( this . _render ( tpl , scope , opts , true ) )
@@ -60,7 +60,7 @@ export class Liquid {
60
60
return this . _render ( tpl , scope , opts , sync )
61
61
}
62
62
public async parseAndRender ( html : string , scope ?: object , opts ?: LiquidOptions ) : Promise < string > {
63
- return toThenable ( this . _parseAndRender ( html , scope , opts , false ) )
63
+ return toPromise ( this . _parseAndRender ( html , scope , opts , false ) )
64
64
}
65
65
public parseAndRenderSync ( html : string , scope ?: object , opts ?: LiquidOptions ) : string {
66
66
return toValue ( this . _parseAndRender ( html , scope , opts , true ) )
@@ -88,7 +88,7 @@ export class Liquid {
88
88
throw this . lookupError ( file , options . root )
89
89
}
90
90
public async parseFile ( file : string , opts ?: LiquidOptions ) : Promise < Template [ ] > {
91
- return toThenable ( this . _parseFile ( file , opts , false ) )
91
+ return toPromise ( this . _parseFile ( file , opts , false ) )
92
92
}
93
93
public parseFileSync ( file : string , opts ?: LiquidOptions ) : Template [ ] {
94
94
return toValue ( this . _parseFile ( file , opts , true ) )
@@ -108,7 +108,7 @@ export class Liquid {
108
108
return value . value ( ctx )
109
109
}
110
110
public async evalValue ( str : string , ctx : Context ) : Promise < any > {
111
- return toThenable ( this . _evalValue ( str , ctx ) )
111
+ return toPromise ( this . _evalValue ( str , ctx ) )
112
112
}
113
113
public evalValueSync ( str : string , ctx : Context ) : any {
114
114
return toValue ( this . _evalValue ( str , ctx ) )
0 commit comments