data
data copied to clipboard
"Type instantiation is excessively deep and possibly infinite" error on drop when typescript is set to strict: false
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"