Skip to content

Commit

Permalink
Rename propDocBlockHandler to propDocblockHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Mar 4, 2023
1 parent 98a1138 commit dfc2f85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-plants-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-docgen': major
---

Rename `propDocBlockHandler` to `propDocblockHandler` for consistency
4 changes: 2 additions & 2 deletions packages/react-docgen/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
contextTypeHandler,
defaultPropsHandler,
displayNameHandler,
propDocBlockHandler,
propDocblockHandler,
propTypeCompositionHandler,
propTypeHandler,
} from './handlers/index.js';
Expand Down Expand Up @@ -52,7 +52,7 @@ export const defaultHandlers: Handler[] = [
contextTypeHandler,
childContextTypeHandler,
propTypeCompositionHandler,
propDocBlockHandler,
propDocblockHandler,
codeTypeHandler,
defaultPropsHandler,
componentDocblockHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function merge<T, U>(obj1: T, obj2: U): (T & U) | null {
const componentMethodsJsDocHandler: Handler = function (
documentation: Documentation,
): void {
let methods = documentation.get('methods') as MethodDescriptor[] | null;
let methods = documentation.get<MethodDescriptor[]>('methods');

if (!methods) {
return;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-docgen/src/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export { default as componentMethodsJsDocHandler } from './componentMethodsJsDoc
export { default as defaultPropsHandler } from './defaultPropsHandler.js';
export { default as displayNameHandler } from './displayNameHandler.js';
export { default as codeTypeHandler } from './codeTypeHandler.js';
export { default as propDocBlockHandler } from './propDocBlockHandler.js';
export { default as propDocblockHandler } from './propDocblockHandler.js';
export { default as propTypeCompositionHandler } from './propTypeCompositionHandler.js';
export {
propTypeHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function resolveDocumentation(
});
}

const propDocBlockHandler: Handler = function (
const propDocblockHandler: Handler = function (
documentation: Documentation,
componentDefinition: NodePath<ComponentNode>,
): void {
Expand All @@ -49,4 +49,4 @@ const propDocBlockHandler: Handler = function (
resolveDocumentation(documentation, propTypesPath);
};

export default propDocBlockHandler;
export default propDocblockHandler;

0 comments on commit dfc2f85

Please sign in to comment.