Skip to content

Commit 570d73b

Browse files
committed
feat(parser): handle React.Component and Element instanceOf
1 parent 6bd563a commit 570d73b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/parser.ts

+4
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ export function parseFromProgram(
290290
case 'React.ReactNode': {
291291
return t.unionNode([t.elementNode('node'), t.undefinedNode()]);
292292
}
293+
case 'React.Component':
294+
case 'Element': {
295+
return t.instanceOfNode(typeName);
296+
}
293297
}
294298
}
295299

0 commit comments

Comments
 (0)