Typescript SDK Timers Racing Signals Example with Trigger

In the Timers | Temporal Documentation racing signals example the new Trigger is constructed outside of the workflow execution function.

A Trigger is CancellationScope-aware: it is linked to the current scope on construction and throws when that scope is cancelled.