MCPcopy Create free account
hub / github.com/Faleij/json-stream-stringify / emitError

Function emitError

test-src/JsonStreamStringify.spec.ts:9–15  ·  view source on GitHub ↗
(err: Error)

Source from the content-addressed store, hash-verified

7
8// create an object that emits an error (err) when serialized to json
9function emitError(err: Error) {
10 return {
11 toJSON() {
12 throw err;
13 },
14 };
15}
16
17function createTest(input, expected, ...args) {
18 return () => new Promise<{ jsonStream: InstanceType<typeof JsonStreamStringify> }>((resolve, reject) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…