update plugin assertion errors

This commit is contained in:
Andre Staltz 2024-01-02 13:11:27 +02:00
parent b05e354aa8
commit 41dcb8a374
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
2 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ const Obz = require('obz')
* @returns {asserts peer is { db: PPPPPDB }} * @returns {asserts peer is { db: PPPPPDB }}
*/ */
function assertDBPlugin(peer) { function assertDBPlugin(peer) {
if (!peer.db) throw new Error('goals plugin requires ppppp-db plugin') if (!peer.db) throw new Error('"goals" plugin requires "db" plugin')
} }
/** /**
@ -61,7 +61,7 @@ function assertDBPlugin(peer) {
* @returns {asserts peer is { dict: PPPPPDict }} * @returns {asserts peer is { dict: PPPPPDict }}
*/ */
function assertDictPlugin(peer) { function assertDictPlugin(peer) {
if (!peer.dict) throw new Error('goals plugin requires ppppp-dict plugin') if (!peer.dict) throw new Error('"goals" plugin requires "dict" plugin')
} }
/** /**
@ -69,7 +69,7 @@ function assertDictPlugin(peer) {
* @returns {asserts peer is { set: PPPPPSet }} * @returns {asserts peer is { set: PPPPPSet }}
*/ */
function assertSetPlugin(peer) { function assertSetPlugin(peer) {
if (!peer.set) throw new Error('goals plugin requires ppppp-set plugin') if (!peer.set) throw new Error('"goals" plugin requires "set" plugin')
} }
/** /**

View File

@ -11,6 +11,6 @@
"module": "node16", "module": "node16",
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
"target": "es2021" "target": "es2022"
} }
} }