Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Apr 7, 2025

Explicitly sets an empty type when the library calls into the component schematic for a few reasons:

  1. The type for classes mostly makes sense in an application contenxt. E.g. libraries are unlikely to have guards.
  2. The generated component is there primarily as an example and library authors are likely to either delete it or modify it to match their expected public API.
  3. It ensures that the generated files remain correct if the component schematic ends up inheriting the type from the workspace.

Explicitly sets an empty `type` when the `library` calls into the `component` schematic for a few reasons:
1. The `type` for classes mostly makes sense in an application contenxt. E.g. libraries are unlikely to have guards.
2. The generated component is there primarily as an example and library authors are likely to either delete it or modify it to match their expected public API.
3. It ensures that the generated files remain correect if the `component` schematic ends up inheriting the `type` from the workspace.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Apr 7, 2025
@crisbeto crisbeto requested a review from clydin April 7, 2025 08:58
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 7, 2025
@dgp1130 dgp1130 merged commit 661609e into angular:main Apr 7, 2025
34 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants