@glimmer/di

  • Version 0.2.1
  • Published
  • 152 kB
  • No dependencies
  • MIT license

Install

npm i @glimmer/di
yarn add @glimmer/di
pnpm add @glimmer/di

Overview

Dependency injection support for Glimmer applications.

Index

Variables

variable OWNER

const OWNER: string;

    Functions

    function deserializeSpecifier

    deserializeSpecifier: (specifier: string) => Specifier;

      function getOwner

      getOwner: (object: object) => Owner;

        function isSpecifierObjectAbsolute

        isSpecifierObjectAbsolute: (specifier: Specifier) => boolean;

          function isSpecifierStringAbsolute

          isSpecifierStringAbsolute: (specifier: string) => boolean;

            function serializeSpecifier

            serializeSpecifier: (specifier: Specifier) => string;

              function setOwner

              setOwner: (object: object, owner: Owner) => void;

                Classes

                class Container

                class Container {}

                  constructor

                  constructor(registry: RegistryReader, resolver?: Resolver);

                    method defaultInjections

                    defaultInjections: (specifier: string) => object;

                      method defaultTeardown

                      defaultTeardown: (instance: any) => void;

                        method factoryFor

                        factoryFor: (specifier: string) => Factory<any>;

                          method lookup

                          lookup: (specifier: string) => any;

                            method teardown

                            teardown: () => void;

                              class Registry

                              class Registry implements RegistryAccessor {}

                                constructor

                                constructor(options?: RegistryOptions);

                                  method register

                                  register: (
                                  specifier: string,
                                  factoryDefinition: FactoryDefinition<any>,
                                  options?: RegistrationOptions
                                  ) => void;

                                    method registeredInjections

                                    registeredInjections: (specifier: string) => Injection[];

                                      method registeredOption

                                      registeredOption: (specifier: string, option: string) => any;

                                        method registeredOptions

                                        registeredOptions: (specifier: string) => any;

                                          method registerInjection

                                          registerInjection: (specifier: string, property: string, source: string) => void;

                                            method registerOption

                                            registerOption: (specifier: string, option: string, value: any) => void;

                                              method registration

                                              registration: (specifier: string) => FactoryDefinition<any>;

                                                method unregister

                                                unregister: (specifier: string) => void;

                                                  method unregisterOption

                                                  unregisterOption: (specifier: string, option: string) => void;

                                                    Interfaces

                                                    interface Dict

                                                    interface Dict<T> {}

                                                      index signature

                                                      [index: string]: T;

                                                        interface Factory

                                                        interface Factory<T> {}

                                                          property class

                                                          class: FactoryDefinition<T>;

                                                            method create

                                                            create: (injections?: object) => T;

                                                              method teardown

                                                              teardown: (instance: any) => void;

                                                                interface FactoryDefinition

                                                                interface FactoryDefinition<T> {}

                                                                  method create

                                                                  create: (injections?: object) => T;

                                                                    method teardown

                                                                    teardown: (instance: object) => void;

                                                                      interface Injection

                                                                      interface Injection {}

                                                                        property property

                                                                        property: string;

                                                                          property source

                                                                          source: string;

                                                                            interface Owner

                                                                            interface Owner {}

                                                                              method factoryFor

                                                                              factoryFor: (specifier: string, referrer?: string) => Factory<any>;

                                                                                method identify

                                                                                identify: (specifier: string, referrer?: string) => string;

                                                                                  method lookup

                                                                                  lookup: (specifier: string, referrer?: string) => any;

                                                                                    interface RegistrationOptions

                                                                                    interface RegistrationOptions {}

                                                                                      property instantiate

                                                                                      instantiate?: boolean;

                                                                                        property singleton

                                                                                        singleton?: boolean;

                                                                                          interface RegistryAccessor

                                                                                          interface RegistryAccessor extends RegistryReader, RegistryWriter {}

                                                                                            interface RegistryReader

                                                                                            interface RegistryReader {}

                                                                                              method registeredInjections

                                                                                              registeredInjections: (specifier: string) => Injection[];

                                                                                                method registeredOption

                                                                                                registeredOption: (specifier: string, option: string) => any;

                                                                                                  method registeredOptions

                                                                                                  registeredOptions: (specifier: string) => any;

                                                                                                    method registration

                                                                                                    registration: (specifier: string) => any;

                                                                                                      interface RegistryWriter

                                                                                                      interface RegistryWriter {}

                                                                                                        method register

                                                                                                        register: (
                                                                                                        specifier: string,
                                                                                                        factory: any,
                                                                                                        options?: RegistrationOptions
                                                                                                        ) => void;

                                                                                                          method registerInjection

                                                                                                          registerInjection: (specifier: string, property: string, source: string) => void;

                                                                                                            method registerOption

                                                                                                            registerOption: (specifier: string, option: string, value: any) => void;

                                                                                                              method unregister

                                                                                                              unregister: (specifier: string) => void;

                                                                                                                method unregisterOption

                                                                                                                unregisterOption: (specifier: string, option: string) => void;

                                                                                                                  interface Resolver

                                                                                                                  interface Resolver {}

                                                                                                                    method identify

                                                                                                                    identify: (specifier: string, referrer?: string) => string;

                                                                                                                      method retrieve

                                                                                                                      retrieve: (specifier: string) => FactoryDefinition<any>;

                                                                                                                        interface Specifier

                                                                                                                        interface Specifier {}

                                                                                                                          property collection

                                                                                                                          collection?: string;

                                                                                                                            property name

                                                                                                                            name?: string;

                                                                                                                              property namespace

                                                                                                                              namespace?: string;

                                                                                                                                property rootName

                                                                                                                                rootName?: string;

                                                                                                                                  property type

                                                                                                                                  type?: string;

                                                                                                                                    Package Files (8)

                                                                                                                                    Dependencies (0)

                                                                                                                                    No dependencies.

                                                                                                                                    Dev Dependencies (4)

                                                                                                                                    Peer Dependencies (0)

                                                                                                                                    No peer dependencies.

                                                                                                                                    Badge

                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@glimmer/di.

                                                                                                                                    • Markdown
                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@glimmer/di)
                                                                                                                                    • HTML
                                                                                                                                      <a href="https://www.jsdocs.io/package/@glimmer/di"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>