How to resolve 'multiple UTIs, one file extension'

My PreviewCode app provides QuickLook previews and Finder icon thumbnails for source code files written in many popular programming languages.

The only one it doesn't work will with is TypeScript, which typically uses the ts file extension. This is because Apple's CoreTypes bundle maps the ts file extension to its own MPEG-4 Transport Stream UTI. Right now I have two UTIs mapped to the ts extension: the above one and another, com.microsoft.typescript.

The question is, how can I tell macOS' Launch Services to favour the latter over the former so that PreviewCode's previewer app extension is called whenever then user QuickLooks a TypeScript file and not (as currently happens) macOS' MPEG-4 previewer?

I'd like to code this into PreviewCode or at the very least provide the technique in the response to the many tech support requests I get about this ts mix-up specifically.

How to resolve 'multiple UTIs, one file extension'
 
 
Q