importPeer
function importPeer<T>( name, subpath, load): Promise<T>;Defined in: src/internal/peer.ts:21
import(name) an optional peer, turning a module-not-found error into requirePeer’s
message. Other errors (a broken install, a throwing module) propagate unchanged.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
subpath |
string |
load |
() => Promise<T> |
Returns
Section titled “Returns”Promise<T>