Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: tests
  • Loading branch information
Zamiell committed Nov 28, 2023
commit f92d0432f7f00d5fd2be84b84acd19473deba98d
13 changes: 1 addition & 12 deletions test/types/pino.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pino({ name: "my-logger" }, destinationViaOptionsObject);

try {
throw new Error('Some error')
} catch (err) {
} catch (err: any) {
log.error(err)
}

Expand All @@ -265,16 +265,6 @@ interface StrictShape {
err?: unknown;
}

// The following generic parameter is no longer supported:

/*
info<StrictShape>({
activity: "Required property",
});
*/

// Instead, the `satisfies` operator should be used like you would with any other TypeScript code, like in the below example.

info({
activity: "Required property",
} satisfies StrictShape);
Expand Down Expand Up @@ -311,7 +301,6 @@ const customBaseLogger: CustomBaseLogger = {

// custom levels
const log3 = pino({ customLevels: { myLevel: 100 } })
// @ts-expect-error We intentionally cause a run-time error here.
expectError(log3.log())
log3.level = 'myLevel'
log3.myLevel('')
Expand Down