diff --git a/lib/index.d.ts b/lib/index.d.ts index 62391f1..2dea4df 100755 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -105,6 +105,11 @@ export interface Payload { The error message derived from error.message */ message: string; + + /** + * Custom properties + */ + [key: string]: unknown; } diff --git a/test/index.ts b/test/index.ts index a4d6f5d..d4d73fe 100755 --- a/test/index.ts +++ b/test/index.ts @@ -32,6 +32,11 @@ expect.type(new CustomError('Some error')); const boom = new Boom.Boom('some error'); expect.type(boom.output); +boom.output.payload.custom_null = null; +boom.output.payload.custom_number = 42; +boom.output.payload.custom_string = 'foo'; +boom.output.payload.custom_boolean = true; +boom.output.payload.custom_object = { bar: 42 }; expect.type(boom.output.payload);