We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
Unhandled error TypeError: fuse_js_1.default is not a constructor
I have an issue when I import Fuse with import style. It's a typescript compilation bug.
Fuse
import Fuse from 'fuse.js'
It work well if I use require but I loose typing.
require
6
Typescript
tsconfig:
{ "compilerOptions": { "module": "CommonJS", "noImplicitReturns": true, "noUnusedLocals": true, "outDir": "lib", "sourceMap": true, "strict": true, "allowJs": true, "target": "ES2018", "lib": ["es2018", "DOM"] }, "compileOnSave": true, "include": [ "src" ] }
typescript file:
const fuse = new Fuse(data, { keys: [ 'name', 'configs.name' ], includeScore: true })
building result:
const fuse = new fuse_js_1.default(data, { keys: [ 'name', 'configs.name' ], includeScore: true });
The text was updated successfully, but these errors were encountered:
My bad, I forget to use "esModuleInterop": true, in my tsconfig.
"esModuleInterop": true,
Sorry, something went wrong.
Thanks for this, was facing the same thing.
No branches or pull requests
Describe the bug
Hello,
I have an issue when I import
Fuse
with import style. It's a typescript compilation bug.It work well if I use
require
but I loose typing.Version
6
Additional context
Typescript
tsconfig:
typescript file:
building result:
The text was updated successfully, but these errors were encountered: