unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
1.92k stars 109 forks source link

Fix: ESM build support #433

Closed johnhorsema closed 1 month ago

johnhorsema commented 1 month ago

This PR fixes https://github.com/unum-cloud/usearch/issues/426 by adding "esModuleInterop": true to tsconfig-esm.json and

const usearch = {
    Index,
    MetricKind,
    ScalarKind,
    Matches,
    BatchMatches,
    exactSearch,
};
export default usearch;

to the usearch.ts file.

ashvardanian commented 1 month ago

Thank you, @johnhorsema 🤗