pref: Optimize client imports (#9506)

* pref: Optimize client imports

* split api?

* fix

* ✌️

* no vue split?

* Revert "no vue split?"

This reverts commit 27ccec971e2925184a58da65c3472655def2617c.

* function => const

* ✌️

* Revert "function => const"

This reverts commit 34f2feb224f65cc4fca090b29450adb00e85c2c5.

* function api
This commit is contained in:
tamaina
2023-01-17 17:36:18 +09:00
committed by GitHub
parent 424919ffd0
commit d456308653
3 changed files with 25 additions and 17 deletions

View File

@ -45,7 +45,7 @@ export function api<E extends keyof Endpoints, P extends Endpoints[E]['req']>(en
}
// Implements Misskey.api.ApiClient.request
export function apiGet<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any): Promise<Endpoints[E]['res']> {
export function apiGet <E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, data: P = {} as any): Promise<Endpoints[E]['res']> {
pendingApiRequestsCount.value++;
const onFinally = () => {