Closed Alkasai closed 1 year ago
I tested this change. It works fine in NestJS
. Hence approving the PR.
Hey @Alkasai and @aravind-opsverse , thanks for the PR and the review. I'm unfortunately going to pause this, as we're in the progress of refactoring all our JS integrations (web, node & react native) into one unified JS monorepo.
Work on that is happening in the following branches:
Once that's done, all types will be autogenerated and we won't have to worry about manually updating index.d.ts
anymore.
Thanks again for the PR!
@mariusandra Any clue how to solve the issue mentioned by the OP? We get "posthog_node_1.default is not a constructor" when running it with typescript in Nestjs
Please try version 2.0.0 (or 2.0.1) of posthog-node, which is built on top of a new codebase.
Related to this issue: https://github.com/PostHog/posthog-node/issues/50
We could use this type definitions to better represent the code in
index.js
and allow user to useimport PostHog = require('posthog-node');
orimport PostHog from 'posthog-node';