Skip to content

Commit

Permalink
fix: add generic to LogObject type to specify type of Message
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleRoss committed Dec 10, 2021
1 parent 9bafeb0 commit cd1c746
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export type Formatter =
((ctx: LogMessage, options: LambdaLogOptions, stringify: StringifyType) => string);

export type LogObject = {
export type LogObject<T extends Message = Message> = {
level: string;
msg: Message;
meta?: GenericRecord;
msg: T;
meta?: Metadata;
tags?: Tag[];
};

Expand Down

0 comments on commit cd1c746

Please sign in to comment.