|
@@ -1,6 +1,5 @@
|
|
|
import Taro from '@tarojs/taro'
|
|
import Taro from '@tarojs/taro'
|
|
|
import { hc } from 'hono/client'
|
|
import { hc } from 'hono/client'
|
|
|
-import type { Hono } from 'hono'
|
|
|
|
|
import { ResponsePolyfill } from './response-polyfill'
|
|
import { ResponsePolyfill } from './response-polyfill'
|
|
|
import './headers-polyfill'
|
|
import './headers-polyfill'
|
|
|
|
|
|
|
@@ -193,7 +192,7 @@ const taroFetch = async (input: RequestInfo | URL, init?: RequestInit): Promise<
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export const rpcClient = <T extends Hono>(apiBasePath?: string): ReturnType<typeof hc<T>> => {
|
|
|
|
|
|
|
+export const rpcClient = <T>(apiBasePath?: string): ReturnType<typeof hc<T>> => {
|
|
|
return hc<T>(`${API_BASE_URL}${apiBasePath}`, {
|
|
return hc<T>(`${API_BASE_URL}${apiBasePath}`, {
|
|
|
fetch: taroFetch
|
|
fetch: taroFetch
|
|
|
})
|
|
})
|