Skip to content

There should be a type alias for types that can be used as an injection token #39792

Closed

Description

@mitchellwills

🚀 feature request

Relevant Package

This feature request is for @angular/core

Description

There should be a type alias defined for values that can be used as an "injection token". Today I think that is roughly Type<T>|AbstractType<T>|InjectionToken<T>. This type is repeated all over and defining a consistent alias would make it easier to update in the future and simplify code passing tokens around.

Forked from #37958

Describe the solution you'd like

type ????Token<T> = Type<T>|AbstractType<T>|InjectionToken<T>

Not really sure on a name

Activity

  1. added
    area: coreIssues related to the framework runtime
    featureLabel used to distinguish feature request from other issues
    on Nov 20, 2020
  2. modified the milestone: Backlog on Nov 20, 2020
  3. self-assigned this
    on Apr 12, 2021
  4. added a commit that references this issue on Apr 22, 2021
    5895ddb
  5. angular-automatic-lock-bot commented on May 23, 2021

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: coreIssues related to the framework runtimefeatureLabel used to distinguish feature request from other issuesstate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions