You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SWADE, the operation parameter has some ugly ergonomics - if you don't need to modify it then it's not so bad, but there probably needs to be an additional (mergeable) interface so you can specify the expected operations for each of create, update, and delete
// example when only using the core types for operationprotectedoverrideasync_preDelete(options: Item.DatabaseOperations['delete'],user: BaseUser,)// lack of merge-ability requires going up to DocumentDatabaseOperationsprotectedstaticoverrideasync_onCreateOperation(items: SwadeItem[],operation: DocumentDatabaseOperations<Item,{isItemGrant: boolean;}>['create'],user: User.ConfiguredInstance,)
The text was updated successfully, but these errors were encountered:
Currently in Item.deleteDocuments(ids: string[], context: InexactPartial<Omit<foundry.abstract.Document.DatabaseOperationsFor<"Item", "delete">, "ids">>
context.parent == AnyDocument | undefined
Since an Item can only ever have an Actor as a Document, it'd be nice if the type was aware of that.
In SWADE, the
operation
parameter has some ugly ergonomics - if you don't need to modify it then it's not so bad, but there probably needs to be an additional (mergeable) interface so you can specify the expected operations for each ofcreate
,update
, anddelete
The text was updated successfully, but these errors were encountered: