stringham / move-ts

A Visual Studio Code plugin for updating relative imports when moving typescript files and folders in your workspace.
MIT License
52 stars 15 forks source link

does not update paths when typescript definition file is moved #18

Open no-stack-dub-sack opened 6 years ago

no-stack-dub-sack commented 6 years ago

Hi, awesome extension and works really well! Saves so much tedium when making architectural changes to a project or when making minor folder structure modifications. Great work!

The only issue I'm having is when I move internal typescript definition files using the extension, the paths are not correctly updated in the files that depend on the type definitions. For example:

src/client/components/myComponent/myComponent.d.ts

export interface IName {
   name: string;
}

src/client/components/myComponent/index.ts

import { IName } from './myCompenent.d'; // or just './myComponent';

const name: IName = {
  name: 'Paul',
}

If myComponent.d.ts is moved using the extension, the path in index.ts does not changed.