From ffefd91fbc0195c589c8c34ae80f2017acfe557c Mon Sep 17 00:00:00 2001 From: Jun Yang Date: Wed, 16 Nov 2022 19:47:15 +0800 Subject: [PATCH] refactor: remove `toThenable` export BREAKING CHANGE: `.toThenable` is removed, use `.toPromise` instead --- src/types.ts | 2 +- src/util/async.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index 1a24849e3..be5185eb2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -22,7 +22,7 @@ export { Hash } from './template/tag/hash' export { Value } from './template/value' // eslint-disable-next-line deprecation/deprecation export { _evalToken, evalToken, evalQuotedToken } from './render/expression' -export { toPromise, toThenable, toValueSync } from './util/async' +export { toPromise, toValueSync } from './util/async' export { defaultOperators, Operators } from './render/operator' export { createTrie, Trie } from './util/operator-trie' export { toValue } from './util/underscore' diff --git a/src/util/async.ts b/src/util/async.ts index 3dba5cb96..9d836cd42 100644 --- a/src/util/async.ts +++ b/src/util/async.ts @@ -44,5 +44,3 @@ export function toValueSync (val: Generator | T): T { } while (!done) return value } - -export const toThenable = toPromise