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

TS2349: This expression is not callable #20

Open
abdullah-tsx opened this issue Apr 14, 2022 · 1 comment
Open

TS2349: This expression is not callable #20

abdullah-tsx opened this issue Apr 14, 2022 · 1 comment

Comments

@abdullah-tsx
Copy link

I am trying to use with typescript below code is giving me typescript warning that TS2349: This expression is not callable.
If I import package as import {MongooseMorgan} from "mongoose-morgan"; the warning goes away but then app crashes at run time saying ''import {MongooseMorgan} from "mongoose-morgan""

Can you add documentation regarding typescript ?

export default MongooseMorgan({ connectionString: config.get('db.uri'), collection: "error_logs" }, { skip: (req: Request, res: Response) => { return res.statusCode < 400 } }, 'combined');

@nemanjapetrovic
Copy link
Owner

Hi @abdullahahsan12 ,

I will take a look at it.

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