Skip to content

Commit cd9f0e4

Browse files
committed
chore: fix Typescript types in CLI
1 parent aeb538a commit cd9f0e4

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

packages/react-docgen-cli/src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { program } from 'commander';
44
program
55
.name('react-docgen')
66
.executableDir('./commands/')
7-
.command('debug', 'Print information for debugging')
87
.command('parse', 'Extract meta information from React components.', {
98
isDefault: true,
109
executableFile: 'parse/command.js',

packages/react-docgen-cli/src/commands/parse/command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import loadOptions from './options/loadOptions.js';
99
import outputError from './output/outputError.js';
1010
import { resolve } from 'path';
1111
import slash from 'slash';
12+
import type { Documentation } from 'react-docgen';
1213

1314
const debug = debugFactory('react-docgen:cli');
1415

@@ -128,7 +129,7 @@ program
128129
return slash(ignorePath);
129130
}),
130131
});
131-
const result = {};
132+
const result: Record<string, Documentation[]> = {};
132133
let errorEncountered = false;
133134

134135
await Promise.all(

packages/react-docgen-cli/src/commands/parse/output/outputResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { writeFile } from 'fs/promises';
22
import type { Documentation } from 'react-docgen';
33

44
export default async function outputResult(
5-
documentation: Record<string, Documentation>,
5+
documentation: Record<string, Documentation[]>,
66
{ pretty = false, output }: { pretty: boolean; output: string | undefined },
77
) {
88
const result = JSON.stringify(

tsconfig.base.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
"target": "es2020",
77
"module": "es2020",
88
"strict": true,
9-
"strictNullChecks": true,
10-
"noImplicitThis": true,
119
"noImplicitAny": false,
1210
"noImplicitReturns": true,
13-
"noUnusedParameters": true,
1411
"noUnusedLocals": true,
12+
"noUnusedParameters": true,
1513
"moduleResolution": "node16",
1614
"esModuleInterop": true,
1715
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)