1 | /**
|
2 | * @license
|
3 | * Copyright Google Inc. 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 | */
|
8 | import * as ts from 'typescript';
|
9 | import { ModuleMetadata } from './schema';
|
10 | /**
|
11 | * A set of collector options to use when collecting metadata.
|
12 | */
|
13 | export declare class CollectorOptions {
|
14 | /**
|
15 | * Version of the metadata to collect.
|
16 | */
|
17 | version?: number;
|
18 | /**
|
19 | * Collect a hidden field "$quoted$" in objects literals that record when the key was quoted in
|
20 | * the source.
|
21 | */
|
22 | quotedNames?: boolean;
|
23 | /**
|
24 | * Do not simplify invalid expressions.
|
25 | */
|
26 | verboseInvalidExpression?: boolean;
|
27 | }
|
28 | /**
|
29 | * Collect decorator metadata from a TypeScript module.
|
30 | */
|
31 | export declare class MetadataCollector {
|
32 | private options;
|
33 | constructor(options?: CollectorOptions);
|
34 | /**
|
35 | * Returns a JSON.stringify friendly form describing the decorators of the exported classes from
|
36 | * the source file that is expected to correspond to a module.
|
37 | */
|
38 | getMetadata(sourceFile: ts.SourceFile, strict?: boolean): ModuleMetadata;
|
39 | }
|