Skip to main content

Function: upgradeSettings()

upgradeSettings(input, author?): unknown

Defined in: src/lib/settings/index.ts:71

App settings with their colour palettes, profile graphs and brush presets of version 1 upgraded to version 2 (see upgradeAsset). Anything else is left as it is.

Parameters​

input​

unknown

author?​

AssetAuthor = UNKNOWN_AUTHOR

the author of older assets with none

Returns​

unknown

Example​

upgradeSettings({ palettes: [{ id: "…", name: "Sunset", colours: [] }] }, app.author);
// { palettes: [{ "@type": "PaintCanvas/ColourPalette", id: "…", name: "Sunset", author, content: { colours: [] } }] }