procxy / ChangeProcxyMode
Type Alias: ChangeProcxyMode<P, NewMode>
ts
type ChangeProcxyMode<P, NewMode> = P extends Procxy<infer T, any, infer SH> ? Procxy<T, NewMode, SH> : never;Defined in: src/types/isomorphism.ts:101
Produce a new Procxy type identical to P except with a different serialization mode.
Type Parameters
| Type Parameter | Description |
|---|---|
P | Source Procxy type |
NewMode extends SerializationMode | The target serialization mode |
Example
typescript
import type { ChangeProcxyMode, Procxy } from 'procxy';
type JsonProxy = Procxy<Calculator, 'json'>;
type AdvancedProxy = ChangeProcxyMode<JsonProxy, 'advanced'>;
// Procxy<Calculator, 'advanced', false>