@mocanvas/store · function
declare function createMigrationIds<const ID extends string, const Versions extends Record<string, number>>(sequenceId: ID, versions: Versions): {
readonly [K in keyof Versions]: `${ID}/${Versions[K]}`;
}Build the ids of a sequence's migrations from friendly names:
``ts
const Versions = createMigrationIds('com.example.shape.box', { AddColor: 1, AddSize: 2 })
// Versions.AddColor === 'com.example.shape.box/1'
``
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.