TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

bug? declare module 'yargs2/index//yargs' #62

Open bluelovers opened 6 years ago

bluelovers commented 6 years ago
import { Arguments, Argv } from 'yargs';

declare module 'yargs'
{
}

output

declare module 'yargs2/core' {
    /**
      * Created by user on 2018/6/1/001.
      */
    import { Argv } from 'yargs';
    declare module 'yargs2/index//yargs' {
}
}

should is module 'yargs' not module 'yargs2/index//yargs'

trajano commented 5 years ago

Do you know if there's any fork that fixes this?

trajano commented 5 years ago

I have a file that has


declare module 'vue/types/vue' {
    export interface Vue {
        $wp: WPAPI;
    }
}

and it puts it in (I flagged the problem text)

declare module '@lj/vue-wp/src/plugin' {
    import WPAPI from "wpapi";
    import { PluginObject } from 'vue';
    **declare** module 'vue/types/vue' {
        interface Vue {
            $wp: WPAPI;
        }
    }
    const _default: PluginObject<WPAPI.WPAPIOptions>;
    export default _default;
}