feathers-reactive icon indicating copy to clipboard operation
feathers-reactive copied to clipboard

fix: :bug: use 'sift/lib' import to restore proper type inference

Open Passant-Abdelgalil opened this issue 5 months ago • 0 comments

Summary

This PR updates imports from sift to sift/lib to fix a typing issue caused by the default export of the sift package. The main sift entry point does not preserve the full type signature of its default export (createDefaultQueryTester), which results in incomplete or incorrect typings in consuming code.

Problem When importing from sift directly:

import sift from 'sift';

TypeScript fails to infer the correct type and raises the error:

TS2503: Cannot find namespace 'sift'

This happens because the default re-export in the root entry point lacks proper type propagation.

Solution

This PR changes the import to:

import sift from 'sift/lib';

This directly references the file that properly exports createDefaultQueryTester with full type annotations, restoring correct type inference.


Passant-Abdelgalil avatar Jun 16 '25 10:06 Passant-Abdelgalil