Skip to content

Commit

Permalink
Ensure extras type conforms to Record<string, boolean>
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Apr 18, 2024
1 parent a925bb0 commit cf4b369
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/prompts/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const extras = async (initial: Extras): Promise<Array<string> | undefined
type: "multiselect",
name: "extras",
message: "Enable/Disable Extra Options:",
choices: (Object.keys(initial) as [keyof Extras]).map((option) => ({ title: option, value: option, selected: initial[option] })),
choices: Object.keys(initial).map((option) => ({ title: option, value: option, selected: initial[option] })),
hint: "- Space to select. Return to submit",
})
).extras;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export type Args = {

export type PartialArgs = Partial<Args & Settings>;

export type Extras = {
export interface Extras extends Record<string, boolean> {
stripSubchannelPrefix: boolean;
downloadArtwork: boolean;
saveNfo: boolean;
considerAllNonPartialDownloaded: boolean;
};
}

export type Resolution = ValueOfA<Resolutions>;

Expand Down

0 comments on commit cf4b369

Please sign in to comment.