I'm using a framework (Phaser) where I tell the framework to call my callback like:
this.time.addEvent({
callback: doTick,
args: [this.map]
})
I type my function like:
const doTick = (map: Phaser.Tilemaps.Tilemap) => { ... }
Is there some way to unify the definitions of function arguments across these two snippets, so that Typescript ensures the caller and callback argument list is in sync?