From 359f0b21b0db5e67ebe34d8b9f0703fea7bbd5da Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 21 May 2023 14:19:32 +0000 Subject: [PATCH] ? --- packages/misskey-js/src/api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}`, {