Skip to content

Commit 96267e5

Browse files
committed
fix: Don't console.error if importing ts fails
1 parent c1f61e4 commit 96267e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class EmptyPlugin {
99

1010
let plugin: DocgenPluginType;
1111

12+
// It should be possible to use the plugin without TypeScript.
13+
// In that case using it is a no-op.
1214
try {
1315
require.resolve("typescript");
1416
plugin = require("./plugin").default;
1517
} catch (error) {
16-
console.error(error);
17-
1818
plugin = EmptyPlugin as any;
1919
}
2020

0 commit comments

Comments
 (0)