justkey007 / tsc-alias

Replace alias paths with relative paths after typescript compilation
MIT License
902 stars 62 forks source link

Replace 'declare module' paths #121

Closed Kolobok12309 closed 2 years ago

Kolobok12309 commented 2 years ago

We write library with multiple optional modules, some of them declare props for another modules, for example

source

import type { MinimalColor } from '@/modules/components';

declare module '@/modules/components' {
  interface Color {
    btn?: MinimalColor | false;
  }
}

After compile and tsc-alias

import type { MinimalColor } from 'shared-front/lib/modules/components';
declare module '@/modules/components' {
    interface Color {
        btn?: MinimalColor | false;
    }
}

Expected

import type { MinimalColor } from 'shared-front/lib/modules/components';
declare module 'shared-front/lib/modules/components' {
    interface Color {
        btn?: MinimalColor | false;
    }
}

Can you add replacing of declare module paths please?