mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:49:35 +00:00
revert: fix models set catalog validation (#19194)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 7e3b2ff7af
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
export type FetchMock = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
||||
|
||||
type FetchPreconnectOptions = {
|
||||
dns?: boolean;
|
||||
tcp?: boolean;
|
||||
http?: boolean;
|
||||
https?: boolean;
|
||||
};
|
||||
|
||||
type FetchWithPreconnect = {
|
||||
preconnect: (url: string, init?: { credentials?: RequestCredentials }) => void;
|
||||
preconnect: (url: string | URL, options?: FetchPreconnectOptions) => void;
|
||||
};
|
||||
|
||||
export function withFetchPreconnect<T extends typeof fetch>(fn: T): T & FetchWithPreconnect;
|
||||
@@ -8,6 +17,6 @@ export function withFetchPreconnect<T extends object>(
|
||||
): T & FetchWithPreconnect & typeof fetch;
|
||||
export function withFetchPreconnect(fn: object) {
|
||||
return Object.assign(fn, {
|
||||
preconnect: (_url: string, _init?: { credentials?: RequestCredentials }) => {},
|
||||
preconnect: (_url: string | URL, _options?: FetchPreconnectOptions) => {},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user