MCPcopy
hub / github.com/msgbyte/tianji / resolve

Function resolve

packages/client-sdk/src/open/client/core/request.ts:106–111  ·  view source on GitHub ↗
(options: ApiRequestOptions, resolver?: T | Resolver<T>)

Source from the content-addressed store, hash-verified

104type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
105
106export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
107 if (typeof resolver === 'function') {
108 return (resolver as Resolver<T>)(options);
109 }
110 return resolver;
111};
112
113export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
114 const [token, username, password, additionalHeaders] = await Promise.all([

Callers 15

getHeadersFunction · 0.85
requestFunction · 0.85
initTianjiTrackerFunction · 0.85
fetchGooglePlayReviewsFunction · 0.85
vite.config.tsFile · 0.85
runValidatorFunction · 0.85
makeRequestFunction · 0.85
proxyObjectFunction · 0.85
runCodeInVM2Function · 0.85
calcOpenAITokenFunction · 0.85
nextFunction · 0.85

Calls

no outgoing calls

Tested by 1

runValidatorFunction · 0.68