react-docgen-typescript-loader icon indicating copy to clipboard operation
react-docgen-typescript-loader copied to clipboard

JSDoc block is displaying inline

Open stramel opened this issue 5 years ago • 4 comments

My code looks like:

/**
 * Hook to check the action permission based on the rules and user's roles
 *
 * @param action - Action to check permission for
 * @param data - Any data necessary for dynamic checks
 * @param options - Allows overriding the rules and/or roles
 * @return - True, if the user has permission to perform the provided action
 */
export function useAccess(action: ValidRule, data?: object, options: AccessOverrides = {}) {
  //...
}

It generates a "description" of:

Hook to check the action permission based on the rules and user’s roles @param action - Action to check permission for @param data - Any data necessary for dynamic checks @param options - Allows overriding the rules and/or roles @return - True, if the user has permission to perform the provided action

I would expect it to pull the description out and parse the params/returns into the props table.

stramel avatar Mar 27 '19 21:03 stramel