silverwolf-x/project / packages /next /src /client /request /params.browser.prod.ts
silverwolf-x's picture
download
raw
591 Bytes
import type { Params } from '../../server/request/params'
interface CacheLifetime {}
const CachedParams = new WeakMap<CacheLifetime, Promise<Params>>()
function makeUntrackedParams(underlyingParams: Params): Promise<Params> {
const cachedParams = CachedParams.get(underlyingParams)
if (cachedParams) {
return cachedParams
}
const promise = Promise.resolve(underlyingParams)
CachedParams.set(underlyingParams, promise)
return promise
}
export function createRenderParamsFromClient(
clientParams: Params
): Promise<Params> {
return makeUntrackedParams(clientParams)
}

Xet Storage Details

Size:
591 Bytes
·
Xet hash:
4cb0eb08f7d7ef7fa1b11e73c341cfeed05afced5efd97cc909c1d47d112e99f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.