diff --git a/package.json b/package.json index 0806fac9..efe423af 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "devDependencies": { "@commitlint/cli": "13.2.1", "@commitlint/config-conventional": "13.2.0", - "@league-of-foundry-developers/foundry-vtt-types": "0.8.9-4", + "@league-of-foundry-developers/foundry-vtt-types": "0.8.9-5", "@seald-io/nedb": "2.0.4", "@types/fs-extra": "9.0.13", "@types/jest": "27.0.2", diff --git a/src/module/migrations/migrationHelpers.ts b/src/module/migrations/migrationHelpers.ts index ca2bcdf9..d0a53f54 100644 --- a/src/module/migrations/migrationHelpers.ts +++ b/src/module/migrations/migrationHelpers.ts @@ -46,9 +46,7 @@ export async function migrateActors(getActorUpdateData: ActorUpdateDataGetter): } } -type SceneUpdateDataGetter = ( - sceneData: foundry.documents.BaseScene["data"], -) => DeepPartial; +type SceneUpdateDataGetter = (sceneData: foundry.data.SceneData) => DeepPartial; export async function migrateScenes(getSceneUpdateData: SceneUpdateDataGetter): Promise { for (const scene of getGame().scenes ?? []) { @@ -98,7 +96,7 @@ export function getActorUpdateDataGetter(getItemUpdateData: ItemUpdateDataGetter } export function getSceneUpdateDataGetter(getActorUpdateData: ActorUpdateDataGetter): SceneUpdateDataGetter { - return (sceneData: foundry.documents.BaseScene["data"]) => { + return (sceneData: foundry.data.SceneData) => { const tokens = sceneData.tokens.map((token: TokenDocument) => { const t = token.toObject(); if (!t.actorId || t.actorLink) { @@ -166,7 +164,7 @@ export function getCompendiumMigrator( const updateData = getActorUpdateData(doc.toObject()); updateData && (await doc.update(updateData)); } else if (doc instanceof Scene && getSceneUpdateData) { - const updateData = getSceneUpdateData(doc.data); + const updateData = getSceneUpdateData(doc.data as foundry.data.SceneData); updateData && (await doc.update( updateData as DeepPartial[0]>, diff --git a/yarn.lock b/yarn.lock index b95fb999..873396f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -884,9 +884,9 @@ __metadata: languageName: node linkType: hard -"@league-of-foundry-developers/foundry-vtt-types@npm:0.8.9-4": - version: 0.8.9-4 - resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.8.9-4" +"@league-of-foundry-developers/foundry-vtt-types@npm:0.8.9-5": + version: 0.8.9-5 + resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.8.9-5" dependencies: "@types/jquery": ~3.5.6 "@types/simple-peer": ~9.11.1 @@ -895,7 +895,7 @@ __metadata: pixi.js: 5.3.4 socket.io-client: 4.1.2 tinymce: 5.8.1 - checksum: 6d274bb6ba24ef66987470d17320f7d1daf53e21be4bb2f87e0c110488611cb978a0e82ae566fd2af6460363d4ae969c2cf59155e7fed522442a48b0614d15cb + checksum: 0f3facf10db9d0ac67ee4908b6310aba3b541e6de6e327505c9c492a4a012e41991e11f4fabf4008ca54aa6ee71a6206d883632be5666d162a6604bcb58b9c22 languageName: node linkType: hard @@ -3448,7 +3448,7 @@ __metadata: dependencies: "@commitlint/cli": 13.2.1 "@commitlint/config-conventional": 13.2.0 - "@league-of-foundry-developers/foundry-vtt-types": 0.8.9-4 + "@league-of-foundry-developers/foundry-vtt-types": 0.8.9-5 "@seald-io/nedb": 2.0.4 "@types/fs-extra": 9.0.13 "@types/jest": 27.0.2