Skip to content

Commit

Permalink
overload for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fostertheweb committed Dec 25, 2023
1 parent d110c3b commit a903804
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/SpotifyApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ export class SpotifyApi {
return new SpotifyApi(strategy, config);
}

// keep this overload to prevent consumers from
// getting TS error for number of arugments
public static withClientCredentials(
clientId: string,
clientSecret: string,
config?: SdkOptions,
scopes?: string[]
): SpotifyApi;

public static withClientCredentials(
clientId: string,
clientSecret: string,
Expand Down

0 comments on commit a903804

Please sign in to comment.