Skip to content

Commit

Permalink
Registry APIs: deprecate micro-syntax; introduce replacement API
Browse files Browse the repository at this point in the history
Introduce a new, object-based API for all registry APIs; deprecate the
current string-based microsyntax registry APIs; and introduce a
`capabilities` property to the resolver to safely support existing
resolvers. Extend the new API for service and controller injections, and
deprecate their microsyntax for namespaced injections.

Today the registry APIs are all of shapes roughly like this:

    getOwner(this).lookup('service:session');

This RFC proposes that they would instead be written like this:

    getOwner(this).lookup({ type: 'service', name: 'session' })

Service and controller injections which include a namespace currently
look like this:

    class Example {
      @service('global@session')
      session;
    }

This RFC proposes that these would instead be written like this:

    class Example {
      @service({ namespace: 'global', name: 'session' })
      session;
    }
  • Loading branch information
chriskrycho authored Jan 27, 2020
1 parent 6f3c13d commit 70ff66a
Showing 1 changed file with 790 additions and 0 deletions.
Loading

0 comments on commit 70ff66a

Please sign in to comment.