any-date-parser icon indicating copy to clipboard operation
any-date-parser copied to clipboard

Error in typings using TSServer

Open dbellavista opened this issue 2 years ago • 1 comments

Hi, I'm using tsserver for typechecking on a nodejs project, and I get an error when importing the package See the gist: https://gist.github.com/dbellavista/901a33f0f23b1159972965349a19fbd1

$ npx tsc -p ./jsconfig.json
test.js:3:9 - error TS2306: File '/asd/node_modules/any-date-parser/index.d.ts' is not a module.

3 require('any-date-parser');
          ~~~~~~~~~~~~~~~~~


Found 1 error in test.js:3

dbellavista avatar Jun 07 '22 14:06 dbellavista

I think I have a similar problem while using Typescript with React:

Screenshot 2022-06-30 at 09 19 35

I still can use it via const parser = require("any-date-parser");, but then I have no typings.

arough007 avatar Jun 30 '22 07:06 arough007