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

fix(plugin): support outputs without inline initialization #497

Merged

Conversation

ShacharHarshuv
Copy link
Contributor

Previously, this script would fail with a cryptic message (cannot read property of undefined (reading includes)) for input like:

@Output() myOutput: EventEmitter<string>;

The changes support that use case and:

  • Uses the initialization in the constructor to infer the type (and removes it)
  • Creates an initialization (= output()) if it doesn't exist

Previously, this script would fail with a cryptic message (`cannot read property of undefined (reading includes)`) for input like:
```ts
@output() myOutput: EventEmitter<string>;
```

The changes support that use case and:
- Uses the initialization in the constructor to infer the type (and removes it)
- Creates an initialization (`= output()`) if it doesn't exist
@nartc
Copy link
Collaborator

nartc commented Oct 8, 2024

@all-contributors please add @ShacharHarshuv for code

Copy link
Contributor

@nartc

I've put up a pull request to add @ShacharHarshuv! 🎉

@nartc
Copy link
Collaborator

nartc commented Oct 8, 2024

@ShacharHarshuv sorry that this falls on you but apparently the lint target fails because convert-output is affected by this change. Can you fix the lint issue? Thank you.

@ShacharHarshuv ShacharHarshuv force-pushed the feature/outputs-with-no-initializations branch from a41021a to 6858963 Compare October 8, 2024 19:20
@ShacharHarshuv
Copy link
Contributor Author

@nartc I believe it should be fixed now

@nartc nartc merged commit 55530df into ngxtension:main Oct 10, 2024
1 check 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