How to trigger a TypeScript CloudCode task from the app?

I've created a TypeScript CloudCode task and the signature for the run function is:

export async function run(this: TaskContext)

However for a task being triggered from the app, the signature is typically this:

export async function run(params)

What should the function signature be for triggering this task written in TypeScript from the app?

The correct function signature is

export async function run(this: TaskContext, params)