davidmarkclements / fast-safe-stringify

Safely and quickly serialize JavaScript objects
MIT License
348 stars 27 forks source link

[ts] Cannot invoke an expression whose type lacks a call signature #36

Closed nvtuan305 closed 6 years ago

nvtuan305 commented 6 years ago

Hello, I got this error with tslint. The below code still work but I got the error warning with tslint.

[ts] Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("../node_modules/fast-safe-stringify/index' has no compatible call signatures.

Here is my code

const stringify = require('fast-safe-stringify');
const info = { message: 'Message from John...' };
console.log(stringify(info));
davidmarkclements commented 6 years ago

Hi @nvtuan305 any typescript suppport we have has been contributed by typescipters. If you get to the bottom of your problem are PR is more than welcome however I don't consider this a fast-safe-stringify issue as much as a typescript ecosystem problem - closing for now