-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.
Description
Description
In context-provider modules we typically re-export the Provider
as the default export, wrapping a custom context.
export const Context = createContext( false );
const { Consumer, Provider } = Context;
/**
* @param {boolean} props.value Whether to turn the thing on.
* @returns {WPComponent} Provider component
*/
export default Provider;
For TypeScript modules we don't need or want the type annotations as those are enforced and maintained by the compiler.
/**
* @param props.value Whether to turn the thing on.
* @returns Provider component
*/
export default Provider;
When generating the docs though it fails with a couple of different types of errors.
TypeError: Cannot read properties of undefined (reading 'name')
TypeError: Cannot read properties of undefined (reading '0')
These come from trying to get the first parameter and printing the name of the function in the error log.
Step-by-step reproduction instructions
See Description
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.