Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/__tests__/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ describe('parser', () => {
RowHigherOrderComponent2: {
prop1: { type: 'string' },
},
// TODO: these are for some reason missing
// ColumnExternalHigherOrderComponent: {
// children,
// prop1: { type: 'string' },
// },
// RowExternalHigherOrderComponent: {
// children,
// prop1: { type: 'string' },
// }
ColumnExternalHigherOrderComponent: {
children,
prop1: { type: 'string' },
},
RowExternalHigherOrderComponent: {
prop1: { type: 'string' },
}
});
});

Expand Down Expand Up @@ -102,7 +100,7 @@ describe('parser', () => {
});
});

it.only('should parse react component with properties extended from an external .tsx file', function(){
it('should parse react component with properties extended from an external .tsx file', function(){
check('ExtendsExternalPropsComponent', {
ExtendsExternalPropsComponent: {
children,
Expand Down
5 changes: 1 addition & 4 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ class Parser {
const result: Props = {};

propertiesOfProps.forEach(prop => {
console.log("parser.getPropsInfo prop: ", prop.name);

const propName = prop.getName();

const propName = prop.getName();

// Find type of prop by looking in context of the props object itself.
const propType = this.checker.getTypeOfSymbolAtLocation(prop, propsObj.valueDeclaration);
Expand Down