Skip to content

Logger typings appear to be wrong #6933

@osdiab

Description

@osdiab

Issue type:

[ ] bug report
[ ] feature request
[x] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.25 (or put your version here)
but it still seems to be the case in the source code

Steps to reproduce or a small repository showing the problem:
I made a custom logger and followed the types provided by the library for logQueryError to take a first parameter error of type string, but when i actually inspect the error parameter it appears to be an instance of Error, not a string. This is misleading; are there certain cases where it will really be a string, or can the typing be changed entirely to Error or some subtype of Error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions