Compromise: TypeScript Support

Created on 31 Jul 2019  Â·  4Comments  Â·  Source: spencermountain/compromise

import { nlp } from "compromise";

support importing feature.

Could not find a declaration file for module 'compromise'. 'c:/Users/xoxo/projects/xoxo/node_modules/compromise/builds/compromise.js' implicitly has an 'any' type.
  Try `npm install @types/compromise` if it exists or add a new declaration (.d.ts) file containing `declare module 'compromise';`ts(7016)
feature-request

Most helpful comment

hi 张梓径, this will be available in v12.
it should be a few weeks.
cheers

All 4 comments

hi 张梓径, this will be available in v12.
it should be a few weeks.
cheers

I definitely want this also!

Yes please!

hey, this should work now, in ^12.0.0. I'm not a typescript-pro, but I've got a typefile here and it is linked in the package.json. I've tried it out in a cursory way, but I'd love some help, or some confirmation that it works.
Plz lemme know how it goes!
thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xetanai picture Xetanai  Â·  4Comments

douglance picture douglance  Â·  4Comments

charles-toller picture charles-toller  Â·  3Comments

drhayes picture drhayes  Â·  4Comments

hboylan picture hboylan  Â·  7Comments