Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchEndpoint Type Error: Type parameter declaration expected #103

Open
GeorgeArubi opened this issue Feb 19, 2024 · 1 comment
Open

SearchEndpoint Type Error: Type parameter declaration expected #103

GeorgeArubi opened this issue Feb 19, 2024 · 1 comment

Comments

@GeorgeArubi
Copy link

GeorgeArubi commented Feb 19, 2024

Hi,

Ran into a type error when I ran npm build. The const keyword is not valid in the context of a TypeScript generic type constraint because it is not part of the TypeScript language syntax for defining generic types.

./node_modules/@spotify/web-api-ts-sdk/dist/mjs/endpoints/SearchEndpoints.d.ts:4:6
Type error: Type parameter declaration expected.

import type { ItemTypes, Market, MaxInt, SearchResults } from '../types.js';
import EndpointsBase from './EndpointsBase.js';
export interface SearchExecutionFunction {
<const T extends readonly ItemTypes[]>(q: string, type: T, market?: Market, limit?: MaxInt<50>, offset?: number, include_external?: string): Promise<SearchResults>;
}
export default class SearchEndpoints extends EndpointsBase {
execute<const T extends readonly ItemTypes[]>(q: string, type: T, market?: Market, limit?: MaxInt<50>, offset?: number, include_external?: string): Promise<SearchResults>;
}  
@GeorgeArubi
Copy link
Author

Made a PR for the fix here: #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant