@mocanvas/editor · function

createAssetPropsMigrationIds

declare function createAssetPropsMigrationIds<const Type extends string, const Versions extends Record<string, number>>(assetType: Type, versions: Versions): {
    readonly [K in keyof Versions]: `${typeof ASSET_MIGRATION_SEQUENCE_PREFIX}.${Type}/${Versions[K]}`;
}

Migration ids for an asset type, from friendly version names:

``ts const versions = createAssetPropsMigrationIds("image", { AddFileSize: 1 }) // versions.AddFileSize === "com.tldraw.asset.image/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.