Skip to content

Commit

Permalink
fix zod error
Browse files Browse the repository at this point in the history
  • Loading branch information
BolajiOlajide committed Jun 19, 2024
1 parent 4582306 commit f563df6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ export class NowPlaying {
this.provider = provider

this.parseArgs(args)
this.streamerArgs = args.streamerArgs
this.storageKind = args.storageKind || StorageKinds.INMEMORY
this.useCache = args.useCache || true
this.cacheDuration = args.cacheDuration || 60000;

// this is whatever storage mechanic the user selects
this.storer = this.getStorer(this.storageKind)
this.streamer = this.getStreamer()
this.streamerArgs = args.streamerArgs
}

private parseArgs(args: unknown): void {
Expand Down
2 changes: 1 addition & 1 deletion src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ export const SpotifyProviderArgsSchema = BaseNowPlayingArgsSchema.extend({
export type SpotifyProviderArgs = z.infer<typeof SpotifyProviderArgsSchema>;

export const NoopProviderArgsSchema = BaseNowPlayingArgsSchema.extend({
streamerArgs: z.unknown(),
streamerArgs: z.never(),
});
export type NoopProviderArgs = z.infer<typeof NoopProviderArgsSchema>;

0 comments on commit f563df6

Please sign in to comment.