Skip to content

Commit

Permalink
fix: add generic support to LogMessage class for specifying the messa…
Browse files Browse the repository at this point in the history
…ge type
  • Loading branch information
KyleRoss committed Dec 10, 2021
1 parent fd873e3 commit 6e6775a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LogMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ILogMessage {
* Having a seperate class and instance for each log allows chaining and the ability to further customize this module in the future without major breaking changes. The documentation
* provided here is what is available to you for each log message.
*/
export default class LogMessage implements ILogMessage {
export default class LogMessage<MT extends Message = Message> implements ILogMessage {
readonly __opts: LambdaLogOptions = {};
__level: string;
__msg = '';
Expand All @@ -45,7 +45,7 @@ export default class LogMessage implements ILogMessage {
* @param {LambdaLogOptions} opts The options for LambdaLog.
* @class
*/
constructor(log: LogObject, opts: LambdaLogOptions) {
constructor(log: LogObject<MT>, opts: LambdaLogOptions) {
// LambdaLog options
this.__opts = opts;
// Log level
Expand Down

0 comments on commit 6e6775a

Please sign in to comment.