@glimmer/resolver

  • Version 0.4.3
  • Published
  • 224 kB
  • 1 dependency
  • MIT license

Install

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

Overview

Resolver for Glimmer apps.

Index

Classes

class BasicModuleRegistry

class BasicRegistry implements ModuleRegistry {}

    constructor

    constructor(entries?: any);

      method get

      get: (specifier: string) => any;

        method has

        has: (specifier: string) => boolean;

          class Resolver

          class Resolver implements IResolver {}

            constructor

            constructor(config: ResolverConfiguration, registry: ModuleRegistry);

              property config

              config: ResolverConfiguration;

                property registry

                registry: ModuleRegistry;

                  method identify

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

                    method resolve

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

                      method retrieve

                      retrieve: (specifier: string) => any;

                        Interfaces

                        interface ModuleCollectionDefinition

                        interface ModuleCollectionDefinition {}

                          property defaultType

                          defaultType?: string;

                            property group

                            group?: string;

                              property privateCollections

                              privateCollections?: string[];

                                property types

                                types?: string[];

                                  property unresolvable

                                  unresolvable?: boolean;

                                    interface ModuleRegistry

                                    interface ModuleRegistry {}

                                      method get

                                      get: (specifier: string) => any;

                                        method has

                                        has: (specifier: string) => boolean;

                                          interface ModuleTypeDefinition

                                          interface ModuleTypeDefinition {}

                                            property definitiveCollection

                                            definitiveCollection?: string;

                                              property unresolvable

                                              unresolvable?: boolean;

                                                interface PackageDefinition

                                                interface PackageDefinition {}

                                                  property mainPath

                                                  mainPath?: string;
                                                  • The path to the directory that contains the main export for the package.

                                                    By default, mainPath = '/src'.

                                                  property name

                                                  name: string;
                                                  • The name of the package, as defined in package.json.

                                                    For example, a package published to npm as ember-super-input must also use this name.

                                                  property rootName

                                                  rootName?: string;
                                                  • An alias used for module resolution.

                                                    For addons, the rootName will initially be a read-only property that equals the package name with any ember- and ember-cli- prefixes stripped. (e.g. ember-super-input becomes super-input). It's possible that custom overrides / aliases will be allowed in the future.

                                                    All apps should use a rootName of "app" for consistency.

                                                  interface ResolverConfiguration

                                                  interface ResolverConfiguration {}

                                                    property app

                                                    app?: PackageDefinition;

                                                      property collections

                                                      collections: Dict<ModuleCollectionDefinition>;

                                                        property types

                                                        types: Dict<ModuleTypeDefinition>;

                                                          Package Files (5)

                                                          Dependencies (1)

                                                          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/resolver.

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