crawlee
crawlee copied to clipboard
`RestrictedCrawlingContext` should not extend `Record<string, unknown>`
The parent is there for backwards compatibility and it leads to subtle bugs that could be prevented with type checking otherwise.
Hey can you give some info on how to replicate the bug in my locals ?
The line in question is this: https://github.com/apify/crawlee/blob/2dce7fb8671639a333e3ade3863a1ef07d6a34b0/packages/core/src/crawlers/crawler_commons.ts#L17
And the problem is that the type as it is now allows accessing any property, which leads to errors that Typescript cannot prevent.
However, I don't think this is a good first issue if you're looking to contribute to Crawlee. It's in the milestone for a 4.0 release which doesn't have a fixed schedule yet, so if you manage to fix it, the PR is going to stick around for a while.