UNPKG

1.37 kBTypeScriptView Raw
1import { Dict } from '@glimmer/di';
2export interface PackageDefinition {
3 /**
4 * The name of the package, as defined in `package.json`.
5 *
6 * For example, a package published to npm as `ember-super-input` must
7 * also use this `name`.
8 */
9 name: string;
10 /**
11 * The path to the directory that contains the `main` export for the
12 * package.
13 *
14 * By default, `mainPath = '/src'`.
15 */
16 mainPath?: string;
17 /**
18 * An alias used for module resolution.
19 *
20 * For addons, the `rootName` will initially be a read-only property that
21 * equals the package `name` with any `ember-` and `ember-cli-` prefixes
22 * stripped. (e.g. `ember-super-input` becomes `super-input`). It's
23 * possible that custom overrides / aliases will be allowed in the future.
24 *
25 * All apps should use a `rootName` of "app" for consistency.
26 */
27 rootName?: string;
28}
29export interface ModuleTypeDefinition {
30 definitiveCollection?: string;
31 unresolvable?: boolean;
32}
33export interface ModuleCollectionDefinition {
34 group?: string;
35 types?: string[];
36 defaultType?: string;
37 privateCollections?: string[];
38 unresolvable?: boolean;
39}
40export interface ResolverConfiguration {
41 app?: PackageDefinition;
42 types: Dict<ModuleTypeDefinition>;
43 collections: Dict<ModuleCollectionDefinition>;
44}