Skip to content

Commit cd1c746

Browse files
committed
fix: add generic to LogObject type to specify type of Message
1 parent 9bafeb0 commit cd1c746

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/typings.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ export type Formatter =
2323
((ctx: LogMessage, options: LambdaLogOptions, stringify: StringifyType) => string);
2424

2525
export type LogObject = {
26+
export type LogObject<T extends Message = Message> = {
2627
level: string;
27-
msg: Message;
28-
meta?: GenericRecord;
28+
msg: T;
29+
meta?: Metadata;
2930
tags?: Tag[];
3031
};
3132

0 commit comments

Comments
 (0)