tui: set up for publishing via github actions (#8020)
This commit is contained in:
@@ -11,6 +11,6 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
|
||||
* `setConfig()`. This is useful for example if you're using Next.js
|
||||
* to ensure your client always has the correct values.
|
||||
*/
|
||||
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
||||
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T> | Promise<Config<Required<ClientOptions> & T>>;
|
||||
|
||||
export const client = createClient(createConfig<ClientOptions2>());
|
||||
|
||||
@@ -190,7 +190,7 @@ export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn>
|
||||
*/
|
||||
export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (
|
||||
override?: Config<ClientOptions & T>,
|
||||
) => Config<Required<ClientOptions> & T>;
|
||||
) => Config<Required<ClientOptions> & T> | Promise<Config<Required<ClientOptions> & T>>;
|
||||
|
||||
export interface TDataShape {
|
||||
body?: unknown;
|
||||
|
||||
@@ -96,7 +96,7 @@ interface Params {
|
||||
|
||||
const stripEmptySlots = (params: Params) => {
|
||||
for (const [slot, value] of Object.entries(params)) {
|
||||
if (value && typeof value === 'object' && !Object.keys(value).length) {
|
||||
if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {
|
||||
delete params[slot as Slot];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user