swc/bundler/tests/.cache/deno/f87cd8105f83d28a9715932f46a1ef3699df5d69.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

12 lines
361 B
TypeScript

// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_assertPromise.js
import _isFunction from './_isFunction.js';
import _toString from './_toString.js';
export default function _assertPromise(name, p) {
if (p == null || !_isFunction(p.then)) {
throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, []));
}
}