Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Type instantiation is excessively deep and possibly infinite" error on drop when typescript is set to strict: false #309

Open
Tim-Gaud opened this issue Dec 2, 2024 · 0 comments

Comments

@Tim-Gaud
Copy link

Tim-Gaud commented Dec 2, 2024

I'm getting "Type instantiation is excessively deep and possibly infinite" error when calling drop.
This error is only present when tsconfig has strict set to false.
Changing the type signature of the drop function will also remove the error e.g.

export function drop<T extends Record<string, any> = any>(factoryApi: FactoryAPI<T>): void {

reproduction: https://codesandbox.io/p/sandbox/msw-data-type-issue-6d29pf

dependencies:

    "@mswjs/data": "0.16.2",
    "@faker-js/faker": "8.0.1",
    "typescript": "5.1.6"
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

No branches or pull requests

1 participant