natural icon indicating copy to clipboard operation
natural copied to clipboard

Upgrade type definitions for @types/natural

Open marcoklein opened this issue 4 years ago • 2 comments

I see that the type definitions at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/natural/index.d.ts are for version 2.1.

Are there plans on upgrading them to 3.0.1?

For example I am unable to import the HammingDistance with this version mismatch:

  "dependencies": {
    "natural": "^3.0.1"
  },
  "devDependencies": {
    "@types/natural": "^2.1.1"
  }

marcoklein avatar Feb 10 '21 16:02 marcoklein

I was not aware of this typescript version of natural's interface. I think you should ask the authors of that file. Of course, I can help if they have questions about the new index.js and the index files of the modules.

Hugo-ter-Doest avatar Feb 10 '21 20:02 Hugo-ter-Doest

The way @types works is that pretty much anyone can create PRs there.

Ideally, however, this repo should grab that index.d.ts and drop it into this project and update the types here. Basically, please support typescript :)

Brian-McBride avatar Feb 23 '21 02:02 Brian-McBride

TypeScript type definitions are now part of natural. See #659

Hugo-ter-Doest avatar Dec 31 '22 13:12 Hugo-ter-Doest