Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json TS2345: Argument of type 'null' is not assignable to parameter of type 'Record<string, any> | PromiseLike<Record<string, any>>' #143

Closed
laser-bemlo opened this issue Jun 6, 2023 · 2 comments

Comments

@laser-bemlo
Copy link

I am getting the following error, while trying to use the package:

error TS2345: Argument of type 'null' is not assignable to parameter of type 'Record<string, any> | PromiseLike<Record<string, any>>'

It happens when the project is compiled as part of NestJs applciation.
Basically, it says that json has a wrong type, which was deducted from value assigned to it (an it is only null). While function response never expects null as return type.

image

image

Can you modify it to something like: resolve(json ?? {});?

@clabland
Copy link
Contributor

clabland commented Jun 6, 2023

Thanks for writing up this issue, we have a change here which should hopefully solve it: #144

@clabland
Copy link
Contributor

clabland commented Jun 9, 2023

Thanks again for the report, this should be resolved in https://github.com/customerio/customerio-node/releases/tag/v4.1.1.

@clabland clabland closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants