Skip to content

Use 'export' keyword instead of 'declare' when namespaces are removed#12

Open
james-maloney wants to merge 1 commit into
dtsgenerator:masterfrom
james-maloney:master
Open

Use 'export' keyword instead of 'declare' when namespaces are removed#12
james-maloney wants to merge 1 commit into
dtsgenerator:masterfrom
james-maloney:master

Conversation

@james-maloney
Copy link
Copy Markdown

@james-maloney james-maloney commented Feb 23, 2022

Fixes #7

@horiuchi
Copy link
Copy Markdown
Contributor

How do you need to replace the declare to export?

@james-maloney
Copy link
Copy Markdown
Author

I want to be able to import these types into my code base. Using declare does not allow me to use the generated types when I remove the namespaces. This PR is an attempt to fix this issue. Issue #7 describes the issue well.

I apologize for the formatting changes, those were done by my editor.

@horiuchi
Copy link
Copy Markdown
Contributor

If you use declare, you can refer to the type without importing it if it is included in the codebase.

But is it easier to use it if you always the export type? If so, I think it would be better to change it in the dtsgenerator itself instead of in this plugin.

@james-maloney
Copy link
Copy Markdown
Author

james-maloney commented Mar 19, 2022

I think people (me for sure) find it better to explicitly import a type, instead of declare and treating it like a global

@jscarle
Copy link
Copy Markdown

jscarle commented Jul 28, 2024

This is a problem. Please fix it so the namespace is exported.

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

Successfully merging this pull request may close these issues.

Removing namespaces causes interfaces to be declared instead of exported

3 participants