Skip to content

Commit 9b4d29e

Browse files
committed
change naming for ExportedInterfacePropsComponent
Signed-off-by: Winner95 <Winner95@users.noreply.github.com>
1 parent 71af097 commit 9b4d29e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

__tests__/handler.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('typescript-react-function-component-props-handler', () => {
8080
// Line 78 in index.js uses ExportNamedDeclaration
8181
test('handles components with exported interface', () => {
8282
const doc = parseFixture('ExportedInterfacePropsComponent.tsx');
83-
expect(doc.displayName).toBe('ComponentWithExportedType');
83+
expect(doc.displayName).toBe('ExportedInterfacePropsComponent');
8484
});
8585

8686
// Line 86 in index.js uses TSInterfaceDeclaration

fixtures/ExportedInterfacePropsComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export interface ExportedProps {
55
disabled?: boolean;
66
}
77

8-
const ComponentWithExportedType: React.FC<ExportedProps> = (props) => {
8+
const ExportedInterfacePropsComponent: React.FC<ExportedProps> = (props) => {
99
return <button disabled={props.disabled}>{props.label}</button>;
1010
};
1111

12-
export default ComponentWithExportedType;
12+
export default ExportedInterfacePropsComponent;

0 commit comments

Comments
 (0)