Skip to content

Commit bfe2187

Browse files
authored
chore: improve getArgvValue type (#787)
1 parent 90d6fb8 commit bfe2187

File tree

1 file changed

+4
-1
lines changed
  • packages/visual-service/src/storybook

1 file changed

+4
-1
lines changed

packages/visual-service/src/storybook/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ export async function getStoriesJson(url: string): Promise<Stories> {
126126
/**
127127
* Get arg value from the process.argv
128128
*/
129-
export function getArgvValue(argName: string, parseFunc: (value: string) => any): any {
129+
export function getArgvValue<ParseFuncReturnType>(
130+
argName: string,
131+
parseFunc: (value: string) => ParseFuncReturnType
132+
) {
130133
const argWithEqual = argName + '='
131134
const argv = process.argv
132135

0 commit comments

Comments
 (0)