KyleRoss / node-lambda-log

Basic logging mechanism for Node.js Lambda Functions and other AWS services, which produces logs in JSON format for easier reading through Cloudwatch Logs.
https://lambdalog.dev
MIT License
193 stars 16 forks source link

Provide Official Type Definitions #63

Open ghost opened 3 years ago

ghost commented 3 years ago

Description

I'm using unofficial @types/lambda-log package, and it seems to be incorrect or outdated. For example, in the options object, it doesn't show me tagsKey and messageKey properties, however, when I look from the source code they are defined, and can be set.

It would be better if the repository is re-written in TypeScript, or provides its own type definitions. ...

Why should Lambda Log incorporate this feature?

TypeScript requires type definitions for a package/module, and since this package does not officially provide it, unofficial @types/lambda-log is used, and they are outdated, or incorrect. That's why the package should ship with its own type definitions. ...

KyleRoss commented 3 years ago

I've noticed there has been a discrepancy with the type definitions. I, unfortunately, did not create them and would prefer to pull the types into the repository as you have mentioned.

I'm in the progress of building v4.0.0 now in TypeScript to solve for this issue :)