Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when generating class in global scope #56

Open
MaddMugsy opened this issue Aug 31, 2021 · 1 comment
Open

Error when generating class in global scope #56

MaddMugsy opened this issue Aug 31, 2021 · 1 comment

Comments

@MaddMugsy
Copy link

Thanks for putting this tool together!

I noticed that when I set it to generate classes instead of interfaces and then set those classes to be global, it creates the class without an "export" expression. This results in the following compiler error and makes the classes more difficult to consume:

TS1046 (TS) Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

Can you please add the word "export" before global classes?

Thanks!

@Tobi920
Copy link

Tobi920 commented Nov 10, 2021

I also have the same issue because I would like to use this extension for synchronizing my C# DataObjects into exported TypeScript interfaces in a common c# class library.
The generating of the interfaces works great, but for using in an other project I have to add "export".

Is it already being considered to solve this issue?

In general I think this extension is very helpfully, thanks a lot.

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

No branches or pull requests

2 participants