title: How to overload typescript's `path.normalize` definition?
body: <p>I'm converting a flow project to TS, and one thing we have is a bunch of opaque types, e.g. <code>fileName</code>, <code>relativePath</code>, and <code>absolutePath</code>.  In flow we then overload <code>path</code> to use these types:</p>
  <pre><code>declare module 'path' {
    declare function normalize(path: absolutePath): absolutePath;
    declare function normalize(path: string): relativePath;
  </code></pre>
  <p>I'm trying to do the same in TS, but can't figure out how to either a) replace the existing <code>path</code> definitions (I'm good copying the 3 files we do this on) or b) merge my definitions into the existing ones.  No matter what I try it uses the ones from <code>@types/node</code> (though VS code shows that TS sees the 2 files, it always picks that one).  <s>I suppose I could just remove that and copy everything but I'd rather not for upkeep</s>.  I can't even copy &amp; remove <code>@types/node</code> because other things include it, it'd just be a complete mess.</p>
  <p>Minimal example (structure taken from the existing <code>path.d.ts</code> file):</p>
  <pre><code>declare module 'path' {
    namespace path {
      interface PlatformPath {
        normalize(p: absolutePath): absolutePath;
      }
    }
    const path: path.PlatformPath;
    export = path;
  }
  
  declare module 'node:path' {
    import path = require('path');
    export = path;
  }
  
  </code></pre>