Skip to content

procxy / ProcxyIsomorphism

Type Alias: ProcxyIsomorphism<T, Mode, SH>

ts
type ProcxyIsomorphism<T, Mode, SH> = {
  backward: T;
  forward: Procxy<T, Mode, SH>;
};

Defined in: src/types/isomorphism.ts:147

Describes the bidirectional type mapping between T and Procxy<T>.

Remarks

Surfaces both directions as named properties for documentation and type-level reasoning. Primarily useful as a teaching tool or for libraries that need to assert the isomorphism holds.

Example

typescript
import type { ProcxyIsomorphism } from 'procxy';
import { Calculator } from './calculator.js';

type Iso = ProcxyIsomorphism<Calculator>;
type Forward = Iso['forward'];   // Procxy<Calculator>
type Backward = Iso['backward']; // Calculator

Type Parameters

Type ParameterDefault typeDescription
T-Original class type
Mode extends SerializationMode"json"Serialization mode
SH extends booleanfalseHandle support flag

Properties

PropertyTypeDescriptionDefined in
backwardTBackward mapping: Procxy<T> → T (via UnwrapProcxy)src/types/isomorphism.ts:155
forwardProcxy<T, Mode, SH>Forward mapping: T → Procxy<T>src/types/isomorphism.ts:153

Released under the MIT License.