Skip to content

@vttforge/types / PlaceableHooks

Type Alias: PlaceableHooks ​

PlaceableHooks = { [K in PlaceableDocumentName as `draw${K}`]: [PlaceableObjectMap[K]] } & { [K in PlaceableDocumentName as `refresh${K}`]: [PlaceableObjectMap[K], Record<string, boolean>] } & { [K in PlaceableDocumentName as `destroy${K}`]: [PlaceableObjectMap[K]] } & { [K in PlaceableDocumentName as `control${K}`]: [PlaceableObjectMap[K], boolean] } & { [K in PlaceableDocumentName as `hover${K}`]: [PlaceableObjectMap[K], boolean] } & { [K in PlaceableDocumentName as `paste${K}`]: [PlaceableObjectMap[K][], Record<string, unknown>[], { cut: boolean }] }

The hooks a placed object fires, one name per document.

Foundry builds the name from the document, so a token fires drawToken and a tile fires drawTile. There is no drawObject: that name appears in Foundry's hook documentation to describe the family, and nothing calls it.

MIT licensed.