You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Metro supports require.context, added in this PR, but it lacks built-in type definitions. This makes it more challenging to use require.context effectively as there's no code completion, error checking, or refactoring support for its arguments.
Property 'context' does not exist on type 'NodeRequire'.
Right now, I have to create a types file and add the following content from @EvanBacon's Metro-Context-Modules-Demo repo, having them included by default in Metro would be a great improvement.
Including type definitions for require.context would significantly improve the developer experience by enabling these features and making code using require.context more robust and maintainable.
The text was updated successfully, but these errors were encountered:
This PR discusses adding types for require.context. Do you believe it's still necessary to implement types for require.context separately, given the potential for including them directly in Metro?
Do you want to request a feature or report a bug?
Feature request
Currently, Metro supports
require.context
, added in this PR, but it lacks built-in type definitions. This makes it more challenging to userequire.context
effectively as there's no code completion, error checking, or refactoring support for its arguments.Right now, I have to create a types file and add the following content from @EvanBacon's Metro-Context-Modules-Demo repo, having them included by default in Metro would be a great improvement.
Including type definitions for
require.context
would significantly improve the developer experience by enabling these features and making code usingrequire.context
more robust and maintainable.The text was updated successfully, but these errors were encountered: