module export for TypeScript
danbraik opened this issue · comments
Hello,
first thank you for your wonderful library !
I am writing an app with TypeScript and importing it like :
import { FuzzySet } from 'fuzzyset';
but when instanciating,
this._fuzzySet = FuzzySet();
I got this error :
ERROR TypeError: Object(...) is not a function
.
If I am correct, to allow your library to be TypeScript compatible, you can just update the final line to
module.exports.FuzzySet = FuzzySet;
(it may change the way to use it in vanilla JS)
Best regards !
The following worked for me:
import * as FuzzySet from 'fuzzyset.js';
hey, this should be fixed in 513d391! Anybody want to test?