-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request
Milestone
Description
This line broke typings in a project I help maintain:
toConstructor(): typeof this;
That project uses typescript
4.1.3
, which is quite dated. When dependabot bumped mongoose
from 6.2.0
to 6.5.4
, CI broke with this error:
node_modules/mongoose/types/query.d.ts:619:29 - error TS2304: Cannot find name 'this'.
619 toConstructor(): typeof this;
~~~~
Found 1 error.
error Command failed with exit code 2
I tried bumping typescript
, but it was not very successful. Versions below 4.4
showed the same error and v4.4+
generated a lot of other errors, unrelated to the library. Most of them were to do with error
becoming unknown
instead of any
in catch
.
Not sure if this is actionable, but flagging the problem just in case.
Originally posted by @kachkaev in #12284 (comment)
blumamir, camengadisaputra-dev and kachkaev
Metadata
Metadata
Assignees
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request