Incorrect TypeScript Definition for sentences()
See original GitHub issueI believe there is a TypeScript definition issue with sentences()
:
Error:
Property 'subjects' does not exist on type 'ExtendedDocument<{ sentences(n?: number | undefined): Sentences; }, World, Phrase>'.
TS Code:
import nlp from 'compromise';
import compromiseSentences from 'compromise-sentences';
const nlpEx = nlp.extend(compromiseSentences);
nlpEx('Hi bob').sentences().subjects();
Working on observablehq:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Documentation - Understanding Errors - TypeScript
Whenever TypeScript finds an error, it tries to explain what went wrong in as much detail as possible. Because its type system is...
Read more >Typescript errors don't match the definition file - Stack Overflow
Typescript errors don't match the definition file ... I just switched to VS2015 and Typescript 1.7 and get some weird type errors when...
Read more >Wrong Typescript type definitions for RemoteVideoTrack and ...
[X ] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in...
Read more >Surviving the TypeScript Ecosystem — Part 4 - Medium
I will try to update examples from time-to-time with TypeScript updates. ... Now we can remove our incorrect module definition for lodash (delete...
Read more >Learn TypeScript – The Ultimate Beginners Guide
TypeScript is a superset of JavaScript, meaning that it does ... from a string to a number - no problem // TypeScript let...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh right 😄
sentences(): ExtendedDocument<Ext, W, Ph>
is a built in function (looks like it should actually take a parameter also…).ah, thank you. good find. will add to next release.