Skip to content

Commit

Permalink
Output <anonymous> when methodName is null #65
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Nov 24, 2020
1 parent d4bcdf2 commit 66f53bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/LoggerWithoutCallSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ export class LoggerWithoutCallSite {
? ` ${logObject.typeName}.${logObject.methodName}`
: logObject.functionName != null
? ` ${logObject.functionName}`
: logObject.typeName !== null
? `${logObject.typeName}.<anonymous>`
: ""
: "";

Expand Down
4 changes: 2 additions & 2 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "esnext",
"target": "es2015",
"target": "es2019",
"removeComments": false,
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"emitDeclarationOnly": true
}
}
}

0 comments on commit 66f53bf

Please sign in to comment.