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']; // CalculatorType Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T | - | Original class type |
Mode extends SerializationMode | "json" | Serialization mode |
SH extends boolean | false | Handle support flag |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
backward | T | Backward mapping: Procxy<T> → T (via UnwrapProcxy) | src/types/isomorphism.ts:155 |
forward | Procxy<T, Mode, SH> | Forward mapping: T → Procxy<T> | src/types/isomorphism.ts:153 |