Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

NameSpace issue #151

Open
Udhay-Thoutkatalyst opened this issue Feb 11, 2020 · 0 comments
Open

NameSpace issue #151

Udhay-Thoutkatalyst opened this issue Feb 11, 2020 · 0 comments

Comments

@Udhay-Thoutkatalyst
Copy link

Using dts-gen, i am generating a typescript definition file from JavaScript.

It is converting all the files properly, except namespace issue.

My JavaScript file looks like this....

var Utils = Utils || {};

Utils.SimpleDbClient = class SimpleDbClient {
}

When i convert i expect the following output (Used the following url to generate this. http://www.typescriptlang.org/play)

declare namespace Utils {
    export { SimpleDbClient };
}
declare class SimpleDbClient {
}

But i am getting the following one:

declare class Utils_SimpleDbClient {
}

I am using the following command to generate:

dts-gen --expression-file test.js

My question is, why dts-gen is not creating namespace?

Can you please help me to resolve this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant