A TypeScript library for defining typesafe bidirectional migrations between object shapes. Current stable version is 1.0.1, released on npm with infrequent updates. It allows compile-time validation of migration schemas using TypeScript types. Key differentiators: fully typed migrations (forward and reverse), supports both 1-1 and unidirectional transformations, and uses a fluent API with CompileMigration. Alternative libraries like transmutable or object-mapper lack bidirectional typing or compile-time safety.
npm install ts-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a bidirectional migration between two object shapes using CompileMigration.
Ensure every property from both object types is present in the migration mapping.
Use plain object literals or clone objects before passing.
Ensure unidirectional functions accept the correct parameter type (left for right-to-left, right for left-to-right).
Install: npm install ts-migration. Import: import CompileMigration from 'ts-migration'