Skip to content

Commit

Permalink
feat(react-doc): allow to import ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
Heymdall committed Mar 28, 2018
1 parent dcc0688 commit 926ecc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-doc/create-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function findExportedComponentDefinition(ast, recast, filePath) {
// but skip `react` and `prop-types` modules, because docgen will not be able to detect types otherwise
node.value.source.value = resolve(
node.value.source.value,
{ basedir: path.dirname(filePath), extensions: ['.js', '.jsx'] }
{ basedir: path.dirname(filePath), extensions: ['.js', '.jsx', '.ts', '.tsx'] }
);
}

Expand Down

0 comments on commit 926ecc6

Please sign in to comment.