microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.43k stars 102 forks source link

Duplicate identifier 'prototype' : listr #70

Open vajahath opened 7 years ago

vajahath commented 7 years ago

I was trying to generate .d.ts for listr

/** Declaration file generated by dts-gen */

export = listr;

declare class listr {
    constructor(...args: any[]);

    add(...args: any[]): void;

    render(...args: any[]): void;

    run(...args: any[]): void;

    setRenderer(...args: any[]): void;

}

declare namespace listr {
    namespace prototype {
    //        ^^^^^^^^^==============================> problem 
        const tasks: any;

        function add(...args: any[]): void;

        function render(...args: any[]): void;

        function run(...args: any[]): void;

        function setRenderer(...args: any[]): void;

    }

}

says

Duplicate identifier 'prototype'
GuyHarwood commented 6 years ago

i also have this problem with the amqp10 package

@vajahath did you find a workaround?

davidpaulhunt commented 6 years ago

+1 for this, I'm having the same issue.

Actually, I think this is the same as #67

jeffrose commented 6 years ago

I am having the same issue trying to generate a .dt.s for transduce.

export namespace Transducer {
    namespace prototype {
    //        ^^^^^^^^^
        function xfInit(): any;

        function xfResult(value: any): any;

        function xfStep(value: any, input: any): any;

        namespace xfInit {
            const prototype: {
            };

        }

        namespace xfResult {
            const prototype: {
            };

        }

        namespace xfStep {
            const prototype: {
            };

        }

    }

}
ruscon commented 6 years ago

Any solutions ?

lopezvit commented 5 years ago

Got the same problem with minionpool library.