ParamValues

tagtree · /core·type

Converts a ParamMap into the corresponding runtime argument shape where each branded token is replaced by its concrete string or number type; used to type the entity-specific arguments accepted by KeyFactory methods and InvalidateNamespace entity methods.

Definition

@nordcom/commerce-tagtree
type ParamValues = P extends ParamMap ? { [K in …]: … } : {};

P extends ParamMap ? \{ [K in …]: … \} : \{\}

Example

type ProductArgs = ParamValues<{ id: typeof str; rank: typeof num }>;
// { id: string; rank: number }

ContractTestOptions runAdapterContract AdapterCtx CacheAdapter CacheInstance CacheKey CacheSchema CacheSchemaShape

Sourcetypes.ts:60Edit the JSDoc directly

On this page