Remix
Remix
remix/fetch-router · TypeView Source

ContextWithValues

Summary

Appends context values to an existing RequestContext.

Third-party middleware packages that add multiple values should expose their own ContextWith* helper built on this type.

Signature

type ContextWithValues<context, additions> =
  context extends RequestContext<
    infer params extends Record<string, any>,
    infer entries extends ContextEntries
  >
    ? RequestContext<params, [...entries, ...additions]>
    : never;