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

updated import in 'generator.ts' to be properly resolvable without "allowSyntheticDefaultImports": true in 'tsconfig.json' #1494

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

sailingKieler
Copy link
Contributor

@sailingKieler sailingKieler commented Nov 20, 2023

added 'EventEmitter' interface to 'BaseGenerator' explicitly, as the emitter functionality is demanded by 'BaseGenerator' of '@yeoman/types'

…llowSyntheticDefaultImports": true in 'tsconfig.json'

added 'EventEmitter' interface to 'BaseGenerator' explicitly, as the emitter functionality is demanded by 'BaseGenerator' of '@yeoman/types'
@sailingKieler
Copy link
Contributor Author

Dear committers,
today I ran into a TS compiling issue that is to due the 'old school' import in generated.ts.
I ran into that issue while writing/updating a (unit) test of a custom yeoman-based project stub generator.

It took my a while to identify the source of eval why Generator (BaseGenerator) of yeoman-generator is not compatible to BaseGenerator of @yeoman/types. Enabling "allowSyntheticDefaultImports" in our tsconfig.json solved it basically.

Nonetheless, I would appreciate if you guys could include this change to avoid that issue in future. Maybe there're more imports to be fixed?

The project at which I ran into the issue is Langium, my current contribution is eclipse-langium/langium#1298.

Thanks in advance! 🙏

@mshima mshima merged commit 71dcba0 into yeoman:main Nov 24, 2023
3 of 4 checks passed
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.

2 participants