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

Core API: implementing Renderer requires types from private exports #14001

Closed
platosha opened this issue Jan 18, 2017 · 2 comments · Fixed by #14002
Closed

Core API: implementing Renderer requires types from private exports #14001

platosha opened this issue Jan 18, 2017 · 2 comments · Fixed by #14002

Comments

@platosha
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
The animate abstract method from the Renderer abstract class is defined using types only available though private exports, namely: AnimationStyles, AnimationKeyframe, AnimationPlayer, NoOpAnimationPlayer.

Expected behavior
All the types to implement animate are public, or the animate is not required in the Renderer.

Minimal reproduction of the problem with instructions

  1. Define a TypeScript Angular module.
  2. In the module, implement and provide a RootRenderer injectable service with a custom Renderer implemention.
  3. TypeScript compiler refuses to compile the Renderer without the animate method. After trying to add it, the issue occurs.

What is the motivation / use case for changing the behavior?
The Renderer is a public API, although experimental. Implementing a Renderer makes low-level DOM adjustments possible, those are sometimes essential to use together with third-party component libraries, such as Polymer.

As for now, a custom Renderer implementation is not achievable without importing the animation types mentioned above from private core exports.

Please tell us about your environment:

  • Angular version: 2.3.X
  • Browser: all
  • Language: TypeScript 2.0.10
@DzmitryShylovich
Copy link
Contributor

AnimationPlayer is exported

@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 Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants