Skip to content

Conversation

@Passant-Abdelgalil
Copy link

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.


The default export from the main 'sift' entry point does not preserve full type information, leading to incorrect or missing typings when used in consumer code. This change updates imports to reference 'sift/lib' directly, which exports a properly typed default function (createDefaultQueryTester).  This ensures type safety and resolves issues like: TS2503: Cannot find namespace 'sift'

closes Error: Cannot find namespace 'sift'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants