UNPKG

2.14 kBTypeScriptView Raw
1import { RawSourceMap } from 'source-map';
2import * as ts from 'typescript';
3export interface CodeWithSourceMap {
4 code: string;
5 map?: RawSourceMap;
6 source?: string;
7}
8export interface PropertyMetadata {
9 node?: ts.Node;
10 url?: string;
11}
12export interface AnimationMetadata extends PropertyMetadata {
13 animation: CodeWithSourceMap;
14}
15export interface StyleMetadata extends PropertyMetadata {
16 style: CodeWithSourceMap;
17}
18export interface TemplateMetadata extends PropertyMetadata {
19 template: CodeWithSourceMap;
20}
21export declare class DirectiveMetadata {
22 readonly controller: ts.ClassDeclaration;
23 readonly decorator: ts.Decorator;
24 readonly selector?: string;
25 constructor(controller: ts.ClassDeclaration, decorator: ts.Decorator, selector?: string);
26}
27export declare class ComponentMetadata extends DirectiveMetadata {
28 readonly controller: ts.ClassDeclaration;
29 readonly decorator: ts.Decorator;
30 readonly selector?: string;
31 readonly animations?: (AnimationMetadata | undefined)[];
32 readonly styles?: (StyleMetadata | undefined)[];
33 readonly template?: TemplateMetadata;
34 constructor(controller: ts.ClassDeclaration, decorator: ts.Decorator, selector?: string, animations?: (AnimationMetadata | undefined)[], styles?: (StyleMetadata | undefined)[], template?: TemplateMetadata);
35}
36export declare class PipeMetadata {
37 readonly controller: ts.ClassDeclaration;
38 readonly decorator: ts.Decorator;
39 readonly name?: string;
40 readonly pure?: ts.BooleanLiteral;
41 constructor(controller: ts.ClassDeclaration, decorator: ts.Decorator, name?: string, pure?: ts.BooleanLiteral);
42}
43export declare class ModuleMetadata {
44 readonly controller: ts.ClassDeclaration;
45 readonly decorator: ts.Decorator;
46 constructor(controller: ts.ClassDeclaration, decorator: ts.Decorator);
47}
48export declare class InjectableMetadata {
49 readonly controller: ts.ClassDeclaration;
50 readonly decorator: ts.Decorator;
51 readonly providedIn?: string | ts.Expression;
52 constructor(controller: ts.ClassDeclaration, decorator: ts.Decorator, providedIn?: string | ts.Expression);
53}