Skip to content

Commit 668c4fa

Browse files
committed
refactor(type): update type
1 parent a39c99c commit 668c4fa

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface Handlers {
3737
output: Output;
3838
}
3939

40-
export type SfcOptions = CommandsOption & Handlers;
40+
export type SfcOptions = Pick<CommandsOption, "propsNotOnlyTs"> & Handlers;
4141

4242
export type ScriptOptions = {
4343
fileType: FileType;

src/setup.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ async function setup() {
1313
const start = Date.now();
1414
const argv = process.argv.slice(2).filter(Boolean);
1515

16-
let { pathNames, commands } = argv.reduce<{
17-
pathNames: string[];
18-
commands: CommandsOption;
19-
}>(
16+
let { pathNames, commands } = argv.reduce(
2017
(p, c) => {
2118
if (c.startsWith("--")) {
2219
switch (c.split("--")[1] as keyof typeof p.commands) {
@@ -40,7 +37,7 @@ async function setup() {
4037

4138
return p;
4239
},
43-
{ pathNames: [], commands: {} },
40+
{ pathNames: [] as string[], commands: {} as CommandsOption },
4441
);
4542

4643
if (!pathNames.length) {

0 commit comments

Comments
 (0)