UNPKG

2.04 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { JsonObject } from '@angular-devkit/core';
9import { Collection, CollectionDescription, Engine, EngineHost, RuleFactory, Schematic, SchematicDescription, TypedSchematicContext } from '../src';
10export interface FileSystemCollectionDescription {
11 readonly name: string;
12 readonly path: string;
13 readonly version?: string;
14 readonly schematics: {
15 [name: string]: FileSystemSchematicDesc;
16 };
17 readonly encapsulation?: boolean;
18}
19export interface FileSystemSchematicJsonDescription {
20 readonly aliases?: string[];
21 readonly factory: string;
22 readonly name: string;
23 readonly collection: FileSystemCollectionDescription;
24 readonly description: string;
25 readonly schema?: string;
26 readonly extends?: string;
27}
28export interface FileSystemSchematicDescription extends FileSystemSchematicJsonDescription {
29 readonly path: string;
30 readonly schemaJson?: JsonObject;
31 readonly factoryFn: RuleFactory<{}>;
32}
33/**
34 * Used to simplify typings.
35 */
36export declare type FileSystemEngine = Engine<FileSystemCollectionDescription, FileSystemSchematicDescription>;
37export declare type FileSystemEngineHost = EngineHost<FileSystemCollectionDescription, FileSystemSchematicDescription>;
38export declare type FileSystemCollection = Collection<FileSystemCollectionDescription, FileSystemSchematicDescription>;
39export declare type FileSystemSchematic = Schematic<FileSystemCollectionDescription, FileSystemSchematicDescription>;
40export declare type FileSystemCollectionDesc = CollectionDescription<FileSystemCollectionDescription>;
41export declare type FileSystemSchematicDesc = SchematicDescription<FileSystemCollectionDescription, FileSystemSchematicDescription>;
42export declare type FileSystemSchematicContext = TypedSchematicContext<FileSystemCollectionDescription, FileSystemSchematicDescription>;