File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,21 @@ function generateReadmeConfigTable(argumentInfos: ArgumentInfo[]): string {
263263 if ( ! argumentInfo . defaultValueDescription && defaultValue !== undefined && defaultValue !== null ) {
264264 if ( Array . isArray ( defaultValue ) ) {
265265 defaultValueString = `\`"${ defaultValue . join ( "," ) } "\`` ;
266- } else if ( typeof defaultValue === "number" ) {
267- defaultValueString = `\`${ defaultValue } \`` ;
268- } else if ( typeof defaultValue === "boolean" ) {
269- defaultValueString = `\`${ defaultValue } \`` ;
270- } else if ( typeof defaultValue === "string" ) {
271- defaultValueString = `\`"${ defaultValue } "\`` ;
272266 } else {
273- throw new Error ( `Unsupported default value type: ${ typeof defaultValue } ` ) ;
267+ // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
268+ switch ( typeof defaultValue ) {
269+ case "number" :
270+ defaultValueString = `\`${ defaultValue } \`` ;
271+ break ;
272+ case "boolean" :
273+ defaultValueString = `\`${ defaultValue } \`` ;
274+ break ;
275+ case "string" :
276+ defaultValueString = `\`"${ defaultValue } "\`` ;
277+ break ;
278+ default :
279+ throw new Error ( `Unsupported default value type: ${ typeof defaultValue } ` ) ;
280+ }
274281 }
275282 }
276283
You can’t perform that action at this time.
0 commit comments