diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index 303984f44..2d3d5101c 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -1,4 +1,4 @@ -import type { Endpoints, SchemaOrUndefined, IEndpointMeta, ResponseOf } from './endpoints.types'; +import type { Endpoints, SchemaOrUndefined, IEndpointMeta, ResponseOf } from './endpoints.types.js'; const MK_API_ERROR = Symbol(); @@ -42,9 +42,9 @@ export class APIClient { this.fetch = opts.fetch ?? ((...args) => fetch(...args)); } - public request, M extends IEndpointMeta = Endpoints[E]>( + public request, M extends IEndpointMeta = Endpoints[E], R = ResponseOf>( endpoint: E, params?: P, credential?: string | null | undefined, - ): Promise> + ): Promise { const promise = new Promise((resolve, reject) => { this.fetch(`${this.origin}/api/${endpoint}`, {