Incorrect type definitions
See original GitHub issueThe supplied type definitions are not correct importing the Index as such:
import { Index } from 'flexsearch';
const index = new Index();
results in the error:
'Index' only refers to a type, but is being used as a value here
There exits working type definitions in https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flexsearch but to use them one has to either downgrade to a version containing no type definitions (e.g. 0.7.11) or delete the supplied one.
It would be awesome if you can sort this out.
Issue Analytics
- State:
- Created a year ago
- Reactions:14
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How to overwrite incorrect TypeScript type definition ...
Say that I want to use dotenv module in my TypeScript project and install its . d. ts using npm install @types/dotenv --save...
Read more >tsc 2.9.x generating incorrect type definitions for import types
tldr; when using the new import types feature of tsc 2.9, there are certain circumstances where the import( part is missing.
Read more >TypeScript. How to rewrite type definition file (file.d.ts) of any ...
How to rewrite type definition file (file.d.ts) of any node_modules package. If you have some node_modules package with the very old /odd /...
Read more >Incorrect type definition for Query.select() method
Hi, While upgrading to latest version 21.2.6, new types for the Query class became available to our ... Incorrect type definition for Query.select()...
Read more >Override DefinitelyTyped definition : r/typescript
Can anyone explain how I'd use interface merging for this? I can't seem to get it to work! I've submitted a PR for...
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 Free
Top 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

I’d like to if the developers of this library agree to merge the pull request… https://github.com/nextapps-de/flexsearch/pull/266
I’m experiencing this issue after updating from v0.7.21 to v0.7.31 (I was using this lib with
@types/...definitions before). As of right now it seems completely unusable with typescript (I mean, it works once compiled but it throws type errors everywhere on dev time).I had to rollback to
0.7.21for the time being.