Remember that TypeScript is a super-set of javascript, so you can still also do this one-liner:
const debug = require('debug')('my-app:my-module');
Typescript seems to conclude that the debug
constant here is of type 'any', and you lose all type safety, but with a package as simple as debug is, I think you will be OK...
Personally, I think 2 lines to instantiate debugging in every module is 1 line too many, so I continue to use this one-liner in my .ts files.
P.S. I like to use module tags so I can enable logging in just certain modules with DEBUG=my-app:my-module,my-app:some-other-module ts-node my-app
or all my modules with DEBUG=my-app:* ...