-
Notifications
You must be signed in to change notification settings - Fork 154
Maintenance: add missing resetKeys
method to LoggerInterface
#3212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for opening this issue. The method is indeed missing from the interface, however I am both unable to reproduce the issue using the steps you described and inclined to change the definition of this issue. Because this is, by definition, a compile time error - it's not a bug under the classification for this project (aka bugs must [...] produces [sic] incorrect or unexpected results at runtime that differ from its intended behavior.). In terms of reproducing the bug, I just started a new sample project from scratch and using the {
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": [
"es2022"
],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"cdk.out"
]
} We'll be adding the missing method to the interface, however it'd be helpful to understand the use case to see if there's anything else we are missing and can improve in our docs. |
resetKeys
method to LoggerInterface
Also, I have added this to the backlog and added the If you want to ensure that it will included in the next release (next Tuesday), feel free to send a PR and I'll be happy to help you get it merged. |
There you go ;) #3213 |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.10.0 version! |
Expected Behavior
Being able to call
logger.resetKeys()
without getting typescript compilation errors.Current Behavior
logger.resetKeys()
results in a typescript errorProperty 'resetKeys' does not exist on type 'Logger'
. I believe this is because LoggerInterface does not defineresetKeys()
.Code snippet
Steps to Reproduce
Compile with Typescript strict settings
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: