natural icon indicating copy to clipboard operation
natural copied to clipboard

Add official TypeScript types?

Open justinfagnani opened this issue 3 years ago • 1 comments

Types on DefinitelyTyped can easily be wrong or get stale, as shown by a few issues here that are really about the DefinitelyTyped package. Could this project publish official, up-to-date typings? If would help in using the APIs tremendously.

justinfagnani avatar Oct 08 '22 17:10 justinfagnani

Agreed, this would greatly aid in integrating cleanly with TypeScript projects.

andynunes avatar Nov 15 '22 21:11 andynunes

@andynunes @justinfagnani I am in the process of adding TypeScript support. Would be great if could take a look at the first steps. I added a index.d.ts to the tokenizers folder to begin with. See https://github.com/NaturalNode/natural/pull/659

My plan is to add TypeScript index files to each folder and then to bring them together in an overall index file at the main level. Just as is done with the Javascript index files. Like this NaturalNode can be used in modules. You don't have to include the complete library.

Hugo-ter-Doest avatar Dec 14 '22 09:12 Hugo-ter-Doest

Merged #659

Hugo-ter-Doest avatar Dec 29 '22 12:12 Hugo-ter-Doest