Skip to content

Commit f5f0667

Browse files
committed
fix
1 parent 7ed54c1 commit f5f0667

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

packages/react-docgen/src/Documentation.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ export interface ObjectSignatureType<
129129
}
130130

131131
export type TypeDescriptor<T = FunctionSignatureType> =
132-
| ElementsType<T>
133-
| LiteralType
134-
| ObjectSignatureType<T>
135-
| SimpleType
136-
| T;
132+
ElementsType<T> | LiteralType | ObjectSignatureType<T> | SimpleType | T;
137133

138134
export interface PropDescriptor {
139135
type?: PropTypeDescriptor;

packages/react-docgen/src/handlers/componentDocblockHandler.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ function getDocblockFromComponent(path: NodePath): string | null {
1212

1313
if (path.isClassDeclaration() || path.isClassExpression()) {
1414
const decorators = path.get('decorators') as
15-
| Array<NodePath<Decorator>>
16-
| null
17-
| undefined;
15+
Array<NodePath<Decorator>> | null | undefined;
1816

1917
// If we have a class declaration or expression, then the comment might be
2018
// attached to the last decorator instead as trailing comment.

packages/react-docgen/src/utils/ts-types/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import type {
88
} from '@babel/types';
99

1010
type BindingNode =
11-
| TSEnumDeclaration
12-
| TSInterfaceDeclaration
13-
| TSTypeAliasDeclaration;
11+
TSEnumDeclaration | TSInterfaceDeclaration | TSTypeAliasDeclaration;
1412

1513
type TypeKind = 'alias' | 'enum' | 'interface';
1614

0 commit comments

Comments
 (0)