You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With latest changes in 2.5.* , following change is added in index.d.ts, which is causing issue "TS1023: An index signature parameter type must be either 'string' or 'number'"
If this worked in a previous version of Logform, which was it?
v2.4.2
Minimum Working Example
import{createLogger,format,transports,LoggerasWinstonLogger,}from'winston';constlogger=createLogger({level: "error",format: format.combine(format.timestamp(),format.json()),transports: [newtransports.Console({handleExceptions: false})],exitOnError: false,});logger.log('debug',"127.0.0.1 - there's no place like home");
Are you able to try with TS 4.4+? As reported in some other issues recently, logform 2.5+ (unintentionally) now depends on TS 4.4+, so if your project is stuck with TS 4.3, we recommend pinning logform as a dependency to 2.4.2.
The problem
With latest changes in 2.5.* , following change is added in index.d.ts, which is causing issue "TS1023: An index signature parameter type must be either 'string' or 'number'"
Typescript : 4.3.5
Node : 14
export interface TransformableInfo {
level: string;
message: any;
[LEVEL]?: string;
[MESSAGE]?: any;
[SPLAT]?: any;
[key: string | symbol]: any;
}
What version of Logform presents the issue?
v2.5.0 and v2.5.1
What version of Node are you using?
v14.17.3
If this worked in a previous version of Logform, which was it?
v2.4.2
Minimum Working Example
package.json
{
"name": "logform-issue",
"version": "1.0.0",
"description": "",
"main": "index.ts",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"build": "tsc -p tsconfig.json"
},
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^18.13.0",
"winston": "^3.8.2",
"typescript": "4.3.5"
}
}
Additional information
No response
🔎 Search Terms
typescript
The text was updated successfully, but these errors were encountered: