How do I filter using tracesSampler method

if I use tracesSampler how do I gain access to the actual event, the filtering logic can be on any property in the event or hints object. the docs show conditonal statements with no conditonals in them link is below

Filtering and Sampling Events for Angular | Sentry Documentation