[JS] PropTypes Undefined Variables
In PyCharm, I have installed the community TypeScript stubs for prop-types, however this gives me unresolved variables in my code.
Code screenshot:
Please sign in to leave a comment.
In PyCharm, I have installed the community TypeScript stubs for prop-types, however this gives me unresolved variables in my code.
Code screenshot:
Please sign in to leave a comment.
there is no notion of PropTypes in prop-types/index.d.ts, so PyCharm doesn't understand that it should use this library for proptypes resolving.
as a workaround, please copy the downloaded index.d.ts to /node_modules/prop-types and modify /node_modules/prop-types/package.json, specifying this file as a "typings" property value:
this should solve the issue