From 6008a8257bdd7df0a5151a98ed1953371feaf1cb Mon Sep 17 00:00:00 2001 From: Matt Basta Date: Tue, 13 Aug 2024 13:06:15 -0400 Subject: [PATCH] fix: remove native.d.ts from .npmignore (#1531) This removes the type definitions for a number of important TypeScript interfaces from `.npmignore` so that the package is not incorrectly typed `any` in a number of places. --- Presently the `opts` argument to `lancedb.connect` is typed `any`, even though it shouldn't be. image Clicking into the type definitions for the published package, it has the correct type signature: image However, `ConnectionOptions` is imported from `native.js` (along with a number of other imports a bit further down): image This is not otherwise an issue, except that the type definitions for `native.js` are not included in the published package: image I haven't compiled the Rust code and run the build script, but I strongly suspect that disincluding the type definitions in `.npmignore` is ultimately the root cause here. --- nodejs/.npmignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nodejs/.npmignore b/nodejs/.npmignore index ebe93e01..2d0d1d82 100644 --- a/nodejs/.npmignore +++ b/nodejs/.npmignore @@ -20,6 +20,5 @@ Cargo.toml biome.json build.rs jest.config.js -native.d.ts tsconfig.json -typedoc.json \ No newline at end of file +typedoc.json