mirror of https://codeberg.org/pzp/pzp-promise.git
update plugin assertion errors
This commit is contained in:
parent
908f7507c8
commit
000dd016f4
|
@ -1,4 +1,5 @@
|
||||||
node_modules
|
node_modules
|
||||||
.nyc_output
|
.nyc_output
|
||||||
coverage
|
coverage
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
*.d.ts
|
|
@ -27,8 +27,7 @@ const b4a = require('b4a')
|
||||||
* @returns {asserts peer is { db: PPPPPDB }}
|
* @returns {asserts peer is { db: PPPPPDB }}
|
||||||
*/
|
*/
|
||||||
function assertDBPlugin(peer) {
|
function assertDBPlugin(peer) {
|
||||||
// prettier-ignore
|
if (!peer.db) throw new Error('"promise" plugin requires "db" plugin')
|
||||||
if (!peer.db) throw new Error('promise plugin plugin requires ppppp-db plugin')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,8 +35,7 @@ function assertDBPlugin(peer) {
|
||||||
* @returns {asserts peer is { set: PPPPPSet }}
|
* @returns {asserts peer is { set: PPPPPSet }}
|
||||||
*/
|
*/
|
||||||
function assertSetPlugin(peer) {
|
function assertSetPlugin(peer) {
|
||||||
// prettier-ignore
|
if (!peer.set) throw new Error('"promise" plugin requires "set" plugin')
|
||||||
if (!peer.set) throw new Error('promise plugin plugin requires ppppp-set plugin')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue